Author Topic: Event Sleep Command  (Read 7628 times)

0 Members and 1 Guest are viewing this topic.

Offline manwincTopic starter

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Event Sleep Command
« on: August 02, 2012, 07:40:09 PM »
0
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

 

Code: [Select]
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
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Event Sleep Command
« Reply #1 on: August 02, 2012, 08:02:55 PM »
0
nice .. very nice...
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline manwincTopic starter

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Event Sleep Command
« Reply #2 on: August 02, 2012, 08:21:40 PM »
0
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.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline NObama

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: Event Sleep Command
« Reply #3 on: August 05, 2012, 06:51:40 AM »
0
Well hot damn.  This is awesome.  Thanks, and +rep!

Offline manwincTopic starter

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Event Sleep Command
« Reply #4 on: July 01, 2013, 12:17:44 AM »
0
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.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Event Sleep Command
« Reply #5 on: July 01, 2013, 03:19:54 AM »
0
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

Offline manwincTopic starter

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Event Sleep Command
« Reply #6 on: July 01, 2013, 04:02:50 AM »
0
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.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Event Sleep Command
« Reply #7 on: July 01, 2013, 07:27:36 AM »
0
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.

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Event Sleep Command
« Reply #8 on: July 01, 2013, 08:41:50 AM »
0
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
}

Tags: