The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pet level system
Author Message
Van Glan Bloom
Journeyman
*

Posts: 104
Likes Given: 2
Likes Received: 3 in 3 posts
Joined: Jun 2013
Reputation: 0



Post: #1
Pet level system
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?
04-05-2014 08:00 PM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #2
RE: Pet level system
try
elseif (!<src.targ.ismypet>)

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
04-05-2014 10:33 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Van Glan Bloom
Journeyman
*

Posts: 104
Likes Given: 2
Likes Received: 3 in 3 posts
Joined: Jun 2013
Reputation: 0



Post: #3
RE: Pet level system
Is working, thx Ben
(This post was last modified: 04-07-2014 04:57 AM by Van Glan Bloom.)
04-07-2014 04:56 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)