Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sdRefill = 50
- sdTake = 1900
- sd = Item.GetID('sudden death rune')
- registerEventListener(WALKER_SELECTLABEL, 'onWalkerSelectLabel')
- function onWalkerSelectLabel(labelName)
- if labelName == 'checkSD' then
- if Self.ItemCount(sd) > sdRefill then
- Walker.Goto('HUNT')
- else
- Walker.Goto('refillSD')
- end
- end
- if labelName == 'buySD' then
- setWalkerEnabled(false)
- Self.SayToNpc({'hi', 'trade'})
- wait(200, 500)
- if Self.ItemCount(14089) > 0 then
- repeat
- Self.ShopSellAllItems(14089)
- until
- Self.ItemCount(14089) == 0
- end
- wait(200, 500)
- if Self.ItemCount(14088) > 0 then
- repeat
- Self.ShopSellAllItems(14088)
- until
- Self.ItemCount(14088) == 0
- end
- wait(200, 500)
- if Self.ItemCount(14086) > 0 then
- repeat
- Self.ShopSellAllItems(14086)
- until
- Self.ItemCount(14086) == 0
- end
- wait(200, 500)
- if Self.ItemCount(14083) > 0 then
- repeat
- Self.ShopSellAllItems(14083)
- until
- Self.ItemCount(14083) == 0
- end
- wait(200, 500)
- if Self.ItemCount(14087) > 0 then
- repeat
- Self.ShopSellAllItems(14087)
- until
- Self.ItemCount(14087) == 0
- end
- wait(200, 500)
- if Self.ItemCount(14081) > 0 then
- repeat
- Self.ShopSellAllItems(14081)
- until
- Self.ItemCount(14081) == 0
- end
- wait(200, 500)
- if Self.ItemCount(14225) > 0 then
- repeat
- Self.ShopSellAllItems(14225)
- until
- Self.ItemCount(14225) == 0
- end
- wait(200, 500)
- if Self.ItemCount(14076) > 0 then
- repeat
- Self.ShopSellAllItems(14076)
- until
- Self.ItemCount(14076) == 0
- end
- wait(200, 500)
- if Self.ItemCount(14079) > 0 then
- repeat
- Self.ShopSellAllItems(14079)
- until
- Self.ItemCount(14079) == 0
- end
- wait(200, 500)
- if Self.ItemCount(14078) > 0 then
- repeat
- Self.ShopSellAllItems(14078)
- until
- Self.ItemCount(14078) == 0
- end
- wait(200, 500)
- if Self.ItemCount(sd) < sdTake then
- wait(200, 500)
- repeat
- Self.ShopBuyItemsUpTo(sd, sdTake)
- until
- Self.ItemCount(sd) > sdRefill
- end
- end
- setWalkerEnabled(true)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement