Tailean

Member
[RUNUO 2.6] So I downloaded this Paragon Deed from Servuo that if used on a base creature turns it into a paragon. My question is about the following code:
Code:
Expand Collapse Copy
        protected override void OnTarget(Mobile from, object target)
        {
            if (target is BaseCreature)
            {
                BaseCreature p = (BaseCreature)target;

                if (p.ControlMaster != null)
                {
                    from.SendMessage("That is a pet belonging to someone else!");
                }
                else if (p.Tamable == false)
                {
                    from.SendMessage("That creature cannot turn into a paragon!");
                }
                else
                {
                    p.IsParagon = true;
                    from.SendMessage("Your target has evolved into a paragon version of itself.");

                    if (m_Deed != null)
                    {
                        m_Deed.Delete(); // Delete the deed
                    }
                    if (IsParagon == true)
                    {
                        // To Do - Refresh HP/Stam/Mana
                    }
                }

            }
            else
            {
                from.SendMessage("That is not a valid target.");
            }
        }

What I want to do is make it so you can use this deed just on some creatures so can I take this part of the code:
Code:
Expand Collapse Copy
 if (target is BaseCreature)
            {
                BaseCreature p = (BaseCreature)target;

and do this:
Code:
Expand Collapse Copy
 if (target is BaseCreature)
            {
                BaseCreature p = (Dragon, Slim, Rat)target;

and so on..will this work? Or am I missing something.
 
Last edited:
Well yea that wouldnt work, since you can not put more casts into one bracket.

Also I think the deed didnt actually work since it checked if the pet was belongong to somone, including the player and blocked it.
I also added the refresh part in.

So yea the pets there are just an example, you can add all creatures you want to it.
 

Attachments

So, Will this make only the [typeof(Dog), typeof(Dragon), typeof(Drake), typeof(Slime), typeof(Rat)] paragons? I dont want anything thats not listed to be able to turn paragon.
 

Donations

Total amount
$50.00
Goal
$500.00

Shards

Back