• 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.

[UberEmu] - Much pet changes!

Status
Not open for further replies.
Experienced Elementalist
Joined
Jan 24, 2009
Messages
226
Reaction score
166
Here are much updates/fixe's for pets ;p (too lazy to made 100% pets,.. sow matty13 or whoever can do that maybe ;p)

Search into /HabboHotel/Pets/Pets.cs for:
Code:
        public int MaxEnergy
        {
            get
            {
                return 100;
            }
        }

Replace with:
Code:
        public int MaxEnergy
        {
            get
            {
                return 100 + 20 * this.Level;
            }
        }

Search for:
Code:
        public int MaxNutrition
        {
            get
            {
                return 150;
            }
        }

Replace with:
Code:
        public int MaxNutrition
        {
            get
            {
                return 100 + 20 * this.Level;
            }
        }

Search for:
Code:
        public void PetEnergy(bool Add)

Replace the WHOLE void with:
Code:
        public void PetEnergy(bool Add, int Count)
        {
            int MaxE;

            if (Add)
            {
                if (this.Energy == 100) // If Energy is 100, no point.
                {
                    return;
                }

                if (this.Energy > 85) { MaxE = this.MaxEnergy - this.Energy; } else { MaxE = 10; }

            }
            else { MaxE = 15; } // Remove Max Energy as 15

            int r = UberEnvironment.GetRandomNumber(4, MaxE);

            using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
            {
                if (!Add)
                {
                    this.Energy = this.Energy - r;

                    if (this.Energy < 0)
                    {
                        dbClient.AddParamWithValue("pid", PetId);
                        dbClient.ExecuteQuery("UPDATE user_pets SET energy = 1 WHERE id = @pid LIMIT 1");

                        this.Energy = 1;

                        r = 1;
                    }

                    dbClient.AddParamWithValue("count", Count);
                    dbClient.AddParamWithValue("petid", PetId);
                    dbClient.ExecuteQuery("UPDATE user_pets SET energy = energy - @count WHERE id = @petid LIMIT 1");

                }
                else
                {
                    dbClient.AddParamWithValue("r", r);
                    dbClient.AddParamWithValue("petid", PetId);
                    dbClient.ExecuteQuery("UPDATE user_pets SET energy = energy + @r WHERE id = @petid LIMIT 1");

                    this.Energy = this.Energy + r;
                }
            }
        }

Into /HabboHotel/RoomBots/PetBots.cs Search for:
Code:
Pet.PetData.PetEnergy(false);

Replace ALL result's with:
Code:
Pet.PetData.PetEnergy(false, 0);

Search for:
Code:
Pet.PetData.PetEnergy(true);

Replace ALL result's with:
Code:
Pet.PetData.PetEnergy(true, 0);

Search for:
Code:
            Pet.Statusses.Remove("sit");
            Pet.Statusses.Remove("lay");
            Pet.Statusses.Remove("snf");
            Pet.Statusses.Remove("eat");
            Pet.Statusses.Remove("ded");
            Pet.Statusses.Remove("jmp");

Replace with:
Code:
            Pet.Statusses.Remove("sit");
            Pet.Statusses.Remove("lay");
            Pet.Statusses.Remove("snf");
            Pet.Statusses.Remove("eat");
            Pet.Statusses.Remove("drk");
            Pet.Statusses.Remove("ded");
            Pet.Statusses.Remove("jmp");
            Pet.Statusses.Remove("flw");
            Pet.Statusses.Remove("ply");

Replace the "free" command with: (if u got him,.. else just add)
Code:
                        #region free
                        case "free":
                            if (Pet.PetData.Level >= 1)
                            {
                                RemovePetStatus();
                                int randomX = UberEnvironment.GetRandomNumber(0, GetRoom().Model.MapSizeX);
                                int randomY = UberEnvironment.GetRandomNumber(0, GetRoom().Model.MapSizeY);
                                Pet.MoveTo(randomX, randomY);
                            }
                            break;
                        #endregion

