How to create your own bots/macros with AutoIt

01/08/2010 13:45 Azothoras#121
Quote:
Originally Posted by tommyboy1212 View Post
Hey, could someone please tell me how to make use autoit to make your character sit after spell and, click on another character like for auto sitg. Thanks
To make the character sit after a spell you have to either put the sit shortcut on an F-Key or make a keybinding to sit. Then just have autoit click the F-key or click the shortcut

Send("{^a}") ; This sends CTRL+a to the active window (makes you sit down if you have bound sit to CTRL+a)

Send("{F8}") ; This send F8 to the active window (makes you sit down if you have sit at F8)


Do not attempt this if you didn't even know the above. Go ahead and learn some more basic stuff first.


Click on another character to autostig him is ALOT harder because you need to know the position on the screen where the other char is and that is really tricky.

But if you want to auto stig yourself from another window you can read your coordinates and the other chars coordinates and turn them in to x and y mouse coord and right click where the char is. (This is just if you have both windows open on the same computer)
04/19/2010 07:00 eseer#122
My bot works perfect except for 1 thing... when its jumping in its designated path and a monster gets in the way(clicks the monster instead of ground)it screws my whole bot up, what do i do? i can send you my script if you like
04/19/2010 08:49 ax5#123
Quote:
Originally Posted by eseer View Post
My bot works perfect except for 1 thing... when its jumping in its designated path and a monster gets in the way(clicks the monster instead of ground)it screws my whole bot up, what do i do? i can send you my script if you like
try tell the bot that mouse press hatsh code floor :mofo:
04/19/2010 13:39 Warlax#124
Quote:
Originally Posted by eseer View Post
My bot works perfect except for 1 thing... when its jumping in its designated path and a monster gets in the way(clicks the monster instead of ground)it screws my whole bot up, what do i do? i can send you my script if you like
make it co-ordinate aware. when i used to make this sort of bot i used the excellent coelse source code for his co-ordinate aware striaght line path finder :)
04/19/2010 19:38 eseer#125
Quote:
Originally Posted by Warlax View Post
make it co-ordinate aware. when i used to make this sort of bot i used the excellent coelse source code for his co-ordinate aware striaght line path finder :)
how do i do that?
04/20/2010 10:58 Warlax#126
Quote:
Originally Posted by eseer View Post
how do i do that?
see the coelse source code
04/22/2010 12:03 ywy87#127
Quote:
Originally Posted by emmanic26 View Post
ive made alot of bots using this. sh lvler, guard lvler, clicker, item seller, met spammer and etc. BUT I DONT UPLOAD IT AND SHARE IT COZ IM A NOOB AND THEY DONT TRUST MEH.!
Can you send ur bot like item seller to me at my email?? I hope to recieved your email soon..thx for sharing.

My email address is [Only registered and activated users can see links. Click Here To Register...]
09/18/2012 12:58 sonybaci#128
So i started to create myself a archer macro for lab1 spawn, so far i managed to sit and activate fly, and clicking the coords to the scattering area.

But my question is, what's the command for 1 right click(scatter) per second, for 28 secs? Then the macro will go back at the safe place, and the loop begins again. How can i do this?

Quote:
send("{F1}")
sleep(10000)
MouseClick(right)
sleep(50)
send("{F2}")
sleep(50)
MouseClick("left",651,311,2,2)
MouseClick("left",689,364,2,2)
Sleep(100)
09/21/2012 17:59 itachi26#129
Bumped...

Anyway :

Code:
$start = TimerInit() ; initializes the timer
While 1
     If TimerDiff($start) > 28000 Then ; if 28 sec been passed
          MouseClick("right",$x,$y) ; right click to your coord
          $start = TimerInit() ; timer intialized again
     EndIf
WEnd
Why do I use a timer, well, you don't block your code, such as sleep does. With my code, your script is still able to do whatever you want until he reached 28 sec...
09/21/2012 19:42 Silent-Death#130
Quote:
Originally Posted by itachi26 View Post
Bumped...

Anyway :

Code:
$start = TimerInit() ; initializes the timer
While 1
     If TimerDiff($start) > 28000 Then ; if 28 sec been passed
          MouseClick("right",$x,$y) ; right click to your coord
          $start = TimerInit() ; timer intialized again
     EndIf
WEnd
Why do I use a timer, well, you don't block your code, such as sleep does. With my code, your script is still able to do whatever you want until he reached 28 sec...
but the man is talking autoit, so sleep would be his best bet
09/21/2012 19:48 itachi26#131
Well, it's an AutoIt code. The problem is, when you use a sleep, your script really waits 28 seconds, so nothing can be done until it's reached. My code does not wait the 28 seconds, but when the time has been reached, then it does what he wants to do...

It's an AutoIt code, that can be easily configurable!
09/21/2012 20:34 Silent-Death#132
idk.. been a while since i played around with autoit
09/21/2012 22:11 sonybaci#133
Quote:
Originally Posted by sonybaci View Post
So i started to create myself a archer macro for lab1 spawn, so far i managed to sit and activate fly, and clicking the coords to the scattering area.

But my question is, what's the command for 1 right click(scatter) per second, for 28 secs? Then the macro will go back at the safe place, and the loop begins again. How can i do this?
Thanks for the help :facepalm:
09/21/2012 22:27 itachi26#134
Here ya go then :

Code:
$timer = TimerInit()
While 1
      MouseClick("right",$x,$y) ; right click (scatter)
      If TimerDiff($timer) > 28000 Then ; if 28 secs reached
           _GoToSafePlace() ; your function
           $timer = TimerInit() ; timer is now = 0
      EndIf
      Sleep(1000) ; we want to wait 1sec before sending another click
WEnd

Func _GoToSavePlace()

; your function which has to move your archer to your safe place

EndFunc
10/09/2012 16:27 SaM.ThE.MaN#135
Quote:
Originally Posted by itachi26 View Post
Well, it's an AutoIt code. The problem is, when you use a sleep, your script really waits 28 seconds, so nothing can be done until it's reached. My code does not wait the 28 seconds, but when the time has been reached, then it does what he wants to do...

It's an AutoIt code, that can be easily configurable!

I know its been days since this was posted , but am gonna say this just incase some one is learning and finds this.

It doesnt matter if you use Sleep or TimerDiff() there since its in a loop , the script will be forzen anyways.