Shattered Kingdoms https://shatteredkingdoms.com/forums/ |
|
Timer Loops https://shatteredkingdoms.com/forums/viewtopic.php?f=42&t=20083 |
Page 1 of 1 |
Author: | Rennus_Dragonsbane [ Wed Mar 31, 2010 12:36 pm ] |
Post subject: | Timer Loops |
grep wrote: Don't be ashamed. Every client is different.
I don't know how I'd do that in zmud, to be honest. You'd want to... 1. make an alias 2. figure out how to implement a for function in zmud (help files!) 3. figure out how to implement a delay (then do this) function in zmud. They might call it a Timer. You might not need a for loop if you can configure a timer's number of iterations. (help files!) Go exploring, see what you can find. Exploring help files and configurations is just as fruitful as exploring Pyrathia, I believe. If this is legal, let me know and I'll post the answer in the Legal Zmud Scripts thread. |
Author: | Viltrax [ Wed Mar 31, 2010 1:53 pm ] |
Post subject: | |
A timer that alerts the user of something to do at a certain time, should be fine. A timer that sends something to the MUD at a later date, is very probably not fine. --- The code grep posted, I believe is used for two main aims: 1. rate-limit commands being sent to the mud by a user (so they aren't disconnected) 2. batch a group of commands being sent to the MUD (repetition). Rather than using a timer to automate the command-sending, I'd encourage using the very easy repetition command and doing the work in blocks. Something like: Code: #ALIAS BATCH {
#VAR command {"give berry fred"} #VAR batch-counter {10} #IF (@item-count < 1) { #SAY None left. } #IF (@item-count < 10) {#VAR batch-counter @item-count} #@batch-counter @command #ADD @item-count {-@batch-counter} } (just off the top of my head - I didn't use zmud to verify the syntax above) |
Author: | Rennus_Dragonsbane [ Wed Mar 31, 2010 6:23 pm ] |
Post subject: | |
I don't see anything in grep's psudeo code that limits inputs (however thats a good idea) only preforms a loop and a timer. The code for which would be: Code: #10 {give berry fred;#wait 10000} which would result in 10 iterations of the two commands in the {} separated by the ;
#wait 10000 |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |