Jump to content

[Bot Help]


 Share

Recommended Posts

I found a bot on Google. This should work on any games (MMORPG). But I'm a beginner and I can't edit everything to get it to work =S

This is the script :

*UPDATED BUT NOT WORKING AT ALL*

------------------------------------------------------------------------------------------------------

Global $Paused

HotKeySet("{PAUSE}", "TogglePause") ; Hotkey to stop/start script

Local $bMobFound = False

WinActivate("FLYFF")

WinWaitActive("FLYFF")

While 1 ; Begin Infinite Loop

While Not $bMobFound

$SearchResult = PixelSearch(1131, 1, 1277, 162, 0xFFFAA5, 10)

If Not @error Then

MouseClick("left", $SearchResult[0], $SearchResult[1], 2, 0)

$hMobCheck = PixelChecksum(540, 35, 540, 35)

_MobKill()

EndIf

WEnd

WEnd ; End Of Loop Is Never Reached

Func _MobKill()

While $hMobCheck = PixelChecksum(540, 35, 540, 35)

Send("{F1}")

Sleep(50)

Send("{F3}")

Sleep(50)

WEnd

EndFunc ;==>_MobKill

Func TogglePause()

$Paused = Not $Paused

While $Paused

Sleep(100)

ToolTip('Script is "Paused"', 0, 0)

WEnd

EndFunc ;==>TogglePause

--------------------------------------------------------------------------------------------------

*EDIT*

It's not done yet, that's why it won't work correctly. I currently don't need help so i'll update the post until I get a better result =D

What needs to be done :

We need to make the program to check again if the pixel changed (the mob isn't death) or the program will automatically search again for a mob but we didn't killed the one we just had.

Edited by Arsen
Link to comment
Share on other sites

The MouseClick you've changed is expecting two coords for the x and y spot or Default to click on the location the mouse is currently locating. The red values' purpose is to hold a rectangular dimensions for the PixelSearch function (you should read about it in the help file, F1 from SciTE editor) $mobgreen, $mob, etc.. need to hold hex or decimal values and not their strings representations.

Link to comment
Share on other sites

I don't know why but it won't let me edit my post... Anyway, thx for your help but I already knew that $xTop, (...) was to make a sort of rectangle but I can't understand how to set it... I modified what you told me Authencity =D

Btw there is an image of what I wan't to be in the "rectangle" HERE.

What I want that the script found by doing PixelSearch is the orange dot on the map.

This is the script :

------------------------------------------------------------------------------------------------------

WinActivate ("FLYFF")

WinWaitActive("FLYFF")

$xTop = 40

$yTop = 80

$xBot = 116

$yBot = 130

$mobGreen = "0xEFE900"

Sleep(6000)

while 1

$coord = PixelSearch($xTop,$yTop,$xBot,$yBot,$mobGreen,5,1)

$n = @error

If NOT @error Then

while $n = 0

$x = Random($coord[0], $coord[0]+40, 1)

$y = Random($coord[1], $coord[1]+40, 1)

MouseClick("right", $x, $y, 2, 0)

$mm = PixelGetColor ( 378 , 12 )

$mob = Hex($mm, 6)

If $mob = "7B0000" Then

ExitLoop

EndIf

$coord = PixelSearch($xTop,$yTop,$xBot,$yBot,$mobGreen,5,1)

$n = @error

wend

If $mob = "7B0000" Then

while $mob = "7B0000"

Send("{F3}")

Send("{F1}")

$mm = PixelGetColor ( 378 , 12 )

$mob = Hex($mm, 6)

wend

EndIf

Else

Sleep (1000)

Endif

Wend

--------------------------------------------------------------------------------------------------

Edited by Arsen
Link to comment
Share on other sites

Thx mate! It helped me and it worked </3

Now I have another problem =P The cursor is clicking on the map but there is probably somthing wrong I did cause it won't exit the loop... Look at my modified script...

----------------------------------------------------------------------------------------

WinActivate ("FLYFF")

WinWaitActive("FLYFF")

$xTop = 1131

$yTop = 1

$xBot = 1277

$yBot = 162

$mobGreen = "0xFFFAA5"

Sleep(1000)

while 1

$SearchResult = PixelSearch($xTop,$yTop,$xBot,$yBot,$mobGreen,5,1)

$n = @error

If NOT @error Then

while $n = 0

MouseClick("left", $SearchResult[0], $SearchResult[1], 2, 0)

$mob = PixelGetColor ( 540 , 35 )

If $mob = "0xEF787E" Then

ExitLoop

EndIf

wend

If $mob = "0xEF787E" Then

While $mob = "0xEF787E"

Send("{F1}")

Send("{F3}")

Sleep(40000)

$mob = PixelGetColor ( 540 , 35 )

WEnd

Send("{Space}")

EndIf

Else

Sleep (100)

Endif

Wend

----------------------------------------------------------------------------------------

What is in red won't work. The program doesn't show this as error but the program just won't recognize the color so it won't start killing the mob...

There is a link to download a RAR file which contains the two pictures of what I want. THERE IS THE LINK

Thx to all who will help me! =)

