Sign in to follow this  
Followers 0
sagagemini

Need help for a bot

16 posts in this topic

#1 ·  Posted (edited)

Hi, nice to meet you all!

I want to make a bot like this:

-Auto-hold "right click mouse" but, after 30min, release and auto-hold again, and do the same thing each 30min.

(Hotkey for this will be F5 to active and for disable F6)

-Non-stop pressing continuously "SPACEBAR"

(Hotkey for this will be F7 to active and for disable F8)

-Auto-press "E" key for about 1min continuously starting each 1 hour

(Hotkey for this will be F9 to active and for disable F10)

And that will be all :)

Thanks for your time.

Take care, have a nice day, bye bye!

Edited by sagagemini

Share this post


Link to post
Share on other sites



Posting in the correct forum would probably help... moving from GUI forum to Support forum.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Oh hi, sorry about that, I guess I was lost or something and I though this was a good place.

Thanks for that.

So, anybody can help me? :)

Much appreciate

Edited by sagagemini

Share this post


Link to post
Share on other sites

-Auto-hold "right click mouse" but, after 30min, release and auto-hold again, and do the same thing each 30min.

MouseClick().

-Non-stop pressing continuously "SPACEBAR"

-Auto-press "E" key for about 1min continuously starting each 1 hour

Send().

(Hotkey for this will be F5 to active and for disable F6)

(Hotkey for this will be F7 to active and for disable F8)

(Hotkey for this will be F9 to active and for disable F10)

HotKeySet().

And Sleep().

Those are the functions you need. All you need to do is to use this functions in a script.


[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]

Share this post


Link to post
Share on other sites

Hi, thanks, I'm very new to this but I'll try, check this out (tell me if there is any mistake):

TrayTip("[ Right click bot ]" , "F5-start, F6-Stop",8,16)

Opt ("SendKeyDelay", 25)

Opt ("SendKeyDownDelay", 50 )

HotKeySet ("{F5}", "start" )

HotKeySet ("{F6}", "stop" )

$Do=1

Func start ()

$Do=1

While ($Do= 1)

WinActivate()

MouseDown("right")

Sleep(45 * (1000 * 60))

MouseUp("right")

WEnd

EndFunc

Func stop()

$do=0

EndFunc

while 1

sleep(1000)

wend

Share this post


Link to post
Share on other sites

And this for spacebar:

TrayTip("[ Auto-spacebar bot ]" , "F7-start, F8-Stop ",8,16)

Opt ("SendKeyDelay", 25)

Opt ("SendKeyDownDelay", 50 )

HotKeySet ("{F7}", "start" )

HotKeySet ("{F8}", "stop" )

$Do=1

Func start ()

$Do=1

While ($Do= 1)

WinActivate()

Send("{SPACE}")

WEnd

EndFunc

Func stop()

$do=0

EndFunc

while 1

sleep(1000)

wend

Share this post


Link to post
Share on other sites

And the last key "E":

TrayTip("[ Auto-Key-E bot ]" , "F9-start, F10-Stop ",8,16)

Opt ("SendKeyDelay", 25)

Opt ("SendKeyDownDelay", 50 )

HotKeySet ("{F9}", "start" )

HotKeySet ("{F10}", "stop" )

$Do=1

Func start ()

$Do=1

While ($Do= 1)

WinActivate()

Send("{E}")

Sleep(45 * (1000 * 60))

WEnd

EndFunc

Func stop()

$do=0

EndFunc

while 1

sleep(1000)

wend

Share this post


Link to post
Share on other sites

Now I'm kinda confused, if I'm correct, I wanna fuse them all togheter in one Bot.

How may I put them?

Share this post


Link to post
Share on other sites

The auto-spacebar and auto-E scripts are working, but I'm not sure about the auto-rightclick.

You could combine these three by just putting all the functions in one script and giving them a unique name.

And put just one infinite loop.


[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]

Share this post


Link to post
Share on other sites

The auto-spacebar and auto-E scripts are working, but I'm not sure about the auto-rightclick.

You could combine these three by just putting all the functions in one script and giving them a unique name.

And put just one infinite loop.

Hi, They all working, I tested them, I now need to combine them, so I just put them one by one exactly like before?

Share this post


Link to post
Share on other sites

Hi, They all working, I tested them, I now need to combine them, so I just put them one by one exactly like before?

Let me know how how you get them all toghther in one, And what game is this for? Im trying to make an anti-Afk bot

Share this post


Link to post
Share on other sites

Hi, They all working, I tested them, I now need to combine them, so I just put them one by one exactly like before?

Exactly, and remember give every function a unique name so you do not encounter errors.

And set the right hotkey to the right function.

Just post the combined code so I could see them.

And wrap them in code tags.


[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]

Share this post


Link to post
Share on other sites

Let me know how how you get them all toghther in one, And what game is this for? Im trying to make an anti-Afk bot

