Advertisement
Guest User

Untitled

a guest
Nov 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. // If the macro is hit too fast, then stop till it's ready to hit again.
  2. if @timerexists 'poisoning' and @timer 'poisoning' < 1000
  3. headmsg 'Patience...' 568
  4. stop
  5. endif
  6. // Make sure we have a kryss to poison and keep an
  7. // alias to it if we find it.
  8. if counttype 0x1401 'any' 'backpack' == 0
  9. headmsg 'I need a kryss to poison...' 568
  10. stop
  11. elseif not findalias 'poison kryss'
  12. @findtype 0x1401 'any' 'backpack'
  13. @setalias 'poison kryss' 'found'
  14. endif
  15. // Clear the poison bottle alias if already there
  16. @unsetalias 'poison bottle'
  17. // Make sure we have a bottle to hold the poison.
  18. if counttype 0xf0e 0 'backpack' == 0
  19. // Well, we have no empty bottle. Maybe we already
  20. // have a poison bottle?
  21. if @findtype 0xf0a 0
  22. @setalias 'poison bottle' 'found'
  23. else
  24. headmsg 'I need a bottle to hold the poison...' 568
  25. stop
  26. endif
  27. endif
  28. // We're going to use the journal here.
  29. // Clear previous entries from being looked at.
  30. @clearjournal
  31. // Let's fill up our bottle if it's not full already.
  32. if not findalias 'poison bottle'
  33. // Find a keg to draw poison from.
  34. if not findalias 'poison keg'
  35. headmsg 'Now where was that keg...' 568
  36. sysmsg 'Please choose a poison keg' 568
  37. promptalias 'poison keg'
  38. endif
  39. useobject 'poison keg'
  40. pause 600
  41. @findtype 0xf0a 0
  42. @setalias 'poison bottle' 'found'
  43. endif
  44. // No more poison, we're all done.
  45. if @injournal 'The keg is empty.' 'system'
  46. headmsg 'All out of poison...' 568
  47. stop
  48. endif
  49. // We're going to make sure that we don't allow poisoning
  50. // too fast. Since the macro pulls poison out of the keg
  51. // spamming it is bad.
  52. if not @timerexists 'poisoning'
  53. createtimer 'poisoning'
  54. endif
  55. settimer 'poisoning' 0
  56. // Let's get to the actual poisoning!
  57. useskill 'Poisoning'
  58. waitfortarget 15000
  59. target! 'poison bottle' // From bottle
  60. waitfortarget 15000
  61. target! 'poison kryss' // To kryss
  62. // We want to wait 5 seconds before we're done, because that's the
  63. // poisoning cooldown. But we want to respond earlier if we accidentally
  64. // poison ourselves. So we wait for the "Oops" message for 5 seconds.
  65. waitforjournal 'You make a grave mistake while applying the poison.' 5000 'system'
  66. // If we're poisoned, move into that logic first.
  67. if poisoned 'self'
  68. while poisoned 'self'
  69. if @findtype 0xf07 0 'backpack' // Cure potion
  70. useobject 'found'
  71. pause 1000
  72. elseif skill 'magery' > 20
  73. cast 'Cure'
  74. waitfortarget 15000
  75. target! 'self'
  76. pause 500
  77. else
  78. headmsg 'I need to cure this!!!' 568
  79. stop
  80. endif
  81. endwhile
  82. // We may not be past the poisoning timer though.
  83. while timer 'poisoning' < 5000
  84. pause 250
  85. endwhile
  86. headmsg 'Bah...' 568
  87. // Otherwise just figure out what to say.
  88. elseif @injournal 'You apply the poison.' 'system'
  89. headmsg 'Done...' 568
  90. elseif @injournal 'You fail to apply a sufficient dose of poison' 'system'
  91. headmsg 'Damn...' 568
  92. endif
  93. // Done!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement