I have a bot that works great but I don't know how to add a script to pick up the items. Can anyone help me with this? Thanks a lot in advance!
Quote:
Func PickUpLoot()
Local $lMe
Local $lBlockedTimer
Local $lBlockedCount = 0
Local $lItemExists = True
Local $Distance
For $i = 1 To GetMaxAgents()
If GetIsDead(-2) Then Return False
$lAgent = GetAgentByID($i)
If Not GetIsMovable($lAgent) Then ContinueLoop
$lDistance = GetDistance($lAgent)
If $lDistance > 2000 Then ContinueLoop
$lItem = GetItemByAgentID($i)
If CanPickup($lItem) Then
Do
If GetDistance($lAgent) > 150 Then Move(DllStructGetData($lAgent, 'X'), DllStructGetData($lAgent, 'Y'), 100)
PickUpItem($lItem)
Sleep(GetPing())
Do
Sleep(100)
$lMe = GetAgentByID(-2)
Until DllStructGetData($lMe, 'MoveX') == 0 And DllStructGetData($lMe, 'MoveY') == 0
$lBlockedTimer = TimerInit()
Do
Sleep(3)
$lItemExists = IsDllStruct(GetAgentByID($i))
Until Not $lItemExists Or TimerDiff($lBlockedTimer) > Random(500, 1000, 1)
If $lItemExists Then $lBlockedCount += 1
Until Not $lItemExists Or $lBlockedCount > 5
EndIf
Next
EndFunc