TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Sleep script

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Finished Scripts
View previous topic :: View next topic  
Author Message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Nov 18, 2007 4:13 pm    Post subject: Sleep script Reply with quote

Code:

#class sleep open

#var sleeptime 0
#var sleepcurr 0

#alias {sleep %1 %2}
{
        #format sleeptime %U;
                             
        #if {$sleeptime > $sleepcurr}
        {                           
                #math sleepcurr $sleeptime + (%1) * 1000000;
                                                           
                #delay {%1} %2;
        }                       
        {
                #math sleepcurr $sleepcurr + (%1) * 1000000;
                                                           
                #delay {($sleepcurr - $sleeptime) / 1000000.000} %2
        }                                                           
}
 
#class sleep close


Syntax: sleep <seconds to delay> {commands}

If there is already a pending sleep the delay will be stacked.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Finished Scripts All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group