Code:
Func Cheest()
; Out("IS THERE A CHEST???")
Local $ChestSpawn = 0
; If GetIsDead(-2) Then Mainloop()
rndsleep(250)
For $i = 0 To 4
; If GetIsDead(-2) Then Mainloop()
TargetNextItem()
Sleep(50)
$Target = GetCurrentTarget()
Sleep(50)
$Name = GetIsStatic($Target)
Sleep(50)
;~ If GetIsDead(-2) = True Then Mainloop(
If $Name = True Then
$ChestSpawn = $ChestSpawn + 1
; Out("YEAH!!! THERE IS!")
$ChestX = DllStructGetData($Target, 'X')
$ChestY = DllStructGetData($Target, 'Y')
; Out("BADABOUM!! OPENING")
; Global $oStats_Lockpicks = DllStructGetData(GetItemByModelID(22751), 'Quantity')
GoSignpost($Target);go to chest
OpenChest();open chest
; Sleep(350)
; GUICtrlSetData($lblchests, GUICtrlRead($lblchests) + 1)
; $nStats_Lockpicks = DllStructGetData(GetItemByModelID(22751), 'Quantity')
; If $nStats_Lockpicks = $oStats_Lockpicks Then
; Out("Lockpick Not broken!!")
; GUICtrlSetData($lblretained, GUICtrlRead($lblretained) + 1)
; EndIf
; If $nStats_Lockpicks <> $oStats_Lockpicks Then
; Out("Argh! Broken..")
; GUICtrlSetData($lblbroken, GUICtrlRead($lblbroken) + 1)
; EndIf
; $nStats_LuckyPoints = GetLuckyTitle() - $oStats_LuckyPoints
; GUICtrlSetData($lbllucky, $nStats_LuckyPoints)
; $nStats_UnLuckyPoints = GetUnLuckyTitle() - $oStats_UnLuckyPoints
; GUICtrlSetData($lblunlucky, $nStats_UnLuckyPoints)
EndIf
Next
;add drop handling here or let drop handing of fight func pick it up
If $ChestSpawn > 0 Then
;Out("Is it gold?")
DropHandling()
Else
GUICtrlSetData($lblnochest, GUICtrlRead($lblnochest) + 1)
;Out("Oh, no chest!")
EndIf
EndFunc ;==>Cheest
this from pongmei think I used this back in the day to add chest opening to mqsc bot should help?