• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[FIX] BattleBall tiles 90% /by Itachi =)

Status
Not open for further replies.
Newbie Spellweaver
Joined
Dec 4, 2008
Messages
54
Reaction score
3
LACK
- The count upgrade their to STATE 0 (ZERO)
- When you exit the hotel, it's necessary to bypass the blocked tile to see the color that was blocked.
- It's impossible to restart the tiles. (If you use the Wired Furniture YOU CAN!)

WORKS:
- When you step on the tiles they light
- The graduations works.
- All colors
- If you are in a closed tile, does not change color
- Account for rewards (soon code)
- I think nothing more ...
- The DB stores the user blocked tiles.



INSERT THIS CODE AT THE TABLE USERS:
Code:
ALTER TABLE  `users` ADD `baldosas_pulsadas` INT( 255 ) NOT NULL DEFAULT  '0'
AND THIS CODE AT THE TABLE ROOM_ITEMS:
Code:
ALTER TABLE  `room_items` ADD  `bb_state` INT( 255 ) NOT NULL DEFAULT  '0'


and, this code, at ROOM.CS
Code:
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_patch")
                    {
                    	string ColorBase = "";
                    	int state;
                    	int baldosasusadas;
                        state = dbClient.ReadInt32("SELECT bb_state FROM room_items WHERE id = '" + Item.Id + "' LIMIT 1");
                        baldosasusadas = dbClient.ReadInt32("SELECT baldosas_pulsadas FROM users WHERE id = '" + User.HabboId + "' LIMIT 1");
                                        	
                        if (color == "g")
                        {
                        	if(state == 0) { 
               // ColorBase = "0";
               ColorBase = "6";
               dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '6' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 1) {
                ColorBase = "6";
                  dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '6' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 6) {
                ColorBase = "7";
                	dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '7' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 7) {
                ColorBase = "8";
                int pulsadas = baldosasusadas + 1;
                dbClient.ExecuteQuery("UPDATE users SET baldosas_pulsadas = '" + pulsadas + "' WHERE id = '" + User.HabboId + "' LIMIT 1");
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '8' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 8) {
                ColorBase = "8";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '8' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 3) {
                ColorBase = "6";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '6' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 4) {
                ColorBase = "6";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '6' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 5) {
                ColorBase = "5";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '5' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 9) {
                ColorBase = "6";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '6' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 10) {
                ColorBase = "6";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '6' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 11) {
                ColorBase = "6";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '11' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 12) {
                ColorBase = "6";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '6' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 13) {
                ColorBase = "6";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '6' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 14) {
                ColorBase = "14";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '14' WHERE id = '" + Item.Id + "' LIMIT 1");
                }
                        	
                        	
                        ServerMessage Baldosa = new ServerMessage(88);
                        Baldosa.AppendStringWithBreak(Item.Id.ToString());
                        Baldosa.AppendStringWithBreak(ColorBase);
                        SendMessage(Baldosa);
                        }
                        else if (color == "r")
                        {
                        	
                        	if(state == 0) { // Si esta sin usar...
                // ColorBase = "0";
                ColorBase = "3";
                  dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '3' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 1) {
                ColorBase = "3";
                  dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '3' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 3) {
                ColorBase = "4";
                	dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '4' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 4) {
                ColorBase = "5";
                int pulsadas = baldosasusadas + 1;
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '5' WHERE id = '" + Item.Id + "' LIMIT 1");
                dbClient.ExecuteQuery("UPDATE users SET baldosas_pulsadas = '" + pulsadas + "' WHERE id = '" + User.HabboId + "' LIMIT 1");
                } else if(state == 5) {
                ColorBase = "5";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '5' WHERE id = '" + Item.Id + "' LIMIT 1");                	 	
                } else if(state == 6) {
                ColorBase = "3";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '3' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 7) {
                ColorBase = "3";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '3' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 8) {
                ColorBase = "8";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '8' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 9) {
                ColorBase = "3";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '3' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 10) {
                ColorBase = "3";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '3' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 11) {
                ColorBase = "11";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '11' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 12) {
                ColorBase = "3";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '3' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 13) {
                ColorBase = "3";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '3' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 14) {
                ColorBase = "14";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '14' WHERE id = '" + Item.Id + "' LIMIT 1");
                }
                        	
                        ServerMessage Baldosa = new ServerMessage(88);
                        Baldosa.AppendStringWithBreak(Item.Id.ToString());
                        Baldosa.AppendStringWithBreak(ColorBase);
                        SendMessage(Baldosa);
                        }
                        else if (color == "y")
                        {
                        	
                        	if(state == 0) { // Si esta sin usar...
                // ColorBase = "0";
                ColorBase = "12";
                  dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '12' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 1) {
                ColorBase = "12";
                  dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '12' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 12) {
                ColorBase = "13";
                	dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '13' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 13) {
                ColorBase = "14";
                int pulsadas = baldosasusadas + 1;
                dbClient.ExecuteQuery("UPDATE users SET baldosas_pulsadas = '" + pulsadas + "' WHERE id = '" + User.HabboId + "' LIMIT 1");
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '14' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 14) {
                ColorBase = "14";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '14' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 3) {
                ColorBase = "12";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '12' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 4) {
                ColorBase = "12";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '12' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 5) {
                ColorBase = "5";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '5' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 6) {
                ColorBase = "12";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '12' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 7) {
                ColorBase = "12";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '12' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 8) {
                ColorBase = "9";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '9' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 9) {
                ColorBase = "12";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '12' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 10) {
                ColorBase = "12";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '12' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 11) {
                ColorBase = "11";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '11' WHERE id = '" + Item.Id + "' LIMIT 1");
                }
                        	
                        ServerMessage Baldosa = new ServerMessage(88);
                        Baldosa.AppendStringWithBreak(Item.Id.ToString());
                        Baldosa.AppendStringWithBreak(ColorBase);
                        SendMessage(Baldosa);
                        }
                        else if (color == "b")
                        {
                        	
                        	if(state == 0) { // Si esta sin usar...
               // ColorBase = "0";
               ColorBase = "9";
                  dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '9' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 1) {
                ColorBase = "9";
                  dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '9' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 9) {
                ColorBase = "10";
                	dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '10' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 10) {
                ColorBase = "11";
                	int pulsadas = baldosasusadas + 1;
                dbClient.ExecuteQuery("UPDATE users SET baldosas_pulsadas = '" + pulsadas + "' WHERE id = '" + User.HabboId + "' LIMIT 1");
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '11' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 11) {
                ColorBase = "11";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '11' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 3) {
                ColorBase = "9";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '9' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 4) {
                ColorBase = "9";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '9' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 5) {
                ColorBase = "5";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '5' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 6) {
                ColorBase = "9";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '9' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 7) {
                ColorBase = "9";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '9' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 8) {
                ColorBase = "8";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '8' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 12) {
                ColorBase = "9";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '9' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 13) {
                ColorBase = "9";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '9' WHERE id = '" + Item.Id + "' LIMIT 1");
                } else if(state == 14) {
                ColorBase = "14";
                dbClient.ExecuteQuery("UPDATE room_items SET bb_state = '14' WHERE id = '" + Item.Id + "' LIMIT 1");
                }
                        	
                        ServerMessage Baldosa = new ServerMessage(88);
                        Baldosa.AppendStringWithBreak(Item.Id.ToString());
                        Baldosa.AppendStringWithBreak(ColorBase);
                        SendMessage(Baldosa);
                        }
                    }
                    //Fin baldosas


Credits: Itachi
Font: Kekomundo
 
Last edited:
Banned
Banned
Joined
Jan 9, 2010
Messages
1,850
Reaction score
503
Good release, but..

nederlander and me are working on better codes without MySQL :p

We will release it tommorow :)
 
Custom Title Activated
Loyal Member
Joined
Oct 21, 2007
Messages
2,098
Reaction score
464
Wow Nice BATTLE Banzai Is Going 100% So Quick I Wish they Bring Some Next Version Of Snowstorm Back. Great Release
 
Banned
Banned
Joined
Jan 9, 2010
Messages
1,850
Reaction score
503
Zak, i just tried Battleball Banzai on Habbo.nl and its complety different then how i coded it, so im gonna recode it tommorow :p
 
Custom Title Activated
Loyal Member
Joined
Oct 21, 2007
Messages
2,098
Reaction score
464
O Kewl Goodluck Mate.
 
Junior Spellweaver
Joined
Feb 15, 2008
Messages
160
Reaction score
26
LACK
- The count upgrade their to STATE 0 (ZERO)
- When you exit the hotel, it's necessary to bypass the blocked tile to see the color that was blocked.
- It's impossible to restart the tiles. (If you use the Wired Furniture YOU CAN!)

WORKS:
- When you step on the tiles they light
- The graduations works.
- All colors
- If you are in a closed tile, does not change color
- Account for rewards (soon code)
- I think nothing more ...
- The DB stores the user blocked tiles.



CODES


Credits: Itachi
Font: Kekomundo

Never seen something so badly coded...
Take a look at this I wrote 2 days ago for Torpeedo...
It only use some lines of code to work out every single color etc
Torpeedo has now an almost working bb with counters, timers etc u.u

Code:
//Project Torpeedo - Habbo Hotel Environment
if (TileStateMap[info.PosX, info.PosY] != TileState.Sealed)
{
    if (TileColorMap[info.PosX, info.PosY] == 0)
    {
        TileStateMap[info.PosX, info.PosY]++;
        TileColorMap[info.PosX, info.PosY] = (TileColor)user.Team;
    }
    else if (TileColorMap[info.PosX, info.PosY] == (TileColor)user.Team)
    {
        TileStateMap[info.PosX, info.PosY]++;
    }
    else if (TileStateMap[info.PosX, info.PosY] > TileState.Clicked)
    {
        TileStateMap[info.PosX, info.PosY]--;
    }
    else
    {
        TileStateMap[info.PosX, info.PosY] = TileState.Clicked;
        TileColorMap[info.PosX, info.PosY] = (TileColor)user.Team;
    }

    info.Variables = TileData(info);
    NotifyClientSetStuffFloorChange(info.ID, info.Variables);
    Environment.Game.Furni.SetStuffDataFloorItem(info.ID, info.Variables);
}
 
Status
Not open for further replies.
Back
Top