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
Let pets trigger @petdesert
Author Message
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #1
Let pets trigger @petdesert
I need to let my pet triggers @petdesert, i've tried in this way:

PHP Code:
// ARGN1 stores the pet UID
// REF1 stores the pet's owner UID

IF (<serv.uid.<ARGN1>.ischar> == 1)
        IF (<
serv.uid.<ARGN1>.owner> == <REF1>) 
            IF (<
serv.uid.<ARGN1>.distance <REF1>> > )
                
serv.uid.<ARGN1>.TRIGGER @PETDESERT
            
ELSE
                
REF1.sysmessage blablabla
            
ENDIF
        ELSE
            
REF1.sysmessage blablabla
        
ENDIF
    ELSE
        
REF1.sysmessage blablabla
    
ENDIF 

It doesn't work.
Any suggestion?
(This post was last modified: 02-21-2013 12:00 PM by Rizz.)
02-21-2013 11:59 AM
Find all posts by this user Like Post Quote this message in a reply
BladeCraft
Apprentice
*

Posts: 42
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 2



Post: #2
RE: Let pets trigger @petdesert
Yea, add serv.b messages after every line and find out where it is not working how you think it should. Then you know where the problem is Smile.

serv.b Start Test 1
IF (<serv.uid.<ARGN1>.ischar> == 1)
serv.b Test 2 (<serv.uid.<ARGN1>.ischar> == 1)
IF (<serv.uid.<ARGN1>.owner> == <REF1>)
serv.b Test 3 (<serv.uid.<ARGN1>.owner> == <REF1>)
IF (<serv.uid.<ARGN1>.distance <REF1>> > 3 )
serv.uid.<ARGN1>.TRIGGER @PETDESERT
serv.b Test 4 (<serv.uid.<ARGN1>.distance <REF1>> > 3 )
ELSE
REF1.sysmessage blablabla
serv.b Test 5
ENDIF
ELSE
REF1.sysmessage blablabla
serv.b Test 6
ENDIF
ELSE
REF1.sysmessage blablabla
serv.b Test 7
ENDIF

That is the best suggestion we can give because your problem could be a number of things including where you set argn1 and REF1 which is not provided.
(This post was last modified: 02-21-2013 12:29 PM by BladeCraft.)
02-21-2013 12:28 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #3
RE: Let pets trigger @petdesert
Weird, did you define the trigger @PetDesert ?
02-21-2013 07:24 PM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #4
RE: Let pets trigger @petdesert
(02-21-2013 12:28 PM)BladeCraft Wrote:  Yea, add serv.b messages after every line and find out where it is not working how you think it should. Then you know where the problem is Smile.

serv.b Start Test 1
IF (<serv.uid.<ARGN1>.ischar> == 1)
serv.b Test 2 (<serv.uid.<ARGN1>.ischar> == 1)
IF (<serv.uid.<ARGN1>.owner> == <REF1>)
serv.b Test 3 (<serv.uid.<ARGN1>.owner> == <REF1>)
IF (<serv.uid.<ARGN1>.distance <REF1>> > 3 )
serv.uid.<ARGN1>.TRIGGER @PETDESERT
serv.b Test 4 (<serv.uid.<ARGN1>.distance <REF1>> > 3 )
ELSE
REF1.sysmessage blablabla
serv.b Test 5
ENDIF
ELSE
REF1.sysmessage blablabla
serv.b Test 6
ENDIF
ELSE
REF1.sysmessage blablabla
serv.b Test 7
ENDIF

That is the best suggestion we can give because your problem could be a number of things including where you set argn1 and REF1 which is not provided.

But everything works except

serv.uid.<ARGN1>.TRIGGER @PETDESERT

But i will try to check out again.

ps. ARGN1 comes from a function like:

.cav <argn1>

(02-21-2013 07:24 PM)darksun84 Wrote:  Weird, did you define the trigger @PetDesert ?

What do you mean?
That trigger is a standard trigger and i use in the taming script
(This post was last modified: 02-21-2013 08:59 PM by Rizz.)
02-21-2013 08:57 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: Let pets trigger @petdesert
Yes, i mean if the creature that calls TRIGGER has installed the event that contains @PetDesert
02-21-2013 09:41 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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