-
1 Attachment(s)
Battle Banzai Gate UPDATED!
add furniture interaction: bb_patch
add users table column bb_ball and default value "r"
New Code:
Code:
if (Item.GetBaseItem().Name == "bb_gate_r")
{
ServerMessage GateR = new ServerMessage(485);
GateR.AppendInt32(User.VirtualId);
GateR.AppendInt32(33);
SendMessage(GateR);
using (DatabaseClient dbClient = UberEnvironment.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 = UberEnvironment.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 = UberEnvironment.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 = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'b' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_patch")
{
string pallo;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
pallo = dbClient.ReadString("SELECT bb_ball FROM users WHERE id = '" + User.HabboId + "' LIMIT 1");
}
if (pallo == "r")
{
string Color1 = "5";
ServerMessage ColorPlate = new ServerMessage(88);
ColorPlate.AppendStringWithBreak(Item.Id.ToString());
ColorPlate.AppendStringWithBreak(Color1);
SendMessage(ColorPlate);
}
if (pallo == "y")
{
string Color2 = "14";
ServerMessage ColorPlate = new ServerMessage(88);
ColorPlate.AppendStringWithBreak(Item.Id.ToString());
ColorPlate.AppendStringWithBreak(Color2);
SendMessage(ColorPlate);
}
if (pallo == "g")
{
string Color3 = "8";
ServerMessage ColorPlate = new ServerMessage(88);
ColorPlate.AppendStringWithBreak(Item.Id.ToString());
ColorPlate.AppendStringWithBreak(Color3);
SendMessage(ColorPlate);
}
if (pallo == "b")
{
string Color4 = "11";
ServerMessage ColorPlate = new ServerMessage(88);
ColorPlate.AppendStringWithBreak(Item.Id.ToString());
ColorPlate.AppendStringWithBreak(Color4);
SendMessage(ColorPlate);
}
}
Added coloring.
Credits me 100%
-
Re: Battle Banzai Gate Code
-
Re: Battle Banzai Gate Code
Nice code thanks
But i have a question:
If the 4 first codes update your ball, and bb_plate SET the ball, how do i put 2 Interactions in 1 furni?
-
Re: Battle Banzai Gate Code
Omg, thankyou so much! :o
-
Re: Battle Banzai Gate Code
Great thanks for sharing.
-
Re: Battle Banzai Gate Code
In which file should be and where?
-
Re: Battle Banzai Gate Code
Why are you using the database for this kind of action, why not cache it?
(just to let you know, I'm not an expert with emulators, but am with php..)
-
Re: Battle Banzai Gate Code
what server is this for??? Uber?
Quote:
Originally Posted by
=dj.matias=
add furniture interactions: bb_red_gate,bb_blue_gate,bb_green_gate,bb_yellow_gate,bb_plate
add users table column bb_ball and default value "r"
Code:
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_red_gate")
{
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'r' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_yellow_gate")
{
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'y' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_blue_gate")
{
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'b' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_green_gate")
{
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'g' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_plate")
{
string pallo;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
pallo = dbClient.ReadString("SELECT bb_ball FROM users WHERE id = '" + User.HabboId + "' LIMIT 1");
}
if (pallo == "r")
{
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(33);
SendMessage(Message);
}
if (pallo == "y")
{
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(36);
SendMessage(Message);
}
if (pallo == "g")
{
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(34);
SendMessage(Message);
}
if (pallo == "b")
{
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(35);
SendMessage(Message);
}
}
-
Re: Battle Banzai Gate Code
Thanks for the release mate...
Could someone please specify EXACTLY to me where this should go?
-
Re: Battle Banzai Gate Code
You should also code the tiles, so when they get on them it changes color.
-
Re: Battle Banzai Gate Code
Nice Release did you create this if not credits to other's please
-
Re: Battle Banzai Gate Code
-
Re: Battle Banzai Gate Code
Quote:
Originally Posted by
Rick3131
Whats file insert this?
Habbohotel -> Rooms -> Room.cs
--
Working on BB code but difficult for me i'm beginner of cs :P
-
Re: Battle Banzai Gate Code
This is for uberEmulator, yes.
Quote:
Originally Posted by
iJay
Thanks for the release mate...
Could someone please specify EXACTLY to me where this should go?
FIND:
Code:
if (Item.GetBaseItem().InteractionType.ToLower() == "bed")
{
if (!User.Statusses.ContainsKey("lay"))
{
User.Statusses.Add("lay", Item.GetBaseItem().Height.ToString().Replace(',', '.') + " null");
}
User.Z = Item.Z;
User.RotHead = Item.Rot;
User.RotBody = Item.Rot;
User.UpdateNeeded = true;
}
and exactly under that, or under the last interaction type, add this:
Code:
//Battle-Ball Interactions by 'dj.matias'
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_red_gate")
{
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'r' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_yellow_gate")
{
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'y' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_blue_gate")
{
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'b' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_green_gate")
{
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("UPDATE users SET bb_ball = 'g' WHERE id = '" + User.HabboId + "' LIMIT 1");
}
}
if (Item.GetBaseItem().InteractionType.ToLower() == "bb_plate")
{
string pallo;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
pallo = dbClient.ReadString("SELECT bb_ball FROM users WHERE id = '" + User.HabboId + "' LIMIT 1");
}
if (pallo == "r")
{
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(33);
SendMessage(Message);
}
if (pallo == "y")
{
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(36);
SendMessage(Message);
}
if (pallo == "g")
{
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(34);
SendMessage(Message);
}
if (pallo == "b")
{
ServerMessage Message = new ServerMessage(485);
Message.AppendInt32(User.VirtualId);
Message.AppendInt32(35);
SendMessage(Message);
}
Thanks me <3
-
Re: Battle Banzai Gate Code
What i don't get with this is why it needs to use the database? Also does anyone know where i can get the furni swf's? My stealer seems to error 404 now, hmm they must of changed something.
-
Re: Battle Banzai Gate Code
Quote:
Originally Posted by
matty13
What i don't get with this is why it needs to use the database? Also does anyone know where i can get the furni swf's? My stealer seems to error 404 now, hmm they must of changed something.
Here mate, 32 SWFs.. Credits to Maintenance on RZ
MEGAUPLOAD - The leading online storage and file delivery service
-
Re: Battle Banzai Gate Code
Anyone got a fix for bb_score_* i've fix BB but score boards cannot place in my room x_x
(Teleports doens't work)
http://img837.imageshack.us/img837/4317/88931409.png
-
Re: Battle Banzai Gate Code
I've put the code in my Room.cs but nothing happens.. what do i have to do more?
-
Re: Battle Banzai Gate Code
@Getloose, Release those codes of Battleball and i'll try to code it? 'k? :D
-
Re: Battle Banzai Gate Code
I have a problem when I walk through the barrier I get no color -.- images: battleball.png - Bilder und Fotos kostenlos auf ImageBanana hochladen
bb_red_gate iteractions, bb_blue_gate, bb_green_gate, bb_yellow_g ate, bb_plate is also added bb_ball
sorry for my bad english i'm German
-
Re: Battle Banzai Gate Code
Quote:
Originally Posted by
gulli059
You need to put down a bb_path1 before the gate. Effect coming in active if you walk on a bb floor :ott1:
--
Release if it's done with bb_score_* hope someone has a fix for bb_score_* to set him active in my room :(:
-
Re: Battle Banzai Gate Code
hmmm i wonder how to get the color on the tiles because i did what you said but the tiles still black?
-
Re: Battle Banzai Gate Code
for noobs who dont know Mysql here
CREATE TABLE `users` (
`id` int(11) unsigned NOT NULL auto_increment,
`username` varchar(50) NOT NULL,
`real_name` varchar(100) NOT NULL default '',
`password` varchar(50) NOT NULL,
`mail` varchar(50) NOT NULL default 'defaultuser@meth0d.org',
`auth_ticket` text NOT NULL,
`rank` int(11) unsigned NOT NULL default '1',
`credits` int(11) NOT NULL default '0',
`vip_points` int(11) NOT NULL default '0',
`activity_points` int(11) NOT NULL default '0',
`activity_points_lastupdate` double NOT NULL default '0',
`look` varchar(100) NOT NULL default 'hr-115-42.hd-190-1.ch-215-62.lg-285-91.sh-290-62',
`gender` enum('M','F') NOT NULL default 'M',
`motto` varchar(50) NOT NULL,
`account_created` varchar(50) NOT NULL,
`last_online` varchar(50) NOT NULL,
`online` enum('0','1') NOT NULL default '0',
`ip_last` varchar(120) NOT NULL,
`ip_reg` varchar(120) NOT NULL,
`home_room` int(10) unsigned NOT NULL default '0',
`respect` int(11) NOT NULL default '0',
`daily_respect_points` int(11) NOT NULL default '3',
`daily_pet_respect_points` int(11) NOT NULL default '3',
`newbie_status` int(11) NOT NULL default '0',
`is_muted` enum('0','1') NOT NULL default '0',
`mutant_penalty` enum('0','1','2') NOT NULL default '0',
`mutant_penalty_expire` int(11) NOT NULL default '0',
`block_newfriends` enum('0','1') NOT NULL default '0',
`bb_ball` enum('y','b','g','r') NOT NULL default 'y',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2709 ;
-
Re: Battle Banzai Gate Code
didnt worked -.- i insertet at the table users the bb_ball table,insertet furni,catalog page,catalog items , insertet code for m uberemu,debuged , tested didnt worked ... the furnis wworked exept the scoreboard
(its invisible) and if i walk through the gate than didnt appear the effect.
i use my own hosted swfs and yes i placed the swf furnis in the right folder
what to do now ?? help me please
-
Re: Battle Banzai Gate Code
the code would be better if it used variables instead of saving them in the database.