|
biocdkt Newbie
Joined: 08 Aug 2003 Posts: 8 Location: USA
|
Posted: Fri Aug 08, 2003 6:43 pm
script looping |
How do I keep zmud from stopping endless loops?
I have one that I want to be endless (I have a #WA in there so it doesn't get carried away). |
|
|
|
Tarn GURU
Joined: 10 Oct 2000 Posts: 873 Location: USA
|
Posted: Fri Aug 08, 2003 9:49 pm |
quote: Originally posted by biocdkt
How do I keep zmud from stopping endless loops?
I have one that I want to be endless (I have a #WA in there so it doesn't get carried away).
Do you really need an endless loop, or can you just use an alarm (#ALARM) that fires periodically?
-Tarn |
|
|
|
biocdkt Newbie
Joined: 08 Aug 2003 Posts: 8 Location: USA
|
Posted: Fri Aug 08, 2003 11:40 pm |
Some doors on the mud I play don't echo with the door name when you "bump" into them. So I am making a script that finds the door name using a brute force technique. It starts with "a" then goes to "z" then starts over with "aa" goes to "za" then starts over again at "ab" and goes to "zb" and so on and so force until it ends with "zzzzzzzzzz". Since this is an endless process zmud reads it as a looping script, sounds an alarm, and stops the script.
I'm trying to find a way so that the script isn't stopped.
BTW the first,second,etc.. in the variable are so I can "#AD 1 to the variable, then using %char(#) I can change that number to a letter. Can't put in the letter in the variable and add, but it'll just make that variable "a1" (with zmud had a #ADDLETTER cmd or something, but it doesn't, so I'm compinsating). In ascii code 97 through 123 is A through Z.
#ADDK scriptBrtFrcDoor {first=97...|tenth=97|doorStatus=closed}
#TRIGGER {Ok.$} {#ADDK scriptBrtFrcDoor {doorStatus=open}}
#ALIAS {doorBruteForce}
{#UNTIL (@scriptBrtFrcDoor.first=123 OR
@scriptBrtFrcDoor.doorStatus="open") {
open %concat ( %char( @scriptBrtFrcDoor.first), %char(
@scriptBrtFrcDoor.second))
#WA 100
#AD scriptBrtFrcDoor.first 1
}
#ADDK scriptBrtFrcDoor {first=97}
#AD scriptBrtFrcDoor.second 1
#WA 1000
#IF (@scriptBrtFrcDoor.second<124) {doorBruteForce}
This is a pretty heavy script, if you understand it, gratz :) hehe
This script here is actually limited. By what you see right here, when it hits "zz" it'll stop, and I have to add onto it for the 3rd character "aaa" through "zzz", then when that ends add another character on it [then so on and so forth]
As you can see it's a cycling ALIAS that repeats itself over and over again, until the door is successfully opened or it hits "zzzzzzzzzz".
Conclusion: Since zmud sees it as a infinite loop, it gets to "ha" I believe, and then it'll prompt the loop, and stop the ALIAS. |
|
|
|
|
|
|
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
|
|