Need help with autoit

10/05/2012 17:00 Dub77#1
/!\/!\/!\/!\/!\/!\ Go to the lastest post to see what's in progress right now /!\/!\/!\/!\/!\/!\

Hello all, I start in use of autoit and I try to create a simple bot for Archlord.
I use SciTE-Lite Version 2.28 (I dont know if is the best release)
In first time I want just to cast the atk skills, and after I will see for buffs.
But I encounter a problem, my script appears to be ok, and when it is active, no skills are casted. :mad:

I have set a delay to send keys (push/release) to be ok with macro protection.

When I start the sript and open a txt file, I can see the key in this text, as I want in game.

Here is my script:


#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
GUICreate("MyBot", 264, 175)
GUICtrlCreateLabel("Mybot", 30, 40, 200, 50)
$Button1 = GUICtrlCreateButton("Start Bot", 150, 120, 89, 25)
Hotkeyset("{F8}","Quit")
HotKeySet("{F7}", "TogglePause")
GUISetState(@SW_SHOW)

Opt("SendKeyDelay", 100)
Opt("SendKeyDownDelay", 100)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
While 1
Sleep(2000)
Send ("{TAB}")
Sleep (1000)
Send("3")
Sleep(1000)
Send("4")
Sleep(1000)
Send("5")
Sleep(1000)
Send("6")
Sleep(1000)
Send("7")
Sleep(1000)
Send("8")
Sleep(1000)
WEnd
EndSwitch
WEnd


I can give a download link of my script for better comprehension.
May be someone can show me what is wrong ? :confused:
And should I use GG memreader for autoit from ACE ?
10/05/2012 18:45 mlukac89#2
try with

ControlSend("{3}")
Sleep(1000)


instead of Send()
10/05/2012 19:16 Haribomatix#3
you upload the data if finish ? plsss
10/05/2012 20:52 Asheriit#4
Compile yur script in x64 and launch in administrator ;)

Sorry and add:
Code:
WinActive("Archlord")
11/01/2012 11:22 Dub77#5
Yeah I'll try this in a moment and upload if it will work properly. Thanks all

Here is a new error :

Incorrect number of parameters in function call.:
ControlSend ("{TAB}")
^ ERROR
>Exit code: 1 Time: 5.824

I tryied to remove or add space between d and (
but always the same error. I paste my new code with new fonctions here.
Maybe we can move together to make it work.

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
GUICreate("MyBot", 264, 175)
GUICtrlCreateLabel("Mybot", 30, 40, 200, 50)
$Button1 = GUICtrlCreateButton("Start Bot", 150, 120, 89, 25)
Hotkeyset("{F8}","Quit")
HotKeySet("{F7}", "TogglePause")
GUISetState(@SW_SHOW)

Opt("SendKeyDelay", 100)
Opt("SendKeyDownDelay", 100)

WinActive("Archlord")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
While 1
Sleep(2000)
ControlSend ("{TAB}")
Sleep (1000)
ControlSend ("{3}")
Sleep (2000)
ControlSend ("{4}")
Sleep (100)
WEnd
EndSwitch
WEnd


When I put Send command instead of Control send, it has worked and I was able to make pulls. Very short joy because now it doesn't react anymore lol
11/01/2012 14:57 Xerrox2k#6
use this

Quote:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
GUICreate("MyBot", 264, 175)
GUICtrlCreateLabel("Mybot", 30, 40, 200, 50)
$Button1 = GUICtrlCreateButton("Start Bot", 150, 120, 89, 25)
Hotkeyset("{F8}","Quit")
HotKeySet("{F7}", "TogglePause")
GUISetState(@SW_SHOW)

Opt("SendKeyDelay", 100)
Opt("SendKeyDownDelay", 100)

WinActive("Archlord")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
While 1
Sleep(2000)
ControlSend("Archlord","","","{TAB}")
Sleep (1000)
ControlSend("Archlord","","","{3}")
Sleep (2000)
ControlSend("Archlord","","","{4}")
Sleep (100)
WEnd
EndSwitch
WEnd

script is working compile to (x64)
start it as administator

i use win 7 ultimate (x64)
11/02/2012 01:08 Dub77#7
Big thank you ! Now it's works.
For the moment, I have implemented buffs, but they are launched after atk skills.
I don't know if I can add a function wich be used with a temporal data (every 10 secs, the buff loop is lauched for example) because right now, the character select one mob, hit the 3 key to crit, and launches all his buffs. Then select another , hit and rebuffs. It's quite long
11/04/2012 10:18 mlukac89#8
i want to know same thing but i think you need to make something like this [Only registered and activated users can see links. Click Here To Register...] with timers on buffs and use if command to use buff when its runs out so he can rebuff

[Only registered and activated users can see links. Click Here To Register...]

if you make it let me know :)
11/04/2012 16:42 Subsist#9
:( i cant help im a huge coding noob but im happy to see that there is coming up some new
11/06/2012 18:32 Dub77#10
Quote:
Originally Posted by mlukac89 View Post
i want to know same thing but i think you need to make something like this [Only registered and activated users can see links. Click Here To Register...] with timers on buffs and use if command to use buff when its runs out so he can rebuff

[Only registered and activated users can see links. Click Here To Register...]

if you make it let me know :)
Yes this is quite simple but nice GUI do you have the codes to make it ? It will be very easier :)

But I still need the function for making timers :)

Anyways the scripts works very well for criters like scions and knights.
11/06/2012 21:11 mlukac89#11
Its easy to make it for criters but i want to make it to be memory bot then it will have many functions but i have problems finding base addres atm, i tried to make pixel bot but no luck :( . You can add me on xfire or skype so we can make it together
11/17/2012 01:08 RenzoARG#12
Quote:
Originally Posted by Dub77 View Post
Yes this is quite simple but nice GUI do you have the codes to make it ? It will be very easier :)

But I still need the function for making timers :)

Anyways the scripts works very well for criters like scions and knights.
You can Make multiple bots with a common "config.ini" file.

A master autoit Gui, that controls all other.

I commonly use that method to macro in my gaming with multiple "focus points"
1 macro attacks
1 macro checks HP
1 macro checks chat to auto answer

all running at the same time, so, you dont get stuck in the "attack function" as youre in 1HP

I could make an example Script for you If you wish, Just PM me.

Well... As you requested:
[Only registered and activated users can see links. Click Here To Register...]
11/18/2012 13:06 Dub77#13
Hello :) very nice idea, I just visited your post about Autoit Multi-Tasking and will try to add this to my script. I'll let you know about more news :D

Thanks you