Shattered Kingdoms

Where Roleplay and Tactics Collide
VOTE NOW!
It is currently Thu Mar 28, 2024 10:57 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Timer Loops
PostPosted: Wed Mar 31, 2010 12:36 pm 
Offline
Mortal

Joined: Thu Feb 28, 2002 4:00 pm
Posts: 677
Location: The great white north
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Mar 31, 2010 1:53 pm 
Offline
Webadmin

Joined: Thu Feb 28, 2002 4:00 pm
Posts: 2732
Location: Australia
SK Character: Viltrax
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)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Mar 31, 2010 6:23 pm 
Offline
Mortal

Joined: Thu Feb 28, 2002 4:00 pm
Posts: 677
Location: The great white north
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 ;
    give berry fred
    #wait 10000
and #wait is the number of milliseconds of delay (10 full seconds)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 7 guests


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

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group