this is a gf grinding bot that searches if ur in combat or not and depending on that it atacks. and i need help .lol
Quote:
WinWaitActive("Grand Fantasia")
Global $UnPaused
HotKeySet("{F12}", "TogglePause")
HotKeySet("{F11}", "Terminate")
;===================HOTKEYS======================= =========================
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc
Func Terminate()
Exit 0
EndFunc
;==================ATTACKS======================== =========================
Func tabatk() ; NEED HELP WITH THIS HERE
Sleep(500)
Send("{TAB}")
Sleep(1000)
$coord = PixelSearch(639,14,729,26,0xFF0000,1) ; 1
If Not @error Then
Send(3)
Sleep(1750)
EndIf
$coord = PixelSearch(639,14,729,26,0xFF0000,1) ; 2
If Not @error Then
Send(4)
Sleep(1750)
EndIf
$coord = PixelSearch(639,14,729,26,0xFF0000,1) ;3
If Not @error Then
Send(2)
Sleep(1000)
EndIf
$coord = PixelSearch(639,14,729,26,0xFF0000,1); 4
If Not @error Then
Send(5)
Sleep(8500)
EndIf
$coord = PixelSearch(639,14,729,26,0xFF0000,1) ;5
If Not @error Then
Send(4)
Sleep(1750)
EndIf
$coord = PixelSearch(639,14,729,26,0xFF0000,1) ;6
If Not @error Then
Send(2)
Sleep(1000)
EndIf
Sleep(750)
EndFunc
Func no_tabatk()
Sleep(1000)
$coord = PixelSearch(639,14,729,26,0xFF0000,1) ; 1
If Not @error Then
Send(3)
Sleep(1750)
EndIf
$coord = PixelSearch(639,14,729,26,0xFF0000,1) ; 2
If Not @error Then
Send(4)
Sleep(1750)
EndIf
$coord = PixelSearch(639,14,729,26,0xFF0000,1) ;3
If Not @error Then
Send(2)
Sleep(1000)
EndIf
$coord = PixelSearch(639,14,729,26,0xFF0000,1); 4
If Not @error Then
Send(5)
Sleep(8500)
EndIf
$coord = PixelSearch(639,14,729,26,0xFF0000,1) ;5
If Not @error Then
Send(4)
Sleep(1750)
EndIf
$coord = PixelSearch(639,14,729,26,0xFF0000,1) ;6
If Not @error Then
Send(2)
Sleep(1000)
EndIf
Sleep(750)
EndFunc
;====================MAINLOOP===================== =
while 1
$coord = PixelSearch(639,14,729,26,0xFF0000,1)
If Not @error Then
no_tabatk()
Else
$coord = PixelSearch(639,14,729,26,0xFF0000,1)
If @error Then
tabatk()
EndIf
EndIf
Send(7)
Sleep(1850)
WEnd
in the functions the ones for attacks, it takes its time to go through every single one of the attacks, i want it to search if the monster is selected then attck,if its still alive attack,and if the monster is not selected end the func instead of reading the attacks that follows, confusing me...
also
i made a picxelbased auto MP-HP- and summon hp, i want it to be memory based but have no clue on how to do so!
here is what i got so far
Quote:
Global $UnPaused
HotKeySet("{HOME}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
;=========Functions=============================== ==========
Func TogglePause()
$UnPaused = NOT $UnPaused
While $UnPaused
ToolTip("Sending...",0,0)
WEnd
EndFunc
While 1
$coord = PixelSearch(144,34,144,34,0xFFAEA5,1) ; hp value for
If @error Then
Send("{-}")
EndIf
$coord = PixelSearch(144,47,144,47,0xB5BEFF,1) ; mp value for
If @error Then
Send("{=}")
EndIf
$coord = PixelSearch(250,29,250,29,0x6B5844,1) ; hp value for summon/ lich, use skill
If Not @error Then ; if u dont need it delete this
Send("0")
EndIf
Sleep(1000)
WEnd
lol i think am asking for too much but one last thing, i swear its the last!! lol
i want to controlsend the keys to the game when its inactive but it doesnt work!
Quote:
;just a test
While 1
$handle = WinGetHandle("classname=DJO_CLASS", "")
If @error Then
MsgBox(4096, "Error", "Could not find the correct window")
Sleep(2000)
Else
ControlSend($handle, "", "", "{TAB}")
ControlSend($handle, "", "", "2")
Sleep(1500)
EndIf
WEnd
&
Quote:
; get window handle
$sTitle = "Grand Fantasia"
WinWait($sTitle)
$hWin = WinGetHandle($sTitle)
ControlSend($hWin, "", "", "{ENTER}this still doesnt work, lol{ENTER}",0)
both dont work, any help i will greatly appreciate.
search
If found Then
do something
Else
search
If found Then
do something
Else
EndIf
EndIf
I presume by memory based you want to pull the values from memory so that you have proper values without having to do pixel search. I believe there's some discussion on that on the forum somewhere, AutoIt comes with memory.au3 and you can include that and use it to read an applications memory. You'll also have to find the right information with an application like Cheatengine to make that worthwhile. If there's no discussion here I'm pretty sure there's some on the AutoIt forums.
I presume by not working it just doesn't do what you want and it doesn't throw an error? I'd assume the application is capturing all keys and it won't work. If you find an mmo where controlsend and other functions work I'd play it just to bot it since you could then bot without the window being active.
Ok Ty very much for the example codes, and advice, I searched around and saw how to use memory, well atleast the example, haven't tried it yet. Also I have each seperate scipt as diff exe how can put all my scripts into one?
Ok Ty very much for the example codes, and advice, I searched around and saw how to use memory, well atleast the example, haven't tried it yet. Also I have each seperate scipt as diff exe how can put all my scripts into one?
File GF_mem_read.exe received on 2010.03.11 22:56:19 (UTC)
Current status: Loading ... queued waiting scanning finished NOT FOUND STOPPED
Result: 7/42 (16.67%)
Loading server information...
Your file is queued in position: 2.
Estimated start time is between 49 and 70 seconds.
Do not close the window until scan is complete.
The scanner that was processing your file is stopped at this moment, we are going to wait a few seconds to try to recover your result.
If you are waiting for more than five minutes you have to resend your file.
Your file is being scanned by VirusTotal in this moment,
results will be shown as they're generated.
Compact Compact
Print results Print results
Your file has expired or does not exists.
Service is stopped in this moments, your file is waiting to be scanned (position: ) for an undefined time.
You can wait for web response (automatic reload) or type your email in the form below and click "request" so the system sends you a notification when the scan is finished.
Email: