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


Joined: 28 Jun 2002
Posts: 15
Location: USA

PostPosted: Fri Jun 28, 2002 5:55 am   

Help - Recasting failed spells w/ Triggers
 
Ok I read the below "General Spellup" question but didnt see any help so... I have been trying to figure out how to recast a spell if i failed the initial cast. What I have thus far: I have 'a' variable called "spell", all spells are individually aliased (i.e.: cae = #VAR spell {c 'armor' %1};c 'armor' %1;#WAIT 4000 *next alias* cbl = #VAR spell {c 'bless' %1};c 'bless' %1;#WAIT 4000..etc), and 7 triggers (for the various ways a spell (in text on the mud) can fail) and their value is @spell. The problem I am having is I have a cleric who bots large groups so I get spammed so the variable @spell gets changed before the actual spell is cast (i.e.: n1 says 'earmor'. {trigger starts to fire - @spell= c 'armor' n1),*next person* n2 says 'ebless' (next trigger starts to fire - @spell= c 'bless' n2) first persons spell casts and fizzles but it trys to recast bless (because the variable got changed to quickly) instead of what actually fizzled (armor)... I'd really appreciate any help on this especially if there is an easier way to do this:) thanks in advance!!

-=Psyrex=-
Reply with quote
Psyrex
Beginner


Joined: 28 Jun 2002
Posts: 15
Location: USA

PostPosted: Sat Jun 29, 2002 11:59 am   
 
Well i thought I had a solution but i failed yet again. If anyone has a solution plz let me know, if you need more info plz let me know.

-=Psyrex=-
Reply with quote
Cyrn
Beginner


Joined: 01 Dec 2000
Posts: 17
Location: USA

PostPosted: Sat Jun 29, 2002 4:14 pm   
 
Use lists instead of just a single variable. When someone triggers a spell, add "cast 'armor' bob" to the list (for example--maybe you will just want to add 'armor' depending on how you do it). Then when the spell fails, just repeat the last item in the list. When it succeeds, remove it from the list. You could probably modify my autospellup script to suit your purposes fairly easily.

-Cyrn
Reply with quote
Psyrex
Beginner


Joined: 28 Jun 2002
Posts: 15
Location: USA

PostPosted: Sat Jun 29, 2002 8:07 pm   
 
Heya Cyrn :)..Well how would you suggest I do that, meaning I'm already using your spellup to cast spells on me so how would I set it up for other people? Would I have to create a whole new class for other people, or can I use what I have already? Oh, that last line that trigger on the racial stats, my mud doesn't have that line or anything like it so what would I base my forth trigger on?

-=Psyrex=-
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