Replace the "sit" command with: (if u got him,.. else just add)
Code:
                        #region sit
                        case "sit":
                            if (Pet.PetData.Level >= 1)
                            {
                                RemovePetStatus();
                                Pet.Statusses.Add("sit", Pet.Z.ToString());
                                Pet.PetData.PetEnergy(false, 10);
                                Pet.PetData.AddExpirience(10);
                                ActionTimer = 30;
                            }
                            break;
                        #endregion

Replace the "down" command with: (if u got him,.. else just add)
Code:
                        #region down
                        case "down":
                            if (Pet.PetData.Level >= 2)
                            {
                                RemovePetStatus();
                                Pet.Statusses.Add("lay", Pet.Z.ToString());
                                Pet.PetData.PetEnergy(false, 10);
                                Pet.PetData.AddExpirience(10);
                                ActionTimer = 30;
                            }
                            break;
                        #endregion

Replace the "here" command with: (if u got him,.. else just add)
Code:
                        #region here
                        case "here":
                            RemovePetStatus();
                            int NewX = User.X;
                            int NewY = User.Y;

                            #region Rotation
                            if (User.RotBody == 4) {
                                NewY = User.Y + 1; }
                            else if (User.RotBody == 0) {
                                NewY = User.Y - 1; }
                            else if (User.RotBody == 6) {
                                NewX = User.X - 1; }
                            else if (User.RotBody == 2) {
                                NewX = User.X + 1; }
                            else if (User.RotBody == 3) {
                                NewX = User.X + 1;
                                NewY = User.Y + 1; }
                            else if (User.RotBody == 1) {
                                NewX = User.X + 1;
                                NewY = User.Y - 1; }
                            else if (User.RotBody == 7) {
                                NewX = User.X - 1;
                                NewY = User.Y - 1; }
                            else if (User.RotBody == 5) {
                                NewX = User.X - 1;
                                NewY = User.Y + 1; }
                            #endregion

                            Pet.MoveTo(NewX, NewY);
                            Pet.PetData.PetEnergy(false, 10);
                            Pet.PetData.AddExpirience(11);
                            ActionTimer = 30;
                            break;
                        #endregion

Replace the "beg" command with: (if u got him,.. else just add)
Code:
                        #region beg
                        case "beg":
                            if (Pet.PetData.Level >= 4)
                            {
                                RemovePetStatus();
                                Pet.Statusses.Add("beg", Pet.Z.ToString());
                                Pet.PetData.PetEnergy(false, 13);
                                Pet.PetData.AddExpirience(15);
                                ActionTimer = 30;
                            }
                            break;
                        #endregion

Replace the "play dead" command with: (if u got him,.. else just add)
Code:
                        #region play dead
                        case "play dead":
                            if (Pet.PetData.Level >= 5)
                            {
                                RemovePetStatus();
                                Pet.Statusses.Add("ded", Pet.Z.ToString());
                                Pet.PetData.PetEnergy(false, 20);
                                Pet.PetData.AddExpirience(20);
                                SpeechTimer = 45;
                                ActionTimer = 30;
                            }
                            break;
                        #endregion

Replace the "stay" command with: (if u got him,.. else just add)
Code:
                        #region stay
                        case "stay":
                            if (Pet.PetData.Level >= 6)
                            {
                                RemovePetStatus();
                                Pet.PetData.PetEnergy(false, 25);
                                Pet.PetData.AddExpirience(26);
                                ActionTimer = 60;
                            }
                            break;
                        #endregion

Replace the "stand" command with: (if u got him,.. else just add)
Code:
                        #region stand
                        case "stand":
                            if (Pet.PetData.Level >= 8)
                            {
                                Pet.Statusses.Remove("sit");
                                Pet.PetData.PetEnergy(false, 25);
                                Pet.PetData.AddExpirience(30);
                                ActionTimer = 60;
                            }
                            break;
                        #endregion

Replace the "jump" command with: (if u got him,.. else just add)
Code:
                        #region jump
                        case "jump":
                            if (Pet.PetData.Level >= 9)
                            {
                                RemovePetStatus();
                                Pet.Statusses.Add("jmp", Pet.Z.ToString());
                                Pet.PetData.PetEnergy(false, 30);
                                Pet.PetData.AddExpirience(35);
                                ActionTimer = 30;
                            }
                            break;
                        #endregion

Replace the "speak" command with: (if u got him,.. else just add)
Code:
                        #region speak
                        case "speak":
                            if (Pet.PetData.Level >= 10)
                            {
                                RemovePetStatus();

                                #region Pet Selecting
                                if (Pet.PetData.Type == 0)
                                {
                                    GetRoomUser().Chat(null, "Woof! Woof", false);
                                }
                                else if (Pet.PetData.Type == 1)
                                {
                                    GetRoomUser().Chat(null, "meow...meOW", false);
                                }
                                else if (Pet.PetData.Type == 2)
                                {
                                    GetRoomUser().Chat(null, "Rrrr....Grrrrrg....", false);
                                }
                                else if (Pet.PetData.Type == 3)
                                {
                                    GetRoomUser().Chat(null, "woooooooof", false);
                                }
                                else if (Pet.PetData.Type == 4)
                                {
                                    GetRoomUser().Chat(null, "Rawrrr!", false);
                                }
                                else if (Pet.PetData.Type == 5)
                                {
                                    GetRoomUser().Chat(null, "Oink Oink..", false);
                                }
                                else if (Pet.PetData.Type == 6)
                                {
                                    GetRoomUser().Chat(null, "Grrrrr.... grrrr....", false);
                                }
                                else if (Pet.PetData.Type == 7)
                                {
                                    GetRoomUser().Chat(null, "Augubuff...", false);
                                }
                                #endregion

                                Pet.PetData.PetEnergy(false, 30);
                                Pet.PetData.AddExpirience(35);
                                ActionTimer = 30;
                            }
                            break;
                        #endregion

Replace the "silent" command with: (if u got him,.. else just add)
Code:
                        #region silent
                        case "silent":
                            if (Pet.PetData.Level >= 12)
                            {
                                RemovePetStatus();
                                Pet.PetData.PetEnergy(false, 30);
                                Pet.PetData.AddExpirience(35);
                                SpeechTimer = 60;
                            }
                            break;
                        #endregion

Credits to:
-> Shorty: (Base of the pet's)
-> Kryptos: (Base of some commands/stuff)
-> Main Page - HabboWiki: (Information about pets)
-> Me (TopErwin): (Some commands/Stuff/Cleanups etz)

rate plz 0/10:thumbup1:
 
Newbie Spellweaver
Joined
Jul 28, 2009
Messages
35
Reaction score
1
Someone got a fix for the new %limit% tag Habbo is using for achievement badges?
 
Experienced Elementalist
Joined
Jan 24, 2009
Messages
226
Reaction score
166
Someone got a fix for the new %limit% tag Habbo is using for achievement badges?

it's something into ur cms,... (yeah realy)
there must be a file what uses the function "FilterParams" (look into /inc/class.tpl.php there he got that function void,... but i dunno where he loads it from,.. i think into client.php or whatever)
 
Custom Title Activated
Loyal Member
Joined
Oct 21, 2007
Messages
2,098
Reaction score
464
Nice your doing alot of good release's
 
Newbie Spellweaver
Joined
Mar 22, 2010
Messages
36
Reaction score
3
Do you need to add the commands into PetBot.cs or into another file? And where do you need to add the commands? ( I'm kinda noob with codes -.- )

EDIT:

Already found the place ;p
 
Last edited:
Skilled Illusionist
Joined
Jul 13, 2007
Messages
386
Reaction score
15
I customized it so you dont need the pet ranks.
More fun without them XD
 
Status
Not open for further replies.
Back
Top