Jump to content

Need help for a bot


Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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

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.

Link to comment
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]
Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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]
Link to comment
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?

Link to comment
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]
Link to comment
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!

Link to comment
Share on other sites

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
Link to comment
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!

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