Advertisement
Fwaky

Untitled

Mar 14th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. init start
  2. -- local SCRIPT_VERSION = '1.0.1'
  3.  
  4. local boots = 'boots of haste' -- this is the alternative boots, to equip while you are in pz, or you have enough mana
  5. local softnumbers = {consider = 'mppc', equip = {65,75}, unequip = {85,95}} -- check this, it's randomized, in this example it will equip soft if you have less than 40~60% of MP, and equip soft boots if you have more than 80~90% of MP.
  6. local alertifnosoft = true -- this will play an alert if a soft wasn't found on your backpacks.
  7. local soundfile = 'monster.wav' -- this is the sound you want to use play when you have no soft
  8. -- dont change anything below.
  9.  
  10. local soft = {id = 6529, use = 3549, worn = 6530}
  11. local firewalker = {id = 9019, use = 9018, worn = 9020, enchantid = 676}
  12. boots = itemid(boots)
  13. if boots == 6529 then
  14. boots = {id = boots, use = 3549, worn = 6530}
  15. elseif boots == 9019 then
  16. boots = {id = boots, use = 9018, worn = 9020}
  17. else
  18. boots = {id = boots, use = boots, worn = boots}
  19. end
  20. local ntype,nequip,nunequip = softnumbers.consider:lower(), math.random(unpack(softnumbers.equip)), math.random(unpack(softnumbers.unequip))
  21. local warningmsgtime = 0
  22. if getsetting('Settings/MouseMode') == 'Simulate Mouse' then
  23. warningmsgtime = $timems+20000
  24. end
  25.  
  26. setpriority(100, 0, 1000, 10000, false)
  27. init end
  28.  
  29. auto(300,700)
  30. if(getuseroption('softsrefill')) then
  31. if $timems < warningmsgtime then
  32. listas('BE CAREFUL!! If you do a left click on your screen while the script is trying to move the boots you may lose your item!')
  33. else
  34. listas('Soft Boots Changer')
  35. end
  36.  
  37. local cur = {mppc = $mppc, hppc = $hppc, mp = $mp, hp = $hp}
  38. if $feet.id == soft.use then
  39. if $pzone or cur[ntype] > nunequip then
  40. if itemcount(boots.id, 'backpack') > 0 then
  41. equipitem(boots.id, 'feet', 'backpack', 100) waitping()
  42. else
  43. moveitems(soft.use, 'backpack', 'feet', 100) waitping()
  44. end
  45. nunequip = math.random(unpack(softnumbers.unequip))
  46. end
  47. elseif $feet.id == soft.worn or $feet.id == 0 then
  48. if cur[ntype] < nequip and not $pzone and itemcount(soft.id, 'backpack') > 0 then
  49. equipitem(soft.id, 'feet', 'backpack', 100) waitping()
  50. nequip = math.random(unpack(softnumbers.equip))
  51. else
  52. if itemcount(boots.id) > 0 then
  53. equipitem(boots.id, 'feet', 'backpack', 100) waitping()
  54. elseif $feet.id > 0 then
  55. moveitems(soft.worn, 'backpack', 'feet', 100) waitping()
  56. end
  57. nunequip = math.random(unpack(softnumbers.unequip))
  58. end
  59. elseif $feet.id == boots.id then
  60. if cur[ntype] < nequip and not $pzone and itemcount(soft.id, 'backpack') > 0 then
  61. equipitem(soft.id, 'feet', 'backpack', 100) waitping()
  62. nequip = math.random(unpack(softnumbers.equip))
  63. end
  64. end
  65.  
  66. if alertifnosoft and $feet.id ~= soft.use and itemcount(soft.id) == 0 and itemcount(soft.worn) > 0 then
  67. playsoundflash(soundfile)
  68. end
  69. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement