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


Joined: 15 Sep 2005
Posts: 14
Location: USA-CA

PostPosted: Thu Aug 31, 2006 1:03 am   

auto spellup woes and an abstract error
 
This is my auto spell script, and I have it set to recast failed spells

Code:

#CLASS {SPELLUP}
#ALIAS spellup {#FORALL @list1 {#VAR spell_casted = 0;#WHILE (@spell_casted != 1) {#VAR spell_casted 1;cast %i;#WAIT 4000}}}
#VAR list1 {'detect evil'|'detect invis'|'detect magic'|'infravision'|'armor'|'shield'|'mental barrier'|'thought shield'
|'displacement'|'breathe water'|'intellect fortress'|'levitation
'|'enhanced strength'|'giant strength'|'might'|'adrenaline control'|'energy containment'|'cell adjustment'|'flesh armor'|'stone skin'|'haste'|'combat mind'|'ectoplasmic form'
|'inertial barrier'|'flaming shield'|'biofeedback'}
#VAR spell_casted {0} {0}
#TRIGGER {^You lost your concentration.$} {#VAR spell_casted 0} "" {disable}
#CLASS 0



It seems to vary from what I can tell, but it will go into an infinite loop displaying #VAR( on my screen. If I reconnect to the MUD, it re-enters the infinite loop. The only way it stops is if I exit zMUD itself, and then i get an abstract error window that pops up.

Any ideas?
_________________
-BArtistics
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Aug 31, 2006 10:32 am   
 
The only thing I really see is this:
{#VAR spell_casted = 0;#WHILE
should be:
{#VAR spell_casted 0;#WHILE

Your use of #WAIT is likely causing the problem. I would suggest using triggers to detect success and failure then incrementing a counter and using %item to determine spell to cast. This eliminates the #FORALL and #WHILE loops as well.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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