Quote:
To make it pick up everything?
Func pickuploot()
Local $lme
Local $lblockedtimer
Local $lblockedcount = 0
Local $litemexists = True
For $i = 1 To getmaxagents()
$lme = getagentbyid(-2)
If DllStructGetData($lme, "HP") <= 0 Then Return -1
$lagent = getagentbyid($i)
If NOT getismovable($lagent) Then ContinueLoop
If NOT getcanpickup($lagent) Then ContinueLoop
$litem = getitembyagentid($i)
If canpickup($litem) Then
Do
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(5000, 7500, 1)
If $litemexists Then $lblockedcount += 1
Until NOT $litemexists OR $lblockedcount > 5
EndIf
Next
EndFunc
Func pickupitem($aitem)
Local $lagentid
If IsDllStruct($aitem) = 0 Then
$lagentid = $aitem
ElseIf DllStructGetSize($aitem) < 400 Then
$lagentid = DllStructGetData($aitem, "AgentID")
Else
$lagentid = DllStructGetData($aitem, "ID")
EndIf
Return sendpacket(12, 56, $lagentid, 0)
EndFunc
Func getcanpickup($aagent)
If IsDllStruct($aagent) = 0 Then $aagent = getagentbyid($aagent)
If getassignedtome($aagent) OR DllStructGetData($aagent, "Owner") = 0 Then
Return True
Else
Return False
EndIf
EndFunc
//this is or something equal is what you should already have
Func canpickup($aitem)
;previous code
return True
EndFunc
//insert return True into the first line of canpickup.
In case there is no pickup function at all: insert one (as above for example) and let it run after each fight/checkpoint. Fuck runtime anyway, it's a bot that executes 1000 times faster than the game reacts.
Dat 30 mins of work?
Where do you put these lines of code so it will pick up items? mine opens end chest as bot should but doesnt pick anything up