MU Online

Exactly, and remember give every function a unique name so you do not encounter errors.

And set the right hotkey to the right function.

Just post the combined code so I could see them.

And wrap them in code tags.

TrayTip("[ Right click bot ]" , "F5-start, F6-Stop ",8,16)

Opt ("SendKeyDelay", 25)
Opt ("SendKeyDownDelay", 50 )


HotKeySet ("{F5}", "start" )
HotKeySet ("{F6}", "stop" )

$Do=1

Func start ()

$Do=1

While ($Do= 1)
WinActivate("MU")
MouseDown("right")
Sleep(45 * (1000 * 60))
MouseUp("right")

WEnd

EndFunc


Func stop()
$do=0
EndFunc

while 1
sleep(1000)
wend

TrayTip("[ Auto-spacebar bot ]" , "F7-start, F8-Stop ",8,16)

Opt ("SendKeyDelay", 25)
Opt ("SendKeyDownDelay", 50 )


HotKeySet ("{F7}", "start" )
HotKeySet ("{F8}", "stop" )

$Do=1

Func start ()

$Do=1

While ($Do= 1)
WinActivate("MU")
Send("{SPACE}")

WEnd

EndFunc


Func stop()
$do=0
EndFunc

while 1
sleep(1000)
wend

TrayTip("[ Auto-Key-E bot ]" , "F9-start, F10-Stop ",8,16)

Opt ("SendKeyDelay", 25)
Opt ("SendKeyDownDelay", 50 )


HotKeySet ("{F9}", "start" )
HotKeySet ("{F10}", "stop" )

$Do=1

Func start ()

$Do=1

While ($Do= 1)
WinActivate("MU")
Send("{E}")
Sleep(45 * (1000 * 60))

WEnd

EndFunc


Func stop()
$do=0
EndFunc

while 1
sleep(1000)
wend

It say this when I try to run the .exe file:

Line -1:

Error: Duplicate function name

Can you show me where is the problem?

Thanks!

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

thats kinda sinple :) you named every clickbot function start

try to use unique function names like

func start-spacebar()

while $do-spacebar

<what ever needs to be done here>

wend

endfunc

func start-rightclick()

while $do-rightclick

<what ever needs to be done here>

wend

endfunc

func start-e()

while $do-e

<what ever needs to be done here>

wend

endfunc

and dont use one unique stop function in your script if you would try to stop spacebarclick

it would stop all entire functions because you always ask for $do

try to use

Func stop-e()

$do-e=0

EndFunc

func stop-spacebar()

$do-spacebar=0

endfunc

func stop-rightclick()

$do-rightclick 0

endfunc

Edited by andrew2

Share this post


Link to post
Share on other sites

Hi andrew2, I changed some stuffs as you said, here look:

TrayTip("[ Right click bot ]" , "F5-start, F6-Stop ",8,16)

Opt ("SendKeyDelay", 25)
Opt ("SendKeyDownDelay", 50 )


HotKeySet ("{F5}", "start" )
HotKeySet ("{F6}", "stop" )

$Do=1

func start-rightclick()

$Do=1

while $do-rightclick
WinActivate("MU")
MouseDown("right")
Sleep(45 * (1000 * 60))
MouseUp("right")

WEnd

EndFunc


func stop-rightclick()
$do-rightclick 0
EndFunc

while 1
sleep(1000)
wend

TrayTip("[ Auto-spacebar bot ]" , "F7-start, F8-Stop ",8,16)

Opt ("SendKeyDelay", 25)
Opt ("SendKeyDownDelay", 50 )


HotKeySet ("{F7}", "start" )
HotKeySet ("{F8}", "stop" )

$Do=1

func start-spacebar()

$Do=1

while $do-spacebar
WinActivate("MU")
Send("{SPACE}")

WEnd

EndFunc


func stop-spacebar()
$do-spacebar=0
EndFunc

while 1
sleep(1000)
wend

TrayTip("[ Auto-Key-E bot ]" , "F9-start, F10-Stop ",8,16)

Opt ("SendKeyDelay", 25)
Opt ("SendKeyDownDelay", 50 )


HotKeySet ("{F9}", "start" )
HotKeySet ("{F10}", "stop" )

$Do=1

func start-e()

$Do=1

while $do-e
WinActivate("MU")
Send("{E}")
Sleep(45 * (1000 * 60))

WEnd

EndFunc


Func stop-e()
$do-e=0
EndFunc

while 1
sleep(1000)
wend

Now I got this message:

Line -1:

Error: Badly formatted "Func" statement.

:) Sorry I'm noob, what's wrong now?

I think is almost done, just need a fix here and there.

Thanks so much!

Share this post


Link to post
Share on other sites

yea somehow the new autoit version dont allow a "-" in the function names so try func starte()

btw you still check for $do = 1 this will still stop functions if they all run simultinously so check for $do_e or something else


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