Jump to content

Help with my script


Recommended Posts

I've been experimenting with a script that would reduce the amount of clicking in this game I play by autoing the combat. This is not exactly botting, as I must be at the computer in order for it to continue running. Anyway, everything works fine up until it goes to fight, then nothing happens. It doesn't click the link, and the index for the links are both correct. Can anyone possibly revise this script? For help, the website is www.war2.netnexus.com, and I can give you a dummy account to log into the game and look at the combat system and such to help, just message me. Basically I'm trying to have it click attack or whatever until the monster is dead. When the monster dies, the leave battlefield link will appear, and I want the script to click it. This is becoming very stressful, and I'm sure this is a very simple process. I'm new to scripting, just trying to learn as I go.

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.2.10.0

Author: Matt

Script Function:

Click-Free Combat in WaR2

#ce ----------------------------------------------------------------------------

Global $Paused

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

#include <IE.au3>

$oIE = _IECreate ("http://war2.netnexus.com")

Sleep(15000)

_IENavigate ($oIE, "http://war2.netnexus.com/game/index.php?action=battle")

sleep (50)

While 1 = 1

Do

_IELinkClickByIndex ($oIE, 237 )

Until @error

_IELinkClickByIndex ($oIE, 158 )

WEnd

sleep (50)

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Func ShowMessage()

MsgBox(4096,"","This is a message.")

EndFunc

Edited by Matticus
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...