Sign in to follow this  
Followers 0
PanClon

Still n00by =)

5 posts in this topic

Hello...I making GameBot...its for one Game

I found usefull scripts here...edited them a bit, but NOW i really need help with this...

***********************************
;1)If game fall down or disconnected
***********************************

;~ HotKeySet( "{F11}" , "_Start")
;~ HotKeySet( "{F10}" , "_Stop")
Opt("TrayMenuMode", 1)
Opt("WinTitleMatchMode", 2)

$tray_exit = TrayCreateItem("Exit")
Opt("TrayOnEventMode",1)
TrayItemSetOnEvent($tray_exit, "_Exit")
TraySetState()
TrayTip("Game auto launcher", "Press F11 to start, or F10 to stop script", 5)

call("_start")

Func Adlibfunc ();IF DISCONNECTED
    if Not ProcessExists("Game.exe") Then
        WinActivate("GameBot");RELOG
        Send("{F7 down}");
        Sleep(10000)
        Send("{F7 up}")
        Sleep(3000)
        WinActivate("GameBot")
        Sleep(3000)
        MouseClick("Left", 390,126,1)
        Sleep(3000)
        ShellExecute("launcher.exe", "", "C:\Program Files\Game")
        Sleep(12000)
        WinActivate("luncher")
        MouseClick("Left", 826,668,1)
        Sleep(90000)
        MouseClick("Left", 619,813,1)
        Sleep(1000)
        MouseClick("Left", 640,950,1)
        Sleep(3000)
        WinActivate("Game")
        Sleep(1000)
        Send("name")
        Sleep(3000)
        Send("{TAB}")
        Sleep(2000)
        Send ("password")
        Sleep(2000)
        ControlSend ( "Game", "", "", "{ENTER}")
        MouseClick("Left", 571,962,1)
        Sleep(20000)
        MouseClick("Left", 946,153,1)
        Sleep(2000)
        MouseClick("Left", 641,904,1)
        Sleep(35000)
        MouseClick("Left", 1269,43,1)
        Sleep(2000)
        Run("C:\Documents\GameBot")
        Sleep(3000)
        MouseClick("Left", 350,250,1)
        WinActivate("Game")
    EndIf
EndFunc

func _Exit ()
    Exit
EndFunc

func _start ()
    AdlibEnable("Adlibfunc", 10)
    TrayTip("Game notice:", "script has been started", 5)
EndFunc

func _stop ()
    AdlibDisable()
    TrayTip("Game notice:", "script has been stopped", 5)
EndFunc

While 1
    Sleep(10)
WEnd

***********************************
;2)Pixel checking - ressbar colour
***********************************
$iColour = PixelGetColor(549, 138);Get the colour of the specified pixel
While $iColour <> 14883057
    Sleep(10000); Wait 10 seconds before checking again   
    $iColour = PixelGetColor(549, 138)
Wend
***********************************
;3)Path to x,y if KILLED
***********************************
Sleep(15000)
WinActivate("Game");Teleport 
Sleep(500)
MouseClick("Left", 386,234,1)
Sleep(2000)
MouseClick("Middle", 0,0,1)
Sleep(500)
MouseClick("Left", 64,742,1)
Sleep(2000)
MouseClick("Left", 100,130,1)
Sleep(2000)
MouseClick("Left", 179,261,1)
Sleep(20000)
WinActivate("Game")
Sleep(500)
MouseClick("Middle", 500,500,1)
Sleep(500)
MouseClickDrag("Right", 650,0,0,0,1)
Sleep(1000)
Send("{w down}");let´s GO
Send("{a down}") 
Sleep(1000)
Send("{a up}") 
Sleep(3000)
Send("{a down}") 
Sleep(14000)
Send("{a up}") 
Sleep(17000) 
Send("{d down}") 
Sleep(1000)
Send("{d up}") 
Sleep(8000)
Send("{d down}") 
Sleep(8000)
Send("{d up}") 
Send("{w up}");Final Destination =)

It´s simple....everything would be in ONE script.

I mean like this:

1) Need to check 2 things...game.exe in process list and color of ressbar(becouse...if I will be killed by player or monster...on the screen appears bar and I have to wait 10 seconds and than hit button for ress)

2)If the pixel will appears on screen(and my death body :))..need this: stop searching ress pixel (like: If pixelfound Then MouseClick...bla bla)

3)All in ONE....and looping 4 EVER

feel free to use my code...I thing it´s verry simple...but i still need help...

THX for reply...

PanClon

Share this post


Link to post
Share on other sites



It is very simple to do. Seeing how you have someone elses script, have you looked in the help file at all to find what you need? It has a search function that should lead you to what you need. Usually each command has a example so you can get the idea. You said you tweaked it a bit, so you should be able to add what you need.

ProcessExist is one of the thngs you need to use. Also, the script already has the color thing you need. PixelGetColor

Share this post


Link to post
Share on other sites

well thanks...I will do my best...=)

ProcessExist...but anyway...I am NOT skilled in this...Will be happy...If someone do this for me...

Happy New Yeahhhh...

Share this post


Link to post
Share on other sites

duh...pay for it? NO WAY ! :)

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