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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
JustMe
Newbie


Joined: 16 May 2002
Posts: 8
Location: Estonia

PostPosted: Mon Apr 15, 2002 6:01 am   

#ad trigger
 
Newbie here so be easy on me.

Trying to create a trigger to create a variable and keep add of number of times it triggers.

* You think your %1 skill has improved. *

Where %1 could be any number of skills.

#ad %1 1

works for skills that have 1 word in them, but in skills with 2 words like attack speed it just creates the variable attack and puts speed in the value box instead of adding 1.

I tried playing with the {} and () but it doesnt seem to work. Using 6.26a.

Thanks.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Apr 15, 2002 9:02 am   
 
There are ways to handle variables with
spaces but I tend to forget which ones do
and which ones don't as I zscript on the
fly. For things like that I usually will
do:


* You think your %1 skill has improved. *

#ad %replace("%1"," ","_") 1

So say skill "dual wield" will become
tracked by the variable dual_wield



Ton Diening
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Apr 15, 2002 9:31 am   
 
After reading mosiah's from where you got
that I'll modify it for the skills with '

* You think your %1 skill has improved. *

#ad %replace(%replace("%1"," ","_"),"'","_") 1

So skill botter's death would
be tracked as botter_s_death




Ton Diening
Reply with quote
JustMe
Newbie


Joined: 16 May 2002
Posts: 8
Location: Estonia

PostPosted: Mon Apr 15, 2002 10:16 am   
 
works perfectly! big hugs to TonDiening for adding newflavor to my dartmud world. :)

Thank you, Yog.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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