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
killer78
Beginner


Joined: 23 Mar 2005
Posts: 15

PostPosted: Mon Mar 28, 2005 10:47 pm   

Not sure how to improve this triggers
 
I got a trigger on my spellcasters to cast spell on my fellow clan members if they ask for one below is a short version of it.
#CLASS {clan spells}
#VAR clan {Judas|Smartie|Killer}
#VAR self {doc}
#TRIGGER {(%x) says, '@self heal'} {#IF (%ismember( %lower( "%1"), %lower( @clan))) {cast 'heal' %1}}
#TRIGGER {(%x) says, '@self sanc'} {#IF (%ismember( %lower( "%1"), %lower( @clan))) {cast 'sanc' %1}}
#TRIGGER {(%x) says, '@self bless'} {#IF (%ismember( %lower( "%1"), %lower( @clan))) {cast 'bless' %1}}
#CLASS 0
What i would like here is to cut down the amount of triggers in this class to 1 instead of the 3 current ones and want something like this
#VAR spellup {sanc|bless|heal}
#TRIGGER {(%x) says, '@self @spellup'} {#IF (%ismember( %lower( "%1"), %lower( @GM))) {cast '@spellup' %1}}
This one was meant to combine the 3 triggers above so i would cast the spellup %1 asked for if it was in @spellup
the last trigger offcourse dont work but is there any way to tweak it into doing what i try to?
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Tue Mar 29, 2005 12:06 am   
 
#TRIGGER {(%x) says, '@self ({@spellup})'} {#IF (%ismember( %lower( "%1"), %lower( @GM))) {cast '%2' %1}}
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Hazmeech
Novice


Joined: 27 Mar 2005
Posts: 31

PostPosted: Tue Mar 29, 2005 12:08 am   
 
#CLASS {testdoc}
#VAR clan {Judas|Smartie|Killer}
#TRIGGER {(%w) says, (%w) (%w).$} {#IF %ismember( %1, @clan) {#IF (%lower( %2) = doc) {cast ~'%3~' %1}}}
#CLASS 0
Reply with quote
Hazmeech
Novice


Joined: 27 Mar 2005
Posts: 31

PostPosted: Tue Mar 29, 2005 12:54 am   
 
or this one
#TRIGGER {(%x) says, '(%w) (%w)'} {#IF %ismember( %1, @clan) {#IF (%lower( %2) = %lower(@self)) {cast ~'%3~' %1}}}
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Tue Mar 29, 2005 1:06 am   
 
#VAR clan {Judas|Smartie|Killer}
#VAR spellup {sanc|bless|heal}
#TRIGGER {^{@Clan} says, '({@Spellup}) (%x)'} {cast ~'%1~' %2}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Hazmeech
Novice


Joined: 27 Mar 2005
Posts: 31

PostPosted: Tue Mar 29, 2005 1:24 am   
 
new technique for me there
If someonething comes up like: Judas says, 'doc bless'
then it would be this way that I just learned thanks to Nexela

#TRIGGER {^({@Clan}) says, '{@self} ({@Spellup})'} {cast ~'%2~' %1}
Reply with quote
killer78
Beginner


Joined: 23 Mar 2005
Posts: 15

PostPosted: Tue Mar 29, 2005 6:12 pm   
 
Just what i was looking for thx alot :)
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