ScriptUO
Official ScriptUO EasyUO Scripts => Script Snippets => Topic started by: manwinc on August 02, 2012, 07:40:09 PM
-
I think Event Sleep is probably one of the Most Underused Commands available to us.
Event Sleep will reduce the CPU usage of your Client to 0%. Anyone who has ran multiple scripts and had them lose connection knows just how much CPU this game can eat up when its left at a con loss screen or at the Login Screen. I personally Now use this Command after Con Loss to Prevent my computer from overheating. Here is the Sub I use For Instigating Sleep
Sub MWinc_Sleep
; Gosub Mwinc_Sleep (Minutes)
Namespace Push
Namespace Local I_love_Da_Boobies
set !Minutes %1
set !Sleep_Timer 60000 * !Minutes
set !Wait_Timer ( ( !Minutes * 60 * 20 ) + 40 )
Event Sleep !Sleep_Timer
Wait !Wait_Timer
Namespace Pop
Return
-
nice .. very nice...
-
Si, On a second note its also very important to stagger all logging in/ logging out..... If you don't and attempt to logout/in multiple clients simultaneously..... uhhh..... Yeah, bad idea.
-
Well hot damn. This is awesome. Thanks, and +rep!
-
Whatever You do, Do not Run a Client Swapping Saluter While you attempt to sleep a client. If you Perform an In game macro on a client that's sleeping, it will actually crash.
-
Whatever You do, Do not Run a Client Swapping Saluter While you attempt to sleep a client. If you Perform an In game macro on a client that's sleeping, it will actually crash.
I think Sleep sets the Clientthread to sleep.. So never wakue up sleeping dogs :P
-
Exactly what Crome said.
Otherwise its still an Excellent Tool for Keeping your CPU down on Logged out Clients.
I kept having crashes on some miners and Couldn't figure it out for the life of me. It was because of the Universal Saluter I was running to keep some other Scripts Logged in.
-
Exactly what Crome said.
Otherwise its still an Excellent Tool for Keeping your CPU down on Logged out Clients.
I kept having crashes on some miners and Couldn't figure it out for the life of me. It was because of the Universal Saluter I was running to keep some other Scripts Logged in.
In Stealth you just could start second Application for Saluting with own thread handling ;-)
If EUO would have Stacks and Events, i would say add commands to Stack , Push new Line execute when Thread not sleeping.
-
I have this little snippet running on my older machine to reduce CPU lot. Thx. Now where should I try your Sub. :)
if #CONTNAME = MainMenu_gump
{
event sleep 100
}