Need Some help??? (jukebox)

aqilws

Member
Sep 8, 2011
67
7
Hi,
I am trying to code jukebox with reference codes from cloudserver to my plusemu edit.
Background of myself: im 'new' to habbo programming. Still learning programming in my school (Diploma).
SO here is what i have done:
1) Update jukebox packet to match the swf version that im using
2) copy and edited the code to match my plus emu structure

but for some reason it still does not work could be the Database or something missing that i forgotten to add in???

Can someone explain / help me how the habbo structure works? i suspect my musicdics is not pointed properly
 
Last edited:

JayC

Always Learning
Aug 8, 2013
5,493
1,398
How the fuck do you expect someone to help you when you don't provide any code, nor show us how your database is setup.

We read the code, it's not magic. We have no clue what you wrote when you say "I did this, and this , why's it not working"
 

Damien

Don't need glasses if you can C#
Feb 26, 2012
426
642
Set the interaction type of the jukebox correctly?

I'm assuming you've compiled the code without any errors, so that's all I can suggest doing from what you've said.
 

aqilws

Member
Sep 8, 2011
67
7
How the fuck do you expect someone to help you when you don't provide any code, nor show us how your database is setup.

We read the code, it's not magic. We have no clue what you wrote when you say "I did this, and this , why's it not working"
Sorry i forgotten to add the link anyways ill re explain what i did :

i updated the packet to match the swfs im using
Outgoing and incoming in clientpacketheader.cs and serverpacketheader.cs

I added these :

#removed
In purchasefromcatalogueevent.cs,
i added this
Code:
 case InteractionType.MUSIC_DISC:
                            string flags = Convert.ToString(Item.ExtradataInt);
                            if (AmountPurchase > 1)
                            {
                                List<Item> Items = ItemFactory.CreateMultipleItems(Item.Data, Session.GetHabbo(), flags, AmountPurchase);

                                if (Items != null)
                                {
                                    GeneratedGenericItems.AddRange(Items);
                                }
                            }
                            else
                            {
                                NewItem = ItemFactory.CreateSingleItemNullable(Item.Data, Session.GetHabbo(), flags, flags);

                                if (NewItem != null)
                                {
                                    GeneratedGenericItems.Add(NewItem);
                                }
                            }
                            break;
#removed

Added a few lines in room.cs
Code:
this._traxManager = new RoomTraxManager(this); // Jukebox
            OnFurnisLoad(); // Jukebox

...
.
.

 public RoomTraxManager GetTraxManager()
        {
            return this._traxManager;
        }
....
....

try { this._traxManager.OnCycle(); }

Added some codes in game.cs
TraxSoundManager.Init(); //juke

#removed

Added in interactiontypes.cs
Code:
 case "jukebox":
                    return InteractionType.JUKEBOX;
                case "trax":
                    return InteractionType.TRAX;
                case "musicdisc":
                    return InteractionType.MUSIC_DISC;
also in items.cs
Code:
case InteractionType.JUKEBOX:
                        return new InteractorJukebox();
case InteractionType.MUSIC_DISC: // Added
                        return new InteractorMusicDisc();
in itembehaviourutility.cs
Code:
case InteractionType.MUSIC_DISC:
                    int issx = 0;
                    int.TryParse(Item.ExtraData, out issx);
                    Message.WriteInteger(issx);
                    Message.WriteInteger(0);
                    Message.WriteString(Item.ExtraData);
                    break;


I might have left out some stuff that i ve added in im not too sure as i did not tag/comment or whateva u called it "//juke" on them

Set the interaction type of the jukebox correctly?

I'm assuming you've compiled the code without any errors, so that's all I can suggest doing from what you've said.

In Database i have updated both the interaction to musicdisc and jukebox respectively also added new table jukebox_songs_data and rooms_jukebox_songs and room_items_songs..

Also i have updated the mp3 folder and checked the External variables.
Any missing pieces to solve this puzzle?
 
Anyone?
 
Hais I figured out MYSELF whats wrong i forgotten to add some lines in packetmanager *insert facepalm emoji* FailFish

Screenies :
AzAH-jcHQ0iChgwgZAjw4Q.png


<3
 

aqilws

Member
Sep 8, 2011
67
7
Yeah, i load kine from the inventory. Placing them down just to play then seems pointless to me.
Yep most code above is reference now im implementing it to load from inventory :D Any tips? else i have to run thru codes again to understand how they work
 
Last edited:

Users who are viewing this thread

Top