Openkore.com

OpenKore Forums
It is currently 14 Aug 2018, 14:09

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: How do I add a wait time to a plugin?
PostPosted: 17 Dec 2012, 20:57 
Offline
Human
Human

Joined: 24 Apr 2008, 16:15
Posts: 38
I don't know anything about the plugins(not that I haven't tried to use them...just I don't understand it). How would I add a wait time before the plugin initializes? I'm trying to add a 15 second wait time to cmdOnLogin before it does the commands.


Top
 Profile  
 
 Post subject: Re: How do I add a wait time to a plugin?
PostPosted: 17 Dec 2012, 20:58 
Offline
Plain Yogurt
Plain Yogurt

Joined: 12 Nov 2012, 09:22
Posts: 61
sleep(15);


Top
 Profile  
 
 Post subject: Re: How do I add a wait time to a plugin?
PostPosted: 17 Dec 2012, 21:07 
Offline
Human
Human

Joined: 24 Apr 2008, 16:15
Posts: 38
Where on the plugin do I put it? I tried placing it in a few places and it made Openkore freeze for 15 seconds before the login.
Also would I be able to change it from on login to on login and respawn?


Top
 Profile  
 
 Post subject: Re: How do I add a wait time to a plugin?
PostPosted: 18 Dec 2012, 04:34 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
sleep() is not a good idea because it would stop everything.

Spawning Task::Timeout with your function should do, like in Actor::setStatus.


Top
 Profile  
 
 Post subject: Re: How do I add a wait time to a plugin?
PostPosted: 18 Dec 2012, 10:05 
Offline
Human
Human

Joined: 24 Apr 2008, 16:15
Posts: 38
Sure....nevermind I don't need the help....aparently you get warnings for asking for help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

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