Link to comment
Share on other sites

It's not that cause when I do that the program give me an error and the program is clicking on the map, it just won't recognize the color at 540 , 35

------------------------------------------------------------------------------------------------------------------------

WinActivate ("FLYFF")

WinWaitActive("FLYFF")

$xTop = 1131

$yTop = 1

$xBot = 1277

$yBot = 162

$mobGreen = "0xFFFAA5"

Sleep(1000)

while 1

$SearchResult = PixelSearch($xTop,$yTop,$xBot,$yBot,$mobGreen,5,1)

$n = @error

If NOT @error Then

while $n = 0

MouseClick("left", $SearchResult[0], $SearchResult[1], 2, 0)

$mob = PixelGetColor ( 540 , 35 )

If $mob = "0xEF787E" Then

ExitLoop

EndIf

wend

If $mob = "0xEF787E" Then

While $mob = "0xEF787E"

Send("{F1}")

Send("{F3}")

Sleep(40000)

$mob = PixelGetColor ( 540 , 35 )

WEnd

Send("{Space}")

EndIf

Else

Sleep (100)

Endif

Wend

------------------------------------------------------------------------------------------------------------------------

Thx for all your help bro but it's still doesn't work =S

Link to comment
Share on other sites

Yea I have already tried shade variation. No result =(

I modified something but I still get the same thing ! T-T

--------------------------------------------------------------------------------------------------

WinActivate ("FLYFF")

WinWaitActive("FLYFF")

$xTop = 1131

$yTop = 1

$xBot = 1277

$yBot = 162

$mobGreen = "0xFFFAA5"

Sleep(1000)

while 1

$SearchResult = PixelSearch($xTop,$yTop,$xBot,$yBot,$mobGreen,5,1)

$n = @error

If NOT @error Then

while $n = 0

MouseClick("left", $SearchResult[0], $SearchResult[1], 2, 0)

$mm = PixelGetColor ( 540 , 35 )

$mob = Hex($mm, 6)

If $mob = "EF787E" Then

ExitLoop

EndIf

wend

If $mob = "EF787E" Then

While $mob = "EF787E"

Send("{F1}")

Send("{F3}")

Sleep(40000)

$mm = PixelGetColor ( 540 , 35 )

$mob = Hex($mm, 6)

WEnd

Send("{Space}")

EndIf

Else

Sleep (100)

Endif

Wend

--------------------------------------------------------------------------------------------------

There is where I found my bot : http://www.elitepvpers.de/forum/cabal-guid...bot-autoit.html

Maybe it could help you.. =D (Look at third post)

Link to comment
Share on other sites

Will this code work?

Global $Paused

HotKeySet("{PAUSE}", "TogglePause") ; Hotkey to stop/start script

HotKeySet("{ESC}", "Terminate") ; Hotkey to exit script

WinActivate ("FLYFF")

WinWaitActive("FLYFF")

$xTop = 1131

$yTop = 1

$xBot = 1277

$yBot = 162

$mobGreen = "0xFFFAA5"

$mob = "000000"

$mm = PixelGetColor ( 540 , 35 )

While 1 ; Begin Infinite Loop

While 1 ; Find a mob

$SearchResult = PixelSearch($xTop,$yTop,$xBot,$yBot,$mobGreen,5,1)

If NOT @error Then

MouseClick("left", $SearchResult[0], $SearchResult[1], 2, 0)

$mob = Hex($mm, 6)

EndIf

If $mob = "EF787E" Then

Exitloop ; mod found

EndIf

Sleep(100)

WEnd

While $mob = "EF787E" ; Kill mob

Send("{F1}")

Sleep(20)

Send("{F3}")

Sleep(20)

$mob = Hex($mm, 6)

If $mob <> "EF787E" Then

Exitloop

EndIf

Sleep(4000) ; Wait 4 seconds

WEnd

Send("{Space}")

WEnd ; End inifinite loop

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Link to comment
Share on other sites

You can't unless you have Hackshield/GameGuard turned off which will cease everything. Your best bet is doing the calculation then telling the window to so outside the program and execute the mousemove then returning else you could use a DLLCall to the MoveMouse function.

0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Link to comment
Share on other sites

I just came back from school ^^ So I tried tested your script and it doesn't work D=

It works but there's something wrong cause the macro is just changing mobs like if $mob (doesn't not) = "EF787E"

