Walk as alot of animals - Phoenix
Hey I'm back :blink:.
DarioCat posted a thread with the cat walk but the code was not perfect (I still respect him for the idea tho).
Ok.. Lets start with the ":allanimals" code. Its like the commands code but the sendnotif is not ("message",2) you can edit that if you want tooooo (the style).
Go to Roommanager.cs and add:
PHP Code:
this.dictionary_4.Add("allanimals", 211);
And add in the same document:
PHP Code:
this.dictionary_4.Add("cat", 123);
this.dictionary_4.Add("dog", 144);
this.dictionary_4.Add("crocodile", 145);
this.dictionary_4.Add("terrier", 146);
this.dictionary_4.Add("icebear", 147);
this.dictionary_4.Add("pig", 148);
this.dictionary_4.Add("lion", 149);
this.dictionary_4.Add("rhino", 150);
this.dictionary_4.Add("spider", 151);
this.dictionary_4.Add("turtle", 152);
this.dictionary_4.Add("chicken", 153);
this.dictionary_4.Add("frog", 154);
this.dictionary_4.Add("dragon", 155);
this.dictionary_4.Add("monkey", 156);
this.dictionary_4.Add("back", 1234);
Go to ChatCommandHandler.cs and add as case:
PHP Code:
case 211: Session.SendNotif("All animal commands:" + " \r\n" + " :dog " + Environment.NewLine + " :cat " + Environment.NewLine + " :terrier " + Environment.NewLine + " :icebear " + Environment.NewLine + " :pig " + Environment.NewLine + " :lion " + Environment.NewLine + " :rhino " + Environment.NewLine + " :spider " + Environment.NewLine + " :turtle " + Environment.NewLine + " :chicken " + Environment.NewLine + " :frog " + Environment.NewLine + " :dragon " + Environment.NewLine + " :monkey " + Environment.NewLine + " (Do you wanna be normal again?) :back " + Environment.NewLine + "- Its Nilz I'm out :)");
return true;
Ok thats done...
Now we are gonna add (alot of) animal commands.
Add in ChatCommandHandler:
PHP Code:
case 123:
Session.GetHabbo().PetData = "1 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a cat! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 144:
Session.GetHabbo().PetData = "0 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a dog! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 145:
Session.GetHabbo().PetData = "2 0 #fff"; // Crocodile is buggy
Session.SendNotif("You are now a crocodile! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 146:
Session.GetHabbo().PetData = "3 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a terriër! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 147:
Session.GetHabbo().PetData = "4 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a icebear! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 148:
Session.GetHabbo().PetData = "5 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a pig! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 149:
Session.GetHabbo().PetData = "6 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a lion! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 150:
Session.GetHabbo().PetData = "7 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a rhino! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 151:
Session.GetHabbo().PetData = "8 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a spider! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 152:
Session.GetHabbo().PetData = "9 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a turtle! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 153:
Session.GetHabbo().PetData = "10 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a chicken! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 154:
Session.GetHabbo().PetData = "11 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a frog! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 155:
Session.GetHabbo().PetData = "12 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a dragon! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
case 156:
Session.GetHabbo().PetData = "14 0 #fff"; // Change this with the animal you want to
Session.SendNotif("You are now a monkey! Reload the room.");
Session.GetHabbo().method_28("Say :back to be a normal Lution again!");
return true;
Go to RoomUser.cs
Search for:
Quote:
Message5_0.AppendStringWithBreak( @class.Figure);
Replace with:
Quote:
Message5_0.AppendStringWithBreak( @class.PetData != null ? @class.PetData : @class.Figure);
Search for:
Quote:
Message5_0.AppendInt32(2);
Message5_0.AppendInt32(1);
Message5_0.AppendStringWithBreak(@class.Gender.ToLower());
Message5_0.AppendInt32(-1);
if (@class.int_0 > 0)
{
Message5_0.AppendInt32(@class.int_0);
}
else
{
Message5_0.AppendInt32(-1);
}
Message5_0.AppendInt32(-1);
Message5_0.AppendStringWithBreak("");
Message5_0.AppendInt32(@class.AchievementScore);
Replace with:
Quote:
s.PetData != null)
{
Message5_0.AppendInt32(4);
Message5_0.AppendInt32(2);
Message5_0.AppendInt32(0);
}
else
{
Message5_0.AppendInt32(2);
Message5_0.AppendInt32(1);
Message5_0.AppendStringWithBreak(@class.Gender.ToLower());
Message5_0.AppendInt32(-1);
if (@class.int_0 > 0)
{
Message5_0.AppendInt32(@class.int_0);
}
else
{
Message5_0.AppendInt32(-1);
}
Message5_0.AppendInt32(-1);
Message5_0.AppendStringWithBreak("");
Message5_0.AppendInt32(@class.AchievementScore);
}
Habbo.cs
Add:
PHP Code:
public string PetData;
Search for:
PHP Code:
public void method_26(bool bool_17, GameClient class16_1)
Now look in the void and you will see:
PHP Code:
if (class16_1.GetHabbo().Boolean_0)
Add above that:
PHP Code:
if (this.PetData == "")
Ok you can add more animals if you want to!
How does this works?
If you want to be a animal you need to use it as a command.
If you say :dog it will give you a message with "You are a dog now reload the room".
If you want to be normal again just type :back and reload the room again.
:allanimals code is a alert with al the animals in it lol.
Okay thats it for today.
Here is a screen (dutch)
http://i.imgur.com/t2fULys.png
Credits to:
- DarioCat
- Minixlo
- Nilz
- Mertphp
Re: Walk as alot of animals - Phoenix
Re: Walk as alot of animals - Phoenix
And for MercuryEmulator ? :S
Re: Walk as alot of animals - Phoenix
Can someone edit those to get it working on GTE? :/
Re: Walk as alot of animals - Phoenix
Re: Walk as alot of animals - Phoenix
Why not make one command which has a switch for the second param. If you say for example :transform cat, it'll do the cat shit, if you say :transform dog, it'll do the dog shit.
Re: Walk as alot of animals - Phoenix
Quote:
Originally Posted by
BaasHotel
Why not make one command which has a switch for the second param. If you say for example :transform cat, it'll do the cat shit, if you say :transform dog, it'll do the dog shit.
Like this?
Code:
if (Params.Length > 1)
{
Pet = Params[1];
switch (Pet.ToLower())
{
case "dog":
{
Data = "0 0 #fff";
break;
}
case "cat":
{
Data = "1 0 #fff";
break;
}
case "croc":
case "crocodile":
case "alligator":
Re: Walk as alot of animals - Phoenix
Re: Walk as alot of animals - Phoenix
Using texts table :3 Added new pets? Forgot add some pets? Just simply add them to db, without restart and edit code :ott:
Code:
int petID = -1;
string petName = "";
if (Params.Length > 1)
{
if (!int.TryParse(Params[1], out petID))
{
if (!int.TryParse(SkywaveEnvironment.smethod_1("cmd_pet_petid_" + Params[1], false), out petID))
{
petID = -1;
}
}
}
if (petID < -1)
{
Session.SendNotif("Pet ID/name was invalid!");
return true;
}
else
{
petName = SkywaveEnvironment.smethod_1("cmd_pet_petname_" + petID, false);
if (petName == "cmd_pet_petname_" + petID)
{
Session.SendNotif("Pet ID/name was invalid!");
return true;
}
}
Session.GetHabbo().PetData = petID + " 0 #fff";
Session.SendNotif("You're now a " + (!string.IsNullOrEmpty(petName) ? petName : "pet") + ". Please reload this room to apply this!");
Re: Walk as alot of animals - Phoenix
I love how thorough you were to do this. It's the small things like this that I love about servers haha. Thanks bud.
Re: Walk as alot of animals - Phoenix
Quote:
Originally Posted by
sagem57
click is impossible on the pets
Thats because you're not a real pet.
Re: Walk as alot of animals - Phoenix
Hey, I have this kind of commands since a long time and still have the bug of unclickable, someone has fixed it ?
Re: Walk as alot of animals - Phoenix
Quote:
Originally Posted by
BaasHotel
Why not make one command which has a switch for the second param. If you say for example :transform cat, it'll do the cat shit, if you say :transform dog, it'll do the dog shit.
I like the idea. I will add it soon ;).
Re: Walk as alot of animals - Phoenix
Quote:
Originally Posted by
Jonteh
Like this?
Code:
if (Params.Length > 1)
{
Pet = Params[1];
switch (Pet.ToLower())
{
case "dog":
{
Data = "0 0 #fff";
break;
}
case "cat":
{
Data = "1 0 #fff";
break;
}
case "croc":
case "crocodile":
case "alligator":
Yeah, that's exactly what I meant!
Re: Walk as alot of animals - Phoenix
Any chance of making this for Mercury emu?