Jump to content

A little help with scriptings (very fast)


Souls
 Share

Recommended Posts

I made a LITTLE autoclicker that help me lvl in a game named Eternal Wars.

It works fine but i realised that they make a random security test that can bann my account if my autoclicker continues.

So heres the code:

;AUTOCLICKER

HotKeySet("{F2}", "msn")
HotkeySet("{F11}", "HK_STOP")
HotKeySet("{DEL}", "quit")

Func msn()
;cliks 
while(1)

Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")
Sleep(2400)
Send("{TAB}")

Send("{ENTER}")
Sleep(2400)
WEnd
EndFunc 

;Stops the program
Func HK_STOP()
while 1 = 1
  Sleep(100)
wend
EndFunc

;the exit function
Func quit()
Exit
EndFunc

TrayTip("Souls Autoclicker", "DELETE= Exit", 5, 1)
TraySetIcon("Shell32.dll",112)

; Need to keep the program running until you press the hotkey
while(1)
sleep(1000)
WEnd

what I need now is someone to help me make a code so that when in the coordinate X:442 Y:478 there is a white color to stop the autoclicker immediately before it click tooo much.

The games website is: Eternal Wars

And my recruit page:Eternal Wars

Link to comment
Share on other sites

Have a look at PixelGetcolor in help file.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

PixelGetColor is the answer. :P

[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

Link to comment
Share on other sites

If (PixelGetColor (442, 478) = 0xFFFFFF) Then
    Exit
EndIf

[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

Link to comment
Share on other sites

Maybe you should replace the Exit command by something that doesn't close the program.

[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

Link to comment
Share on other sites

Ok so here is the new code.

Check it for errors

;AUTOCLICKER

HotKeySet("{F2}", "msn")
HotkeySet("{F11}", "HK_STOP")
HotKeySet("{DEL}", "quit")

Func msn()
;clicks
while(1)

Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")
Sleep(2400)
Send("{TAB}")

Send("{ENTER}")
Sleep(2400)
WEnd
EndFunc 

;Stops the program
Func HK_STOP()
while 1 = 1
  Sleep(100)
wend
EndFunc

;the exit function
Func quit()
Exit
EndFunc

If (PixelGetColor (442, 478) = 0xFFFFFF) Then
    Exit
EndIf


If (PixelGetColor (922, 447) = 0x371617) Then
    Exit
EndIf

TrayTip("Souls Autoclicker", "DELETE= Exit", 5, 1)
TraySetIcon("Shell32.dll",112)

; Need to keep the program running until you press the hotkey
while(1)
sleep(1000)
WEnd
Link to comment
Share on other sites

Shouldn't the pixel checking be inside the clicking function?

[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

Link to comment
Share on other sites

like:

Func msn()

;clicks

If (PixelGetColor (442, 478) = 0xFFFFFF) Then

Exit

EndIf

If (PixelGetColor (922, 447) = 0x371617) Then

Exit

EndIf

while(1)

Send("{TAB}")

Send("{TAB}")

Send("{ENTER}")

Sleep(2400)

Send("{TAB}")

Send("{ENTER}")

Sleep(2400)

WEnd

EndFunc

like this or how?

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