The script you gave me and the one I have are working both except for this thing. It won't see the "EF787E" on 540,35 =(

Link to comment
Share on other sites

Anyways your incorrect about where you put the dot to check as that will always be true even if the monster has died. You need to go in a couple like 4-6 the last time I know of it. Why not PixelChecksum then you have a static thing which will be the same thing your doing with the PixelGetColor. It maybe will take longer like .001 seconds longer, but it get everything.

0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Link to comment
Share on other sites

You can't unless you have Hackshield/GameGuard turned off which will cease everything. Your best bet is doing the calculation then telling the window to so outside the program and execute the mousemove then returning else you could use a DLLCall to the MoveMouse function.

I am using this on a private server so GameGuard isn't there =P

Anyways your incorrect about where you put the dot to check as that will always be true even if the monster has died. You need to go in a couple like 4-6 the last time I know of it. Why not PixelChecksum then you have a static thing which will be the same thing your doing with the PixelGetColor. It maybe will take longer like .001 seconds longer, but it get everything.

Ok, I don't understand everything but if could correct me I would try to understand lol. This is the FIRST script I ever had to work on it. =P

Edited by Arsen
Link to comment
Share on other sites

Does the target bar disappear when the mob dies or when nothings targeted? You could save the pixel color at 540, 35 if its stable before targeting then compare that to the target bar afterwards. Not foolproff tho.

$xTop = 1131

$yTop = 1

$xBot = 1277

$yBot = 162

$mobGreen = "0xFFFAA5"

$mob = "000000"

$mobcheck = "000000"

$mobfound = 0

$mm = PixelGetColor ( 540 , 35 )

While 1 ; Begin Infinite Loop

$mobcheck = Hex($mm, 6)

While $mobfound = 0

$SearchResult = PixelSearch($xTop,$yTop,$xBot,$yBot,$mobGreen,5,1)

If NOT @error Then

MouseClick("left", $SearchResult[0], $SearchResult[1], 2, 0)

$mob = Hex($mm, 6)

EndIf

If $mobcheck <> $mob OR $mobcheck = "EF787E" Then

$mobfound = 1

EndIf

Sleep(100)

WEnd

$mobcheck = $mob

While $mobcheck = $mob

Send("{F1}")

Sleep(20)

Send("{F3}")

Sleep(20)

$mob = Hex($mm, 6)

Sleep(4000) ; Wait 4 seconds

WEnd

Send("{Space}")

WEnd

Edited by Chau808
Link to comment
Share on other sites

Global $Paused
HotKeySet("{PAUSE}", "TogglePause") ; Hotkey to stop/start script
HotKeySet("{ESC}", "Terminate") ; Hotkey to exit script

Local $bMobFound = False

WinActivate("FLYFF")
WinWaitActive("FLYFF")

While 1 ; Begin Infinite Loop
    $hModCheck = PixelChecksum(540, 35, 540, 35)
    While Not $bMobFound
        $SearchResult = PixelSearch(1131, 1, 1277, 162, 0xFFFAA5, 10)
        If Not @error Then
            MouseClick("left", $SearchResult[0], $SearchResult[1], 2, 0)
            _MobKill()
        EndIf
    WEnd

    Send("{SPACE}")
WEnd ; End Of Loop Is Never Reached

Func _MobKill()
    While $hMobCheck = PixelChecksum(540, 35, 540, 35)
        Send("{F1}")
        Sleep(50)
        Send("{F3}")
        Sleep(4000)
    WEnd
EndFunc   ;==>_MobKill

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
EndFunc   ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

I took out the things you are declaring because you only use then once per loop anyways it saves on space. Secondly if someone uses your script in conjucation with your they can mess up your script through changing the variables. Lastly, I checked with how PixelGetColor and PixelChecksum works, just need you to test it and tell me if it works alright. Then you also have a pause and terminating function involved in your script later on, so I incorporated that.

0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

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