(Fix)Battle Banzai e Piramide 90% 20.12.10 12:58
estou trazendo um fix que achei no ragzone esta em 90%
onde eu coloco esse codigo va no seu emu melhor emu para se colocar eu
alok entao habbohotel>room>room.cs
e cole o codigo la
:Creditos Marlon Colhado Ragzone
codigo
onde eu coloco esse codigo va no seu emu melhor emu para se colocar eu
alok entao habbohotel>room>room.cs
e cole o codigo la
:Creditos Marlon Colhado Ragzone
codigo
- Código:
//Battle Banzai Piramide
else if (Item.GetBaseItem().InteractionType.ToLower() == "bb_piramide")
{
if (Item.ExtraData == "1")
{
Item.ExtraData = "2";
Item.GetBaseItem().Walkable = false;
Item.UpdateState(false, true);
User.X = Item.SquareInFront.x;
User.Y = Item.SquareInFront.y;
User.UpdateNeeded = true;
}
}
//Battle Banzai Piramide
//Battle Banzai Ativador de Cores
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_ativecores")
using (DatabaseClient dbClient = HolographEnvironment.GetDatabase().GetClient())
{
string color = dbClient.ReadString("SELECT bb_ball FROM `users` WHERE id='" + User.HabboId + "'");
int state;
string ColorBase = "";
state = dbClient.ReadInt32("SELECT bb_apparatus_state FROM `room_items` WHERE id = '" + Item.Id + "' LIMIT 1");
{
if (state == 1)
{
ColorBase = "0";
dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '0'");
}
else if (state == 2)
{
ColorBase = "0";
dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '0'");
}
else if (state == 3)
{
ColorBase = "0";
dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '0'");
}
else if (state == 4)
{
ColorBase = "0";
dbClient.ExecuteQuery("UPDATE `room_items` SET bb_state = '0'");
}
ServerMessage Baldosa = new ServerMessage(88);
Baldosa.AppendStringWithBreak(Item.Id.ToString());
Baldosa.AppendStringWithBreak(ColorBase);
SendMessage(Baldosa);
Item.UpdateState(true, true);
}
}
//Bicho de 7 Cabeças
// Battleball/BattleBanzai
//Codigo por Marlon Colhado
if (Item.GetBaseItem().Name == "bb_gate_r")
{
ServerMessage GateR = new ServerMessage(485);
GateR.AppendInt32(User.VirtualId);
GateR.AppendInt32(33);
SendMessage(GateR);
using (DatabaseClient dbClient = HolographEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'r' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().Name == "bb_gate_y")
{
ServerMessage GateY = new ServerMessage(485);
GateY.AppendInt32(User.VirtualId);
GateY.AppendInt32(36);
SendMessage(GateY);
using (DatabaseClient dbClient = HolographEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'y' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().Name == "bb_gate_g")
{
ServerMessage GateG = new ServerMessage(485);
GateG.AppendInt32(User.VirtualId);
GateG.AppendInt32(34);
SendMessage(GateG);
using (DatabaseClient dbClient = HolographEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'g' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().Name == "bb_gate_b")
{
ServerMessage GateB = new ServerMessage(485);
GateB.AppendInt32(User.VirtualId);
GateB.AppendInt32(35);
SendMessage(GateB);
using (DatabaseClient dbClient = HolographEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'b' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
//String BattleBanzai
using (DatabaseClient dbClient = HolographEnvironment.GetDatabase().GetClient())
{
string color = dbClient.ReadString("SELECT bb_ball FROM `users` WHERE id='" + User.HabboId + "'");
//String BattleBanzai
//Portas Battlebanzai
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_gate_b")
{
if (color == "b")
{
int EffectId = 35;
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(EffectId);
SendMessage(Message);
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'b' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
else
{
int EffectId = 0;
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(EffectId);
SendMessage(Message);
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'none' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_gate_r")
{
if (color == "r")
{
int EffectId = 33;
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(EffectId);
SendMessage(Message);
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'r' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
else
{
int EffectId = 0;
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(EffectId);
SendMessage(Message);
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'none' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_gate_y")
{
if (color == "y")
{
int EffectId = 36;
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(EffectId);
SendMessage(Message);
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'y' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
else
{
int EffectId = 0;
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(EffectId);
SendMessage(Message);
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'none' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_gate_g")
{
if (color == "g")
{
int EffectId = 34;
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(EffectId);
SendMessage(Message);
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'g' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
else
{
int EffectId = 0;
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(EffectId);
SendMessage(Message);
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'none' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
// Portas Battle Banzai
//Pisos Battle Banzai
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
//Fim do Codigo - By Marlon Colhado