Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PREPAIR WIRKLICH IMPLEMENTIEREN
- ___________________________________________________________________________________________
- ;ENSURE ENGLISH
- Func GuiButtonHandler()
- If $BotRunning Then
- GUICtrlSetData($Button, "Will pause after this run")
- GUICtrlSetState($Button, $GUI_DISABLE)
- $BotRunning = False
- ElseIf $BotInitialized Then
- GUICtrlSetData($Button, "Pause")
- $BotRunning = True
- Else
- Out("Initializing")
- Local $CharName = GUICtrlRead($Input)
- If $CharName=="" Then
- ;If Initialize(ProcessExists("gw.exe"), True, True, False) = False Then
- If Initialize(ProcessExists("gw.exe"), True) = False Then
- MsgBox(0, "Error", "Guild Wars is not running.")
- Exit
- EndIf
- Else
- ;If Initialize($CharName, True, True, False) = False Then
- If Initialize($CharName, True) = False Then
- MsgBox(0, "Error", "Could not find a Guild Wars client with a character named '"&$CharName&"'")
- Exit
- EndIf
- EndIf
- EnsureEnglish(True)
- GUICtrlSetState($Checkbox, $GUI_ENABLE)
- GUICtrlSetState($Leeching, $GUI_ENABLE)
- GUICtrlSetState($MapPieces, $GUI_ENABLE)
- GUICtrlSetState($Tomes, $GUI_ENABLE)
- GUICtrlSetState($StoreGolds, $GUI_ENABLE)
- GUICtrlSetState($Input, $GUI_DISABLE)
- GUICtrlSetData($Button, "Pause")
- WinSetTitle($mainGui, "", "VBot-" & GetCharname())
- $BotRunning = True
- $BotInitialized = True
- EndIf
- EndFunc
- #EndRegion GUI
- -----------------------------------------------------------------------------------
- ;PickUpCount
- Global Const $shard = 945
- $shardlabel = GUICtrlCreateLabel("0", 48, 111, 20, 17)
- GUICtrlSetColor(-1, 0xFF0000)
- Func canpickup($lItem)
- $m = DllStructGetData($lItem, 'ModelID')
- $c = DllStructGetData($lItem, 'ExtraID')
- if $m = $ruby Or $m = $obbykey Or $m = $saph Or $m = $darkremains Or $m = $dust Or $m = $scroll Then
- Return True
- ElseIf ($m = 146 And ($c = 10 Or $c = 12 Or $c = 13)) Or $m = 22751 Then ;Dyes/Lockpicks
- Return True
- ElseIf $m = $shard Then
- $shardcount = $shardcount + 1
- GUICtrlSetData($shardlabel,$shardcount)
- Return True
- Else
- Return False
- EndIf
- EndFunc ;==>canpickup
- ----------------------------------------------------------------------------------
- enszre save enter
- global $ensuresafety = True ; will zone until it finds empty dis , and wont kneel if people in town
- Func safety()
- if GUICtrlRead($Checkbox1) = $gui_checked Then
- $ensuresafety = True
- out("safe mode")
- Else
- $ensuresafety = False
- out("will ignore people")
- EndIf
- EndFunc
- func enterkneel()
- if $ensuresafety Then
- do
- rndtravel($town)
- rndsleep(200)
- until isdisempty()
- else
- rndtravel($town)
- EndIf
- if getmapid() = $chantry Then
- out("zoning to chantry")
- rndsleep(400)
- kneel(-9979,1171)
- elseif getmapid() = $toa Then
- out("zoning to toa")
- rndsleep(200)
- kneel(-2522,18731)
- EndIf
- EndFunc
- unc moveandcheckdis($ax,$ay,$arandom = 65) ; for noids , replace this with moveto() in kneel,will change dis as soon as it detect s1
- Local $lBlocked = 0
- Local $lMe
- Local $lMapLoading = GetMapLoading(), $lMapLoadingOld
- Local $lDestX = $aX + Random(-$aRandom, $aRandom)
- Local $lDestY = $aY + Random(-$aRandom, $aRandom)
- $notalone = False
- Move($lDestX, $lDestY, 0)
- Do
- Sleep(100)
- $lMe = GetAgentByID(-2)
- If DllStructGetData($lMe, 'HP') <= 0 Then ExitLoop
- $lMapLoadingOld = $lMapLoading
- $lMapLoading = GetMapLoading()
- If $lMapLoading <> $lMapLoadingOld Then ExitLoop
- If DllStructGetData($lMe, 'MoveX') == 0 And DllStructGetData($lMe, 'MoveY') == 0 Then
- $lBlocked += 1
- $lDestX = $aX + Random(-$aRandom, $aRandom)
- $lDestY = $aY + Random(-$aRandom, $aRandom)
- Move($lDestX, $lDestY, 0)
- EndIf
- if not isdisempty() Then
- enterfow()
- EndIf
- Until ComputeDistance(DllStructGetData($lMe, 'X'), DllStructGetData($lMe, 'Y'), $lDestX, $lDestY) < 100 Or $lBlocked > 14
- func isdisempty()
- local $peoplecount = -1
- $lAgentArray = GetAgentArray()
- For $i = 1 To $lAgentArray[0]
- $aAgent = $lAgentArray[$i]
- if isagenthuman($aagent) Then
- $peoplecount += 1
- EndIf
- Next
- if $peoplecount > 0 Then
- if $town = $chantry then
- out("dis not empty, going toa")
- $town = $toa
- Else
- out("dis not empty, going chaantry")
- $town = $chantry
- EndIf
- Return False
- Else
- out("dis empty")
- return True
- EndIf
- EndFunc
- func isagenthuman($aagent)
- if DllStructGetData($aagent,'Allegiance') <> 1 then Return
- $thename = GetPlayerName($aAgent)
- if $thename = "" then Return
- Return True
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement