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:
AND THIS CODE AT THE TABLE ROOM_ITEMS:
and, this code, at ROOM.CS
Credits: Itachi
Font: Kekomundo
- 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'
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: