Sign in to follow this  
Followers 0
Abriedukas

Help 4 noob

2 posts in this topic

#1 ·  Posted (edited)

Hello all, first- sorry for my poor English. Let's start, i hawe some script. I'm trying make bot for one game. There is my script :

;=======================================================

;Credits Tomasan - Susnai - Ir kitiems sodo bendrijos nariams

;=======================================================

Global $Paused

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

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

HotKeySet("{INS}","StartScript")

while 1

ToolTip("Auto Atack [iNSERT = Uzkuria][ESC = Primusa] [DEL = PRistabdo].",0,0,"Zinoklis", 2)

WEnd

Func TogglePause() ; Fun?? Pause Bot

$Paused = NOT $Paused

ToolTip("",0,0,"", 0)

While $Paused

sleep(100)

ToolTip('Auto Atack "Pause"',0,0,'Info',2)

WEnd

EndFunc

Func Terminate() ; Fun?? BBD Ant Bot.

ToolTip("",0,0,"", 0)

ToolTip("Auto Atack Issijungs uz 03 Sekunde(s).",0,0,"Info",2)

Sleep(1000)

ToolTip("Auto Atack Issijungs uz 02 Sekunde(s).",0,0,"Info",2)

Sleep(1000)

ToolTip("Auto Atack Issijungs uz 01 Sekunde(s).",0,0,"Info",2)

Sleep(1000)

Exit 0

EndFunc

Func StartScript()

ToolTip("",0,0,"", 0)

ToolTip('Auto Atack"',0,0,'Info',1)

Sleep(50)

While 1

Send("{TAB}")

ToolTip("",0,0,"", 0)

Sleep(50)

Call("Atacking")

WEnd

EndFunc

FUNC Atacking()

SLEEP(10)

SEND("1")

SLEEP(10)

SEND("1")

SEND("{g 10}")

SLEEP(10)

SEND("2")

SLEEP(10)

SEND("2")

SEND("{g 10}")

SLEEP(10)

SEND("3")

SLEEP(10)

SEND("3")

SEND("{g 10}")

SLEEP(10)

SEND("4")

SLEEP(10)

SEND("4")

SEND("{g 10}")

SLEEP(10)

SEND("5")

SLEEP(10)

SEND("5")

Sleep(500)

ENDFUNC

Func Buffs()

Send("{F2}")

Sleep(100)

Send("1")

Sleep(5000)

Send("{F2}")

Sleep(100)

Send("2")

Sleep(5000)

Send("{F2}")

Sleep(100)

Send("3")

Sleep(5000)

Send("{F1}")

Call("Atacking")

EndFunc

My problem is funkcion "Buffs", that funkcion must start after some time, like every 5min. Sou, 5min. he casting "Atacking" function, than after 5min he stop fun. "Atacking", and call func. "Buffs", when he finish that func. He need agen cast func. "Atacking" I hope you understand what im asking :)

Ha and second question- how to make that scrip send key presses just in game? Game window will be minimized- and bot still do hes job. I know is posible, maby someone can help me ;)

Thank you for answers, this is my first steps in AutoIt, and i hawe much questions for this B)

Edited by Abriedukas

Share this post


Link to post
Share on other sites



Take a look at AdlibEnable and ControlSend in the help file.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
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
Sign in to follow this  
Followers 0