Aber GetCurrentTarget geht doch dann nur, wenn ich den bereits anvisiert habe. Und wie mache ich dass, wenn ich den nicht anvisiert habe?
Cmd(CA_GetNearestNpcToCoords,$xcoord,$ycoord)
$npccoords = CmdCB(CA_GetCoords,-1) $xcoord = $npccoords[0] $ycoord = $npccoords[1]
$NPC = CmdCB(CA_GetNearestNpcToCoords,$xcoord,$ycoord) Cmd($CA_GoNpc, $NPC[0])
Cmd($CA_SwitchMode,1) $NPC = Cmd($CA_GetNearestNpcToCoords,-23884,13954) Cmd($CA_GoNpc, $NPC) Cmd($CA_Dialog, 8618497) Cmd($CA_GoNpc, $NPC) Cmd($CA_Dialog, 131)
Cmd($CA_SwitchMode,1) $NPC = CmdCb($CA_GetNearestNpcToCoords,-23884,13954) Cmd($CA_GoNpc, $NPC[0]) Cmd($CA_Dialog, 8618497) Cmd($CA_Dialog, 131)
Stell deine Frage(n) dich einfach in einem passenden Thread. Die Chance, dass dir jemand im "Vorbeigehen" hilft, ist größer als dass sich jemand jetzt ne halbe Stunde dir widmet, denk ich mal;)Quote:
Kann mir wer über ICQ vllt mit mienem Bot helfen, ich bin ratlos.... :(
MfG
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>
#include <tt6.au3>
#include <misc.au3>
#include "GWCAConstants.au3"
#include "InjectDLL.au3" ;Hab ich um DLL zu injecten.
Global $Paused
Global $UmbralID = 639
Global $QGeberID = 16
Global $BountyID = 224
Global $InsideID = 701
Global $GetQ_ID = 8618497
Global $GetInside_ID = 131
Global $Town_Out =
Global $HF_X = -14948.181640625
Global $HF_Y = 11403.0166015625
$Name = InputBox("Fenster Name", "Gib den Guild Wars Win Namen ein.", "Guild Wars")
Global $Hwnd = WinGetHandle($Name)
If IsHwnd($Hwnd) = False Then
MsgBox(0, "Error", "Das GW Fenster wurde nicht gefunden. Eingegebener Win Name war """ & $Name & """")
Exit
EndIf
Global $PID = WinGetProcess($Hwnd)
Global $hprocess = _MemoryOpen($PID)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Zwergenpunkte Farmbot", 509, 430, 411, 185)
GUISetBkColor(0xFFFFE1)
$Button1 = GUICtrlCreateButton("Start", 312, 152, 121, 41, 0)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton("Script pausieren", 312, 232, 121, 41, 0)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetCursor (-1, 0)
$Button3 = GUICtrlCreateButton("Exit", 368, 344, 121, 41, 0)
GUICtrlSetFont(-1, 18, 400, 0, "Arial")
GUICtrlSetCursor (-1, 0)
$Label1 = GUICtrlCreateLabel("Zwergenpunkte Farmbot", 24, 24, 378, 36)
GUICtrlSetFont(-1, 20, 400, 0, "Arial")
$Label2 = GUICtrlCreateLabel("Script pausieren", 50, 243, 121, 41, 0); Hier kommt ein Fertigkeitencode hin
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUISetState(@SW_HIDE)
#EndRegion ### END Koda GUI section ###
GUIRegisterMsg(0x500, "WndCallback")
#cs
_INJECTDLL($Hwnd, @ScriptDir & "\Wazza.dll"); Wazza = fiktiver Name
If @error Then
MsgBox(64,"Error","Couldn't inject DLL, pls restart GW and Bot!")
EndIf
#ce
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Do
If _TownIDRead = $UmbralID
WalkNPC()
If _TownIDRead() = $InsideID Then
getBounty()
_flag()
RandomSleep(20000,30000)
_resign()
EndIf
Else
Cmd($CA_ZONEMAP, $UmbralID)
EndIf
Until $GUI_EVENT_CLOSE
Case $Button2
Pause()
Case $Button3
Exit
EndSwitch
WEnd
func WalkNPC()
Cmd($CA_SwitchMode,1)
$NPC = CmdCB($CA_GetNearestNpcToCoords,-23884,13954)
Cmd($CA_GoNpc, $NPC[0])
Cmd($CA_Dialog, 8618497)
Cmd($CA_Dialog, 131)
EndFunc ;==>WalkNPC
Func getBounty()
$NPC = Cmd($CA_GetNearestNpcToCoords,-14078,15449)
Cmd($CA_GoNpc, $NPC)
Cmd($CA_Dialog, 131)
EndFunc
Func _flag()
$cbType = "int"
Cmd($CA_CommandAll, $HF_X, $HF_Y)
EndFunc ;==> Flag
Func _resign()
Cmd($CA_Resign)
EndFunc
Func Pause()
GUICtrlSetData($Button2, "Script fortsetzen")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button2
ExitLoop
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Sleep(50)
WEnd
GUICtrlSetData($Button2, "Script pausieren")
EndFunc ;==>Pause
Func RandomSleep($min, $max)
$time = Random($min, $max)
Sleep($time)
Endfunc ;==>RandomSleep
Func _TownIDRead()
Return _MemoryRead($Town_Out, $hprocess)
EndFunc
GUIRegisterMsg(0x500, "WndCallback"
$cGUI = GUICreate("GWCA")