Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Func Store()
- StoreBag(1)
- StoreBag(2)
- StoreBag(3)
- StoreBag(4)
- EndFunc
- Func UnStore()
- For $i = 6 To 16
- StoreChest($i)
- Next
- EndFunc
- Func StoreBag($aBag)
- Out("Storing bag " & $aBag)
- If Not IsPtr($aBag) Then $aBag = GetBagPtr($aBag)
- Local $lItem
- Local $lSlot
- If IsChestFull() Then
- $boolRunning = False
- EndIf
- For $i = 1 To MemoryRead($aBag + 32, 'long')
- If $boolRunning = False Then
- ExitLoop
- EndIf
- $stockable = false
- $lItem = GetItemPtrBySlot($aBag, $i)
- If $lItem = 0 Then ContinueLoop
- $m = MemoryRead($lItem + 44, 'long')
- $r = GetRarity($lItem)
- If _ArraySearch($ArrayModelIDInv, $m) <> -1 Then
- $stockable = True
- ElseIf $r = $rGold And getchecked($iGold) Then
- $stockable = True
- EndIf
- If $stockable == True Then
- $lExtraID = MemoryRead($lItem + 34, 'short')
- $lSlot = FindStorageStack($m, $lExtraID)
- If IsArray($lSlot) And getchecked($iGold) == False Then
- MoveItem($lItem, $lSlot[0], $lSlot[1])
- Sleep(GetPing() + Random(500, 750, 1))
- $i -= 1
- Else
- $lSlot = OpenStorageSlot()
- If IsArray($lSlot) Then
- MoveItem($lItem, $lSlot[0], $lSlot[1])
- Sleep(GetPing() + Random(500, 750, 1))
- EndIf
- EndIf
- EndIf
- Next
- EndFunc ;==>StoreBag
- Func StoreChest($aBag)
- Out("UnStoring chest " & $aBag & ".")
- If Not IsPtr($aBag) Then $aBag = GetBagPtr($aBag)
- Local $lItem
- Local $lSlot
- If IsInvFull() Then
- $boolRunning = False
- EndIf
- For $i = 1 To MemoryRead($aBag + 32, 'long')
- If $boolRunning = False Then
- ExitLoop
- EndIf
- $stockable = false
- $lItem = GetItemPtrBySlot($aBag, $i)
- If $lItem = 0 Then ContinueLoop
- $m = MemoryRead($lItem + 44, 'long')
- $r = GetRarity($lItem)
- If _ArraySearch($ArrayModelIDInv, $m) <> -1 Then
- $stockable = True
- ElseIf $r = $rGold And getchecked($iGold) Then
- $stockable = True
- EndIf
- If $stockable == True Then
- $lSlot = FindBackpackStack($m)
- If IsArray($lSlot) And getchecked($iGold) == False Then
- MoveItem($lItem, $lSlot[0], $lSlot[1])
- Sleep(GetPing() + Random(500, 750, 1))
- $i -= 1
- Else
- $lSlot = OpenInventorySlot()
- If IsArray($lSlot) Then
- MoveItem($lItem, $lSlot[0], $lSlot[1])
- Sleep(GetPing() + Random(500, 750, 1))
- EndIf
- EndIf
- EndIf
- Next
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement