Battle Banzia fix bb_puck 97%

Results 1 to 11 of 11
  1. #1
    Account Upgraded | Title Enabled! taylan is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    336Posts

    thumbs up Battle Banzia fix bb_puck 97%

    Hey Community

    i'll release a fix for the battleball puck .
    just insert this Code to room.cs

    Code:
    if (Item.GetBaseItem().Name == "bb_puck")
                            using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                            {
                                string color = dbClient.ReadString("SELECT bb_ball FROM `users` WHERE id='" + User.HabboId + "'");
                                int state;
                                string ColorBase = "";
                               
                                state = dbClient.ReadInt32("SELECT bb_state FROM `room_items` WHERE id = '" + Item.Id + "' LIMIT 1");
                                {
                                    if (color == "r")
                                        if (state == 0)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '1'");
                                        }
                                        else if (state == 1)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '2'");
                                        }
                                        else if (state == 2)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '3'");
                                        }
                                        else if (state == 3)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '4'");
                                        }
    
                                    ServerMessage Baldosa = new ServerMessage(88);
                                    Baldosa.AppendStringWithBreak(Item.Id.ToString());
                                    Baldosa.AppendStringWithBreak(ColorBase);
                                    SendMessage(Baldosa);
                                    Item.UpdateState(true, true);
                                }
                                {
                                    if (color == "b")
                                        if (state == 0)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '5'");
                                        }
                                        else if (state == 5)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '6'");
                                        }
                                        else if (state == 6)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '7'");
                                        }
                                        else if (state == 7)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '8'");
                                        }
    
                                    ServerMessage Baldosa = new ServerMessage(88);
                                    Baldosa.AppendStringWithBreak(Item.Id.ToString());
                                    Baldosa.AppendStringWithBreak(ColorBase);
                                    SendMessage(Baldosa);
                                    Item.UpdateState(true, true);
                                }
                                {
                                    if (color == "g")
                                        if (state == 0)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '9'");
                                        }
                                        else if (state == 9)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '10'");
                                        }
                                        else if (state == 10)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '11'");
                                        }
                                        else if (state == 11)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '12'");
                                        }
    
                                    ServerMessage Baldosa = new ServerMessage(88);
                                    Baldosa.AppendStringWithBreak(Item.Id.ToString());
                                    Baldosa.AppendStringWithBreak(ColorBase);
                                    SendMessage(Baldosa);
                                    Item.UpdateState(true, true);
                                }
                                {
                                    if (color == "b")
                                        if (state == 0)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '13'");
                                        }
                                        else if (state == 13)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '14'");
                                        }
                                        else if (state == 14)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '15'");
                                        }
                                        else if (state == 15)
                                        {
    
                                            ColorBase = "0";
                                            dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '16'");
                                        }
    
                                    ServerMessage Baldosa = new ServerMessage(88);
                                    Baldosa.AppendStringWithBreak(Item.Id.ToString());
                                    Baldosa.AppendStringWithBreak(ColorBase);
                                    SendMessage(Baldosa);
                                    Item.UpdateState(true, true);
                                }
                            }
    -Now add at interaction_type a column called
    Code:
    ball
    -Find at your Furniture table the bb_puck furni
    (sprite id=3641 at my db) and change the column to ball.
    -Last stepp , Debug your Uberemu and have fun with the news Puck ;)

    Credits:
    - 95% Kekomondo (Spanish Forum)
    - 5% Me (Taylan ) translating & releasing the fix at Ragezone ;)


  2. #2
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: Battle Banzia fix bb_puck 97%

    Dude, this will lagg ya emu out cuz it uses MySQL..

  3. #3
    Account Upgraded | Title Enabled! taylan is offline
    MemberRank
    Feb 2009 Join Date
    GermanyLocation
    336Posts

    Re: Battle Banzia fix bb_puck 97%

    dont use it if u dont like it and dont left a comment -.-

    ---------- Post added at 05:27 AM ---------- Previous post was at 05:26 AM ----------

    and it didnt lagg your server , just your emulator laggs your server ....

  4. #4
    hi academic is offline
    MemberRank
    Jun 2010 Join Date
    AustraliaLocation
    484Posts

    Re: Battle Banzia fix bb_puck 97%

    exactly it lag's it.

  5. #5
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: Battle Banzia fix bb_puck 97%

    if dont like dont post least its a try right?

  6. #6
    Valued Member Ragesource is offline
    MemberRank
    Oct 2008 Join Date
    ohioLocation
    127Posts

    Re: Battle Banzia fix bb_puck 97%

    Nice work but I don't play Habbo

  7. #7
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: Battle Banzia fix bb_puck 97%

    Quote Originally Posted by ŽÄK View Post
    if dont like dont post least its a try right?
    It doesn't even work and it laggs as hell? :P

  8. #8
    Demi-God tweeney is offline
    MemberRank
    Aug 2008 Join Date
    888Posts

    Re: Battle Banzia fix bb_puck 97%

    Its the bst puck code i seen on this forum
    Infact its the only one?

  9. #9
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: Battle Banzia fix bb_puck 97%

    Quote Originally Posted by tweeney View Post
    Its the bst puck code i seen on this forum
    Infact its the only one?
    Me and nederlander already coded it but we will release it later :)

  10. #10
    Demi-God tweeney is offline
    MemberRank
    Aug 2008 Join Date
    888Posts

    Re: Battle Banzia fix bb_puck 97%

    If you can read...
    I said

    Its the bst puck code i seen on this forum
    Infact its the only one?

    Not about who has coded it the best...

  11. #11
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: Battle Banzia fix bb_puck 97%

    Quote Originally Posted by tweeney View Post
    If you can read...
    I said

    Its the bst puck code i seen on this forum
    Infact its the only one?

    Not about who has coded it the best...
    'k then, but lets get ontopic shall we? :P



Advertisement