[Fab] PetMax command!

Posts 1–9 of 9 · Page 1 of 1
[Fab] PetMax command!
This command just maxes your pet level :3 Put it in admincommands.cs
Code:
    internal class PetMaxCommand : Command
    {
        public PetMaxCommand()
            : base("petmax", 1)
        {
        }

        protected override bool Process(Player player, RealmTime time, string[] args)
        {
            Item feed = player.Manager.GameData.Items[0x9d4];
            for (int i = 0; i < 50; i++)
            {
                player.Pet.Feed(feed);
                player.Pet.UpdateCount++;
            }
            return true;
        }
    }
Useful for lazy people I guess.
Quote Originally Posted by BlackRayquaza View Post
Useful for lazy people I guess.
Yup all them complainers on my server wanted it...
Maybe a little improvement to reduce CPU usage?

1. Replace in db/IFeedable.cs
Code:
ushort FeedPower { get; set; }
with:
Code:
int FeedPower { get; set; }

2. Replace in db/data/Descriptors.cs
Code:
public ushort FeedPower { get; set; }
with:
Code:
public int FeedPower { get; set; }

3. Add your command
Code:
internal class PetMaxCommand : Command
{
    public PetMaxCommand()
        : base("petmax", 1)
    {
    }

    protected override bool Process(Player player, RealmTime time, string[] args)
    {
        if (player.Pet == null) return false;
        player.Pet.Feed(new PetFoodNomNomNom());
        player.Pet.UpdateCount++;
        return true;
    }

    private class PetFoodNomNomNom : IFeedable
    {
        public int FeedPower { get; set; }

        public PetFoodNomNomNom()
        {
            FeedPower = Int32.MaxValue;
        }
    }
}
Quote Originally Posted by ossimc82 View Post
Maybe a little improvement to reduce CPU usage?

1. Replace in db/IFeedable.cs
Code:
ushort FeedPower { get; set; }
with:
Code:
int FeedPower { get; set; }

2. Replace in db/data/Descriptors.cs
Code:
public ushort FeedPower { get; set; }
with:
Code:
public int FeedPower { get; set; }

3. Add your command
Code:
internal class PetMaxCommand : Command
{
    public PetMaxCommand()
        : base("petmax", 1)
    {
    }

    protected override bool Process(Player player, RealmTime time, string[] args)
    {
        if (player.Pet == null) return false;
        player.Pet.Feed(new PetFoodNomNomNom());
        player.Pet.UpdateCount++;
        return true;
    }

    private class PetFoodNomNomNom : IFeedable
    {
        public int FeedPower { get; set; }

        public PetFoodNomNomNom()
        {
            FeedPower = Int32.MaxValue;
        }
    }
}
still loving the name PetFoodNomNomNom have since i fist saw it
Quote Originally Posted by ossimc82 View Post
Maybe a little improvement to reduce CPU usage?

1. Replace in db/IFeedable.cs
Code:
ushort FeedPower { get; set; }
with:
Code:
int FeedPower { get; set; }

2. Replace in db/data/Descriptors.cs
Code:
public ushort FeedPower { get; set; }
with:
Code:
public int FeedPower { get; set; }

3. Add your command
Code:
internal class PetMaxCommand : Command
{
    public PetMaxCommand()
        : base("petmax", 1)
    {
    }

    protected override bool Process(Player player, RealmTime time, string[] args)
    {
        if (player.Pet == null) return false;
        player.Pet.Feed(new PetFoodNomNomNom());
        player.Pet.UpdateCount++;
        return true;
    }

    private class PetFoodNomNomNom : IFeedable
    {
        public int FeedPower { get; set; }

        public PetFoodNomNomNom()
        {
            FeedPower = Int32.MaxValue;
        }
    }
}
"PetFoodNomNomNom" lmao.
i dont have a admincommands.cs.....
Quote Originally Posted by Yul0627 View Post
i dont have a admincommands.cs.....
not sure why you bumped this. Either way, it doesnt matter which command file you put it in.
another post bumped that i didnt notice lol, i was gonna say this came with Edited FSOD source by Drake Games
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?