Advertisement
DavidJSGardner

Poisoning Macro

Oct 6th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 KB | None | 0 0
  1. ;Make no promises on this macro working, I do not have a character with poisoning so it's all
  2. ;untested
  3. GoSub Setup
  4. While #True
  5. {
  6. GoSub CheckUp
  7.  
  8. While %PoisoningTimer > #SCNT
  9. {
  10. if %PoisoningTimer = N/A
  11. {
  12. Set %PoisoningTimer #SCNT + 1
  13. }
  14. }
  15.  
  16. if %PShieldTimer < #SCNT || %PShieldTimer = N/A
  17. {
  18. GoSub UsePotion 2094
  19. Set %PShieldTimer #SCNT + 300
  20. }
  21. GoSub Poisoning %Poisons %Weapon
  22. }
  23.  
  24. Sub Setup
  25. Event Sysmessage Select your poisons
  26. gosub TargResource Poisons
  27. Event Sysmessage Select your Weapon
  28. gosub TargResource Weapon
  29. return
  30.  
  31. sub TargResource
  32. Set #TargCurs 1
  33.  
  34. While #TargCurs <> 0
  35. wait 1
  36.  
  37. set % . %1 #LTargetID
  38. return
  39.  
  40. sub CheckUp
  41. Set %BreakHPC #False
  42. While %BreakHPC = #False
  43. {
  44. if #charGhost = yes
  45. {
  46. Event Macro 6 0
  47. Event Sysmessage Pausing Macro Due to Death, just key ESC when you are resituated
  48. set %DBreak #False
  49. While %DBreak <> #True
  50. {
  51. OnHotKey ESC
  52. {
  53. Set %DBreak #True
  54. wait 5
  55. }
  56. }
  57. }
  58. if %HealTime < #SCNT || %HealTime = N/A
  59. {
  60. if C in #charstatus
  61. {
  62. event macro 1 0 .Use Bandage
  63. target 5s
  64. event macro 23 0
  65. gosub WaitForJournalEvent You_have_cured You_have_failed
  66. set %HealTime #SCNT + 15
  67. }
  68. if #Hits < #MaxHits
  69. {
  70. event macro 1 0 .Use Bandage
  71. target 5s
  72. event macro 23 0
  73. gosub WaitForJournalEvent You_have_healed You_were_unsuccessful
  74. set %HealTime #SCNT + 15
  75. }
  76. }
  77. Set %HPP ABS ( ( #HITS * 100 ) / #MAXHITS ) )
  78. if %HPP > 60 && C notin #charstatus
  79. {
  80. Set %BreakHPC #True
  81. }
  82. }
  83. return
  84.  
  85. sub WaitForJournalEvent
  86. set %jrnl #jindex
  87. while #true
  88. {
  89. if #jindex > %jrnl
  90. {
  91. set %jrnl %jrnl + 1
  92. scanjournal %jrnl
  93. for %cnt 1 %0
  94. {
  95. set %str % . %cnt
  96. if %str in #journal
  97. {
  98. return
  99. }
  100. }
  101. }
  102. }
  103.  
  104. ;gosub Poisoning %Poisons %Weapon
  105. sub Poisoning
  106. FindItem %1
  107. if #FindCnt < 1
  108. {
  109. Event Sysmessage You are out of poisons my friend.
  110. halt
  111. }
  112.  
  113. Event Macro 13 30
  114. Set #LTargetID %1
  115. while #TargCurs <> 1
  116. {
  117. }
  118.  
  119. Event Macro 22 0
  120.  
  121. Set #LTargetID %2
  122. While #TargCurs <> 1
  123. {
  124. }
  125.  
  126. Event Macro 22 0
  127. Set %PoisoningTimer #SCNT + 11
  128. return
  129.  
  130. ;GoSub UsePotion <PotionColor>
  131. ;=============================
  132. ; Potion Color Table
  133. ; The list order is potion type
  134. ; then next to it the potion colors
  135. ; for each potion strength. Ex:
  136. ; Mana Regen : 2974/2989/2088
  137. ;=============================
  138. ; Normal Potions
  139. ;=============================
  140. ; Agility : 1328/1331/1334
  141. ; Cure : 46/45/44
  142. ; Explosion : 625/624/125
  143. ; Heal : 356/354/2125
  144. ; Poison : 1419/1422/1425
  145. ; Strength : 904/905/906
  146. ; Wisdom : 1375/1374/1373
  147. ; Nightsight : 1109
  148. ; Refresh : 1642/1635
  149. ;=============================
  150. ; Custom Potions
  151. ;=============================
  152. ; Deadly Poison : 2060
  153. ; Equalizer : 1967
  154. ; Magic Reflect : 2027
  155. ; Paralyze : 1957
  156. ; Plague : 2071
  157. ; Paralyze Protection : 1998
  158. ; Holy Water : 1953
  159. ; Clumsy : 2033/2087/2988
  160. ; Flashbang : 2058/1155/1992
  161. ; Incognito : 2984/1947/2050
  162. ; Invisibility : 2048/2053/2051
  163. ; Mana Regen : 2974/2989/2088
  164. ; Mana Vampire : 2020/1941/2060
  165. ; Poison Shield : 2054/2032/2094
  166. ; Protection : 1995/2098/2070
  167. ; Reactive Armor : 2037/2988/2074
  168. ; Regeneration : 1945/1948/2021
  169. ; Shockwave : 1959/1914/2083
  170. ; TrueSight : 288/286/285
  171. ; Weaken : 856/855/854
  172. ;=============================
  173. Sub UsePotion
  174. if %1 <> 0 || %1 <> N/A
  175. {
  176. FindItem WUF C
  177. For #FindIndex 1 #FindCnt
  178. {
  179. if #FindCol = %1
  180. {
  181. Set #LObjectID #FindID
  182. Event Macro 17 0
  183. wait 5
  184. return
  185. }
  186. }
  187. }
  188. else
  189. {
  190. Event Sysmessage Silly Person, You must provide a color to search for!
  191. wait 5
  192. return
  193. }
  194. Event Sysmessage You don't seem to have any more of those potions!
  195. wait 5
  196. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement