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
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Fri Nov 30, 2001 9:53 pm   

script debugging
 
can someone help me debug this script, its giving me a real headache


#class cityguard_kill
#tr {~[Midgaard]} {stepwork = 1}
#TR {A cityguard stands here.$} {back cit;c hellfire cit}
#class 0
#VAR midgaardpath {"emote screams, "Lets kill some cityguards!" while shaking his fists."|"s"|"w"|"w"|"w"|"n"|"e"|"e"|"e"|"e"|"e"|"s"|"w"|"s"|"n"|"e"|"s"|"n"|"u"|"d"|"n"|"e"|"n"|"s"|"e"|"n"|"n"|"w"|"w"|"w"|"w"|"e"|"e"|"e"|"e"|"s"|"s"|"s"|"s"|"w"|"n"|"s"|"s"|"n"|"w"|"s"|"n"|"n"|"s"|"w"|"w"|"n"|"s"|"s"|"n"|"w"|"s"|"n"|"n"|"s"|"w"|"n"|"s"|"s"|"s"|"e"|"n"|"s"|"s"|"n"|"e"|"s"|"n"|"n"|"s"|"e"|"e"|"n"|"s"|"s"|"n"|"e"|"s"|"n"|"n"|"s"|"s"|"n"|"e"|"s"|"n"|"n"|"s"|"e"|"s"|"s"|"s"|"w"|"n"|"s"|"s"|"e"|"e"|"e"|"s"|"w"|"w"|"w"|"s"|"s"|"e"|"n"|"s"|"w"|"w"|"s"|"n"|"w"|"w"|"n"|"n"|"n"|"e"|"s"|"s"|"e"|"e"|"n"|"e"|"e"|"s"|"w"|"e"|"e"|"e"|"e"|"e"|"w"|"w"|"n"|"e"|"e"|"w"|"w"|"n"|"e"|"w"|"w"|"s"|"s"|"w"|"s"|"w"|"w"|"s"|"s"|"e"|"s"|"w"|"s"|"s"}
#alias cityguardkill {
wimpy 900
#while (@level < 59) {
recallnew
healup
recallmid
north
#while (@stepwork = 0) {#wait 250}
step = 1
stepwork = 0
#t+ cityguard_kill
#while (@step < 162 and @currenthp > 900) {
#exec %item(@midgaardpath,@step)
#if (@step = 1) {stepwork = 1}
#while (@stepwork = 0) {
#wait 250
}
stepwork = 0
#add step 1
#wait 1000
#while (@battleon) {
cir
#IF (%eval( 100*@currenthp/@maxhp) < 75) {c great} {#if (%eval( 100*@currentmana/@maxmana) < 85) {@manaspell} {c hellfire}}
#WAIT 3750
}
}
#t- cityguard_kill
}
}


recallnew and recallmid are alias' to take me
to different rooms. healup is also an aias.
everything works fine until my hp drops
below 900, or @step exceeds 163.
if my hitpoints are below 900, the loop in
red doesnt terminate. if @step exceeds 163
then the whole alias terminates, when what i
want to happen if either of these conditions
are met is to have the alias return execution
to the loop in blue. other than this everything
works fine.
Thanks,
Emit
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Fri Nov 30, 2001 11:38 pm   
 
quote:

when what i
want to happen if either of these conditions
are met is to have the alias return execution
to the loop in blue.



Try putting each while in a separate alias. Then when the
while equates to false, have the command to run a previous alias.

Caled
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Fri Nov 30, 2001 11:52 pm   
 
ah, beautiful. , that sure did the trick allright. thanks :)
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