Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. sdRefill = 50
  2. sdTake = 1900
  3. sd = Item.GetID('sudden death rune')
  4.  
  5.  
  6. registerEventListener(WALKER_SELECTLABEL, 'onWalkerSelectLabel')
  7. function onWalkerSelectLabel(labelName)
  8.  
  9. if labelName == 'checkSD' then
  10. if Self.ItemCount(sd) > sdRefill then
  11. Walker.Goto('HUNT')
  12. else
  13. Walker.Goto('refillSD')
  14. end
  15. end
  16.  
  17. if labelName == 'buySD' then
  18. setWalkerEnabled(false)
  19. Self.SayToNpc({'hi', 'trade'})
  20. wait(200, 500)
  21.  
  22. if Self.ItemCount(14089) > 0 then
  23. repeat
  24. Self.ShopSellAllItems(14089)
  25. until
  26. Self.ItemCount(14089) == 0
  27. end
  28. wait(200, 500)
  29. if Self.ItemCount(14088) > 0 then
  30. repeat
  31. Self.ShopSellAllItems(14088)
  32. until
  33. Self.ItemCount(14088) == 0
  34. end
  35. wait(200, 500)
  36. if Self.ItemCount(14086) > 0 then
  37. repeat
  38. Self.ShopSellAllItems(14086)
  39. until
  40. Self.ItemCount(14086) == 0
  41. end
  42. wait(200, 500)
  43. if Self.ItemCount(14083) > 0 then
  44. repeat
  45. Self.ShopSellAllItems(14083)
  46. until
  47. Self.ItemCount(14083) == 0
  48. end
  49. wait(200, 500)
  50. if Self.ItemCount(14087) > 0 then
  51. repeat
  52. Self.ShopSellAllItems(14087)
  53. until
  54. Self.ItemCount(14087) == 0
  55. end
  56. wait(200, 500)
  57. if Self.ItemCount(14081) > 0 then
  58. repeat
  59. Self.ShopSellAllItems(14081)
  60. until
  61. Self.ItemCount(14081) == 0
  62. end
  63. wait(200, 500)
  64. if Self.ItemCount(14225) > 0 then
  65. repeat
  66. Self.ShopSellAllItems(14225)
  67. until
  68. Self.ItemCount(14225) == 0
  69. end
  70. wait(200, 500)
  71. if Self.ItemCount(14076) > 0 then
  72. repeat
  73. Self.ShopSellAllItems(14076)
  74. until
  75. Self.ItemCount(14076) == 0
  76. end
  77. wait(200, 500)
  78. if Self.ItemCount(14079) > 0 then
  79. repeat
  80. Self.ShopSellAllItems(14079)
  81. until
  82. Self.ItemCount(14079) == 0
  83. end
  84. wait(200, 500)
  85. if Self.ItemCount(14078) > 0 then
  86. repeat
  87. Self.ShopSellAllItems(14078)
  88. until
  89. Self.ItemCount(14078) == 0
  90. end
  91. wait(200, 500)
  92.  
  93. if Self.ItemCount(sd) < sdTake then
  94. wait(200, 500)
  95. repeat
  96. Self.ShopBuyItemsUpTo(sd, sdTake)
  97. until
  98. Self.ItemCount(sd) > sdRefill
  99. end
  100. end
  101.  
  102.  
  103. setWalkerEnabled(true)
  104.  
  105.  
  106. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement