Jump to content

AOE II Bot


HypercamJ
 Share

Recommended Posts

Just decided to throw this out here. It's a script I recently made for a PC game called Age of Empires II [or III] that automates cheat input :) . The commands are Ctrl+Shift+F/G/W/S/C. The script functions are self-explanatory. Enjoy!

CODE

Global $foodam

Global $goldam

Global $stoneam

Global $woodam

Opt("SendKeyDelay", 2)

HotKeySet("^F", "_food")

HotKeySet("^G", "_gold")

HotKeySet("^W", "_wood")

HotKeySet("^S", "_stone")

HotKeySet("^C", "_cobra")

While 1

Sleep(500)

WEnd

Func _food() ;1000 food

Do

$foodam += 1

send("{ENTER}")

sleep(200)

Send("cheese steak jimmy's")

sleep(200)

send("{ENTER}")

sleep(200)

Until $foodam = 10

Global $foodam = 0

EndFunc

Func _gold() ;1000 gold

Do

$goldam += 1

send("{ENTER}")

sleep(200)

Send("robin hood")

sleep(200)

send("{ENTER}")

sleep(200)

Until $goldam = 10

Global $goldam = 0

EndFunc

Func _wood() ;1000 wood

Do

$woodam += 1

send("{ENTER}")

sleep(200)

Send("lumberjack")

sleep(200)

send("{ENTER}")

sleep(200)

Until $woodam = 10

Global $woodam = 0

EndFunc

Func _stone() ;1000 stone

Do

$stoneam += 1

send("{ENTER}")

sleep(200)

Send("rock on")

sleep(200)

send("{ENTER}")

sleep(200)

Until $stoneam = 10

Global $stoneam = 0

EndFunc

Func _cobra() ;Cobra car w/ machine guns

Do

$cobraam += 1

send("{ENTER}")

sleep(200)

Send("how do you turn this on")

sleep(200)

send("{ENTER}")

sleep(200)

Until $cobraam = 20

Global $cobraam = 0

EndFunc

Prove, and I will believe...
Link to comment
Share on other sites

Mine's even faster :)

HotKeySet("{F7}", "_Wood")
HotKeySet("{F8}", "_Food")
HotKeySet("{F9}", "_Gold")
HotKeySet("{F10}", "_Stone")
HotKeySet("{F11}", "_All")
HotKeySet("{ESC}", "_Exit")
Global $Max = InputBox("", "How many times for each cheat?", 10, "", 100, 120)

While 1
    Sleep(1000)
WEnd

Func _Wood()
    $Get = WinGetTitle("Age")
    If Not WinActive($Get) Then WinActivate($Get)
        WinWait($Get)
    $Num = 0
    Do
        ClipPut("lumberjack")
        ControlSend($Get, "", "", "{ENTER}")
        Sleep(10)
        ControlSend($Get, "", "", "^v")
        Sleep(10)
        ControlSend($Get, "", "", "{ENTER}")
        $Num += 1
    Until $Num = $Max
EndFunc

Func _Food()
    $Get = WinGetTitle("Age")
    If Not WinActive($Get) Then WinActivate($Get)
        WinWait($Get)
    $Num = 0
    Do
        ClipPut("cheese steak jimmy's")
        ControlSend($Get, "", "", "{ENTER}")
        Sleep(10)
        ControlSend($Get, "", "", "^v")
        Sleep(10)
        ControlSend($Get, "", "", "{ENTER}")
        $Num += 1
    Until $Num = $Max
EndFunc

Func _Gold()
    $Get = WinGetTitle("Age")
    If Not WinActive($Get) Then WinActivate($Get)
        WinWait($Get)
    $Num = 0
    Do
        ClipPut("robin hood")
        ControlSend($Get, "", "", "{ENTER}")
        Sleep(10)
        ControlSend($Get, "", "", "^v")
        Sleep(10)
        ControlSend($Get, "", "", "{ENTER}")
        $Num += 1
    Until $Num = $Max
EndFunc

Func _Stone()
    $Get = WinGetTitle("Age")
    If Not WinActive($Get) Then WinActivate($Get)
        WinWait($Get)
    $Num = 0
    Do
        ClipPut("rock on")
        ControlSend($Get, "", "", "{ENTER}")
        Sleep(10)
        ControlSend($Get, "", "", "^v")
        Sleep(10)
        ControlSend($Get, "", "", "{ENTER}")
        $Num += 1
    Until $Num = $Max
EndFunc

Func _Exit()
    Exit
EndFunc

Func _All()
    $Get = WinGetTitle("Age")
    If Not WinActive($Get) Then WinActivate($Get)
        WinWait($Get)
    $Num = 0
    Do
        ClipPut("lumberjack")
        ControlSend($Get, "", "", "{ENTER}")
        Sleep(10)
        ControlSend($Get, "", "", "^v")
        Sleep(10)
        ControlSend($Get, "", "", "{ENTER}")
        ClipPut("cheese steak jimmy's")
        ControlSend($Get, "", "", "{ENTER}")
        Sleep(10)
        ControlSend($Get, "", "", "^v")
        Sleep(10)
        ControlSend($Get, "", "", "{ENTER}")
        ClipPut("robin hood")
        ControlSend($Get, "", "", "{ENTER}")
        Sleep(10)
        ControlSend($Get, "", "", "^v")
        Sleep(10)
        ControlSend($Get, "", "", "{ENTER}")
        ClipPut("rock on")
        ControlSend($Get, "", "", "{ENTER}")
        Sleep(10)
        ControlSend($Get, "", "", "^v")
        Sleep(10)
        ControlSend($Get, "", "", "{ENTER}")
        $Num += 1
    Until $Num = $Max
EndFunc

AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

Awwww and here i opened this thinking you made some godly bot that could actually play the game with intense AI at inhuman speeds :)

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

Awwww and here i opened this thinking you made some godly bot that could actually play the game with intense AI at inhuman speeds :lmao:

Haha! Oh you're funny :)

AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

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...