Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
hpoonis2010
Wanderer


Joined: 18 Jun 2019
Posts: 86

PostPosted: Wed May 20, 2020 7:22 pm   

Triggers again
 
I have a trigger:-

Code:
#TR {^%n,(*),%n,%n,%n,%n,(%d)$} {

#SWITCH (%2)
  (1) {#T- "%1"}
 
  (2) {#T- "%1"}
}

that operates on lines similar to:

Code:
258,accelerate,3,0,0,-1,1
320,acid stream,1,0,0,-1,1
83,acid wave,1,0,0,-1,1
200,acidic touch,1,0,0,-1,1
249,acidproof,2,0,0,-1,1
97,adrenaline control,3,0,0,-1,1
496,aggrandize,0,0,0,-1,2
98,agitation,1,0,0,-1,1
155,aid,2,1070,87,-1,1
338,aim,1,0,85,-1,2
465,air dart,1,0,0,-1,1
592,air skewer,1,0,0,-1,1



Do I need to delimit the %1 in the #T- command? I am asking as I can deactivate a class via the window command line, such as:

#T- "acid wave"

and the class is turned off. It does not matter that the class path is actually

/char/CHSpells/ACID_SP/acid blast

It works fine for any skill or spell. The class command inside the trigger is not fully functional, only certain classes are being acted upon even though the trigger is working on every line. I originally had an echo before the #T- which gave me:-

Code:
3,acid blast,1,0,0,-1,1
acid blast Closed
317,absorb,2,0,88,-1,1
absorb Closed
404,abomination,1,0,0,-1,1
abomination Closed
258,accelerate,3,0,0,-1,1
accelerate Closed
320,acid stream,1,0,0,-1,1
acid stream Closed
83,acid wave,1,0,0,-1,1
acid wave Closed
200,acidic touch,1,0,0,-1,1
acidic touch Closed
249,acidproof,2,0,0,-1,1
acidproof Closed
97,adrenaline control,3,0,0,-1,1
adrenaline control Closed
496,aggrandize,0,0,0,-1,2
aggrandize Closed
98,agitation,1,0,0,-1,1
agitation Closed
155,aid,2,0,87,-1,1
aid Closed
338,aim,1,0,85,-1,2
aim Closed
465,air dart,1,0,0,-1,1
air dart Closed
592,air skewer,1,0,0,-1,1
air skewer Closed


So I know that the trigger is firing.
Reply with quote
hpoonis2010
Wanderer


Joined: 18 Jun 2019
Posts: 86

PostPosted: Wed May 20, 2020 10:54 pm   
 
Update:

Seems that the problem lay with me using %d instead of %n for the digits, notably those which are negative.

After this, and many trials and tribulations, it was still not working. The problem sits with me using #T+ %1. This, it seems is no good. So I tried:

#LOCAL tempstr %1;#T+ $tempstr

but that would have been easy. No, that didn't work either. Although, #ECHO $tempstr produces results that look great, #T+ dislikes a temp variable.

In the end, I had to use a #VAR.

CMUD documentation is sadly inadequate. I'll have to wait for the updated version. Oh yeah, that's right.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4156
Location: Pensacola, FL, USA

PostPosted: Wed May 20, 2020 11:37 pm   
 
Try this pattern:

#TR {^{%n|%d},(*),{%n|%d},{%n|%d},{%n|%d},{%n|%d},({%n|%d})$}
_________________
Discord: Shalimar#3679
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net