oh my! Is this the function? it has both pre and post!!!!! Thank you!!!
Im at a dead end @
[Only registered and activated users can see links. Click Here To Register...], how do i make sure that gw.exe is selected? and that the script runs on my character?
#Region Include
#Include-Once
#include 'GW_omniApi.au3'
#EndRegion Include
#Region GUI
GUICreate("GotHGetter", 300, 150) ; will create a dialog box that when displayed is centered
GUISetState (@SW_SHOW) ; will display an empty dialog box
Opt("GUICoordMode",2)
Opt("GUIOnEventMode",1)
$Button_1 = GUICtrlCreateButton ("Start", 50, 90, 100)
$Button_2 = GUICtrlCreateButton ( "Stop / Exit", 0, -1)
GuiSetOnEvent($GUI_EVENT_CLOSE,"Quit")
GuICtrlSetOnEvent($Button_2,"Quit")
GuiCtrlSetOnEvent($Button_1,"DoScript")
While 1
Sleep(100)
WEnd
Func DoScript()
Farm_GoStartingOutpost()
Farm_GoOutpostPortal()
MoveTo(22565,6057)
MoveTo(22526,4784)
MoveTo(22112,3572)
MoveTo(19635,2248)
MoveTo(17354,2635)
MoveTo(16107,3183)
MoveTo(15981,3907)
MoveTo(16719,5575)
MoveTo(16869,7479)
MoveTo(16490,8291)
MoveTo(17189,8225)
MoveTo(17323,8744)
MoveTo(16774,10387)
MoveTo(15517,10876)
MoveTo(14512,11195)
MoveTo(13618,12612)
MoveTo(14110,14037)
MoveTo(14687,14697)
MoveTo(14765,15633)
MoveTo(15223,15815)
MoveTo(15197,16410)
$Nicholas = GetNearestNPCToCoords(15278, 16507)
RNDSLP(1000)
GoToNPC($Nicholas)
Dialog(133)
RNDSLP(500)
Dialog(134)
RNDSLP(1000)
EndFunc
Func Quit()
Exit
EndFunc
#Region Map ID
Func Farm_GoStartingOutpost()
Local $MapID
If GetMapID() <> $MapID Then ;Fort Ranik
logFile("Moving to Fort Ranik")
Do
RndTravel($MapID)
rndslp(500)
Until GetMapID() = $MapID
EndIf
EndFunc
Func Farm_GoOutpostPortal()
Local $lAgent = GetAgentByID(-2)
Local $MyPosX = DllStructGetData($lAgent, 'X')
Local $MyPosY = DllStructGetData($lAgent, 'Y')
RndSleep(250)
If (($MyPosX < 26000) AND ($MyPosX > 25000) AND ($MyPosY < 15000) AND ($MyPosY > 14000)) Then
;Pos A : Bottom part of the Fort
MoveTo(23712,14024)
MoveTo(22902,13584)
MoveTo(22565,9616)
Move(22614,6849)
ElseIf (($MyPosX < 24000) AND ($MyPosX > 23000) AND ($MyPosY < 14000) AND ($MyPosY > 13000)) Then
;Pos B : West slope
MoveTo(22902,13584)
MoveTo(22565,9616)
Move(22614,6849)
ElseIf (($MyPosX < 23000) AND ($MyPosX > 22000) AND ($MyPosY < 12000) AND ($MyPosY > 11000)) Then
;Pos C : Top-west of the Fort
MoveTo(23273,11555)
MoveTo(22565,9616)
Move(22614,6849)
ElseIf (($MyPosX < 23000) AND ($MyPosX > 22000) AND ($MyPosY < 11000) AND ($MyPosY > 10000)) Then
;Pos D : When re-entering portal
MoveTo(22565,9616)
Move(22614,6849)
Else
;#TODO
EndIf
EndFunc
i start the bot but nothing happens....
EDIT: The bot starts goes to portal, then after that instead of going straight it goes right and gets stuck. Is there a way to check and make sure that area is loaded before using the moveto function?