home | register | login | messages | profile | search
 
 

SharpPlay Forum Index -> WoW Macros, Programs and Scripts

ANTI AFK: Simple anti AFK script


Post new topic   Reply to topic
  Author    Thread
Elzar



Joined: 01 Feb 2006
Posts: 41


Back to top
PostPosted: Wed Feb 01, 2006 5:58 pm    Post subject: ANTI AFK: Simple anti AFK script ( No rating [Rate] )
Reply with quote

open notepad and paste this in... - then save it to c:\blah.vbs

'-----------------
intHighNumber = 30
intLowNumber = 15
x = 0
wow="World of Warcraft"

Set ws = WScript.CreateObject("Wscript.Shell")
ws.AppActivate wow
buff_timer1=Timer
While x < 100
Randomize
y = Int((intHighNumber - intLowNumber + 1) * Rnd + intLowNumber)
ws.AppActivate wow
ws.Sendkeys ("1")
' x = x+1
buff_timer2=Timer
If buff_timer2-buff_timer1 >= 1500 Then
ws.AppActivate wow
ws.SendKeys("2")
Else
WScript.Echo(buff_timer2-buff_timer1)
End If
WScript.Sleep(y*1000)
Wend
'--------------------

After that, make two macros on buttons 1 and 2 that do something, /sit or /burp or cast buffs or something. The above will push '1' at a random interval every 15 to 30 seconds (adjust those top to values if you want to change the range that it pushes 1), and it will push "2" ever 1500 seconds give or take (25 minutes)

after you've done the above, goto a command prompt and type "wscript //H:CScript"

then just run the script

c:\blah.vbs (from the command prompt again)

what you will get is a console output that tells you how many seconds it waited between pushing the last "1" or "2" you can break the script by hitting CTRL-C (i.e. when yer ready to enter the BG)

NOTE: if you do not enter the "wscript //H:CScript" command you will end up operating under the "windows scripting host" rather than the Command scripting host and it will throw up a Message Box making you push OK every time. using Cscript it will just echo to the same console window you launched the VB script from and allow you to CTRL-C break it.

Google
Sponsor







Back to top
PostPosted: Wed Feb 01, 2006 5:58 pm    Post subject: Advertisement ( )


dazlidd



Joined: 05 Jul 2007
Posts: 1


Back to top
PostPosted: Thu Jul 05, 2007 2:27 am    Post subject: ( No rating [Rate] )
Reply with quote

Now if I wanted to modify this script to hit the Right Click button every so often. Then what string would I need to enter? I took the section that says ws.SendKeys("1") and tried to change it to ws.SendKeys("{RightMouseButton") but that is the wrong syntax. What should I put?

  Display posts from previous:      



Jump to:  


Post new topic   Reply to topic
Page 1 of 1


Forum Rules:
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
 


Site and Contents Copyright 2005-2006 SharpPlay All Rights Reserved.
SharpPlay is not affiliated with any gaming company.
SharpPlay does not take credit for any images that are related to any games posted.
SharpPlay posts information only for intellectual information.
If you enter this site and are apart of any gaming releated company please leave.
contact@shapplay.com