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


Joined: 17 Oct 2001
Posts: 371
Location: USA

PostPosted: Thu Jun 30, 2005 11:46 pm   

Power Walking Script
 
If anyone can help me with this script, I'd really appreciate it. I've got a script here that is suppose to go from BeginRoom to EndRoom. In each room it should stop and send the command POW. When sending the POW command it causes a "roundtime" of 7-15 seconds. The #SB command is a plugin command which sends the argument to a buffer. It is then executed after the roundtime has finished. I basically can't get this script to work because the #STOP command a) doesn't set the %inwalk variable to 0, and b) doesn't stop the slow walk immediately. Any hints or help would be appreciated.

#CLASS {Central Scripting|Scripts|Magic|Power Walk} {disable|setdef}
#ALIAS onroomenter {#IF (@Begin) {
#IF (%roomnum = @BeginRoom) {
#SHOW --Start Power Walk - @SecurityCode--
Begin = 0
}
} {#STOP}}
#VAR BeginRoom {663} {663}
#VAR EndRoom {1046} {1046}
#VAR WalkPath {}
#VAR Temp {0} {0}
#VAR Begin {0}
#VAR PausedWalk {1}
#VAR Index {1}
#TRIGGER {--Begin Power Walk - {@SecurityCode}--} {
Begin = 1
#If (%roomnum = @BeginRoom) {#SHOW --Start Power Walk - @SecurityCode--} {#SLOW %walk( @BeginRoom)}
Index = 1
}
#TRIGGER "PowerWalkMain" {--Start Power Walk - {@SecurityCode}--} {#SLOW %walk( @EndRoom)}
#COND {p} {#SB "POW"} {gsl}
#COND {Roundtime*} {
#IF (%roomnum = @EndRoom) {
Temp = @EndRoom
BeginRoom = @EndRoom
EndRoom = @Index
#SHOW --Evaluate Power Walk - @SecurityCode--
} {#SB "#STEP"}
#SET PowerWalkMain 2 0
#SET PowerWalkMain 1 0
#STATE PowerWalkMain 1
}
#TRIGGER {--Cleanup Power Walk - {@SecurityCode}--} {
#Loop 0,2 {#SET PowerWalkMain %i 0}
#STATE PowerWalkMain 0
#LOOP 0,1 {#SET PowerWalkEval %i 0}
#STATE PowerWalkEval 0
#NEXTMOD
}
#TRIGGER {--Evaluate Power Walk - {@SecurityCode}--} {#SB "EXP POW"}
#COND {Power Perceive~:%s%d%s%d.%d~%%s(*)} {
#IF %ismember( %trim( "%1"), @MentalSaturation) {#END} {
#SET PowerWalkMain 1 0
#SET PowerWalkMain 2 0
#STATE PowerWalkMain 1
#SLOW %walk( @EndRoom)
}
}
#CLASS 0
_________________
Belmyrddyn
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