SphereCommunity
Pet level system - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Pet level system (/Thread-Pet-level-system)



Pet level system - Van Glan Bloom - 04-05-2014 08:00 PM

Hi

I created a system to evolve pets, but right now I'm having a little problem,in "ismypet" command or event.
Even if the pet is owned by a player, he can't start training.

I have this :

Code:
ON=@TARGON_CHAR
if (<src.targ.distance> > 3)
        src.sysmessage @09c1 You are unable to reach the creature.
            return 1
elseif (<src.targ.body>==c_man) || (<src.targ.body>==c_woman) || (<src.targ.npc>==0)
        src.sysmessage @09c1 You can not training another human!
            return 1
elseif ( <src.targ.flags> & statf_conjured )
        src.sysmessage @09c1 You can not training summoned animals!
            return 1
elseif (<src.targ.ismypet>)
        src.sysmessage @09c1 The animal must be loyal to you!
            return 1
elseif (<src.targ.events>==e_pet_level_system)
        src.sysmessage @09c1 The training is already in progress.
            return 1
else
    src.targ.events=-e_no_pet_level_system
        src.targ.tag.level=0
            src.targ.tag.experience=0
                src.targ.events=+e_pet_level_system
            src.consume 1 i_pet_level_system
        src.sysmessage @09c1 Now you can training your pet.
    endif
return 1

where I am going wrong?


RE: Pet level system - Ben - 04-05-2014 10:33 PM

try
elseif (!<src.targ.ismypet>)


RE: Pet level system - Van Glan Bloom - 04-07-2014 04:56 AM

Is working, thx Ben