Advertisement
Guest User

action

a guest
Sep 23rd, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 KB | None | 0 0
  1. init start
  2. -- local SCRIPT_VERSION = '1.0.1'
  3.  
  4. local boots = 'depth calcei' -- 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 = '' -- 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 $timems < warningmsgtime then
  31. 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!')
  32. else
  33. listas('Soft Boots Changer')
  34. end
  35.  
  36. local cur = {mppc = $mppc, hppc = $hppc, mp = $mp, hp = $hp}
  37. if $feet.id == soft.use then
  38. if $pzone or cur[ntype] > nunequip then
  39. if itemcount(boots.id, 'backpack') > 0 then
  40. equipitem(boots.id, 'feet', 'backpack', 100) waitping()
  41. else
  42. moveitems(soft.use, 'backpack', 'feet', 100) waitping()
  43. end
  44. nunequip = math.random(unpack(softnumbers.unequip))
  45. end
  46. elseif $feet.id == soft.worn or $feet.id == 0 then
  47. if cur[ntype] < nequip and not $pzone and itemcount(soft.id, 'backpack') > 0 then
  48. equipitem(soft.id, 'feet', 'backpack', 100) waitping()
  49. nequip = math.random(unpack(softnumbers.equip))
  50. else
  51. if itemcount(boots.id) > 0 then
  52. equipitem(boots.id, 'feet', 'backpack', 100) waitping()
  53. elseif $feet.id > 0 then
  54. moveitems(soft.worn, 'backpack', 'feet', 100) waitping()
  55. end
  56. nunequip = math.random(unpack(softnumbers.unequip))
  57. end
  58. elseif $feet.id == boots.id then
  59. if cur[ntype] < nequip and not $pzone and itemcount(soft.id, 'backpack') > 0 then
  60. equipitem(soft.id, 'feet', 'backpack', 100) waitping()
  61. nequip = math.random(unpack(softnumbers.equip))
  62. end
  63. end
  64.  
  65. if alertifnosoft and $feet.id ~= soft.use and itemcount(soft.id) == 0 and itemcount(soft.worn) > 10 then
  66. playsoundflash(soundfile)
  67. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement