Advertisement
Whiteaxe

partner2

Jan 15th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.65 KB | None | 0 0
  1. # partner script, if you have a hunting parter for MA'ing, this script works for diff things
  2.  
  3. friendlist = ["Aethor","Aethorious", "Celebrim", "Sanch", "Ceba", "Arakus", "Issibella "]
  4.  
  5. def wait_rt
  6. target_line = matchtimeout 4, "Roundtime:", "Cast Roundtime"
  7. if (target_line =~ /Roundtime\: (\d+) sec/i)
  8. sleep $1.to_f
  9. elsif (target_line =~ /Cast Roundtime (\d+) seconds/i)
  10. sleep $1.to_f
  11. end
  12. end
  13. def change_stance( new_stance, force = true )
  14. return if Spell[1617].active? || Spell[216].active? || dead?
  15.  
  16. if( stance() =~ /#{new_stance}/ )
  17. return
  18. elsif( checkcastrt() > 0 && new_stance =~ /def/ )
  19. return if stance() == 'guarded'
  20. end
  21.  
  22. if(force)
  23. result = dothistimeout( "stance #{new_stance}", 3, /You are now in an?|Cast Round Time in effect|You are unable to change/ )
  24. else
  25. fput "stance #{new_stance}"
  26. end
  27. end
  28. def stand()
  29.  
  30. fput "stand" if !standing? && !muckled? && checkrt == 0
  31. until(standing?)
  32. change_stance('defensive')
  33. fput 'stand'
  34. end
  35. end
  36. def npcs
  37. npcs = GameObj.npcs.find_all { |i| i.status !~ /dead/ }
  38. end
  39. def spellactive
  40. if Char.name =~ /Ceba/
  41. if !Spell[716].active
  42. Spell[716].cast if mana(20)
  43. end
  44. if !Spell[712].active
  45. Spell[712].cast if mana(20)
  46. end
  47. if !Spell[1711].active
  48. multifput "get orb from my #{UserVars.lootsack}", "rub orb", "put orb in my #{UserVars.lootsack}"
  49. end
  50. if !Spell[1712].active
  51. multifput "get statue from my #{UserVars.lootsack}", "rub my statue", "put my statue in my #{UserVars.lootsack}"
  52. end
  53. elsif Char.name =~ /Arakus/
  54. if !Spell[1711].active
  55. multifput "get orb from my #{UserVars.lootsack}", "rub orb", "put orb in my #{UserVars.lootsack}"
  56. end
  57. if !Spell[1712].active
  58. multifput "get statue from my #{UserVars.lootsack}", "rub my statue", "put my statue in my #{UserVars.lootsack}"
  59. end
  60. end
  61. end
  62. while(true)
  63.  
  64. target_line = waitfor("gestures at","rubs a small statue in his hand","gives his disk","offers you","is stunned","winks at you","swings a vultite falchion at", /\[Private\]\-/ )
  65.  
  66. friendlist.each do |person|
  67.  
  68. if(target_line =~ /#{person} winks at you./i)
  69. if mana?(60)
  70. fput "send 40 #{person}"
  71. else
  72. fput "wave #{person}"
  73. fput "snicker #{person}"
  74. end
  75. #elsif(target_line =~ /gives his disk./i)
  76. #fput "turn #{Char.name} disk"
  77. #exit
  78. elsif(target_line =~ /#{person} rubs a small statue in his hand./i)
  79. if !Spell[1712].active
  80. fput "put ##{GameObj.left_hand.id} in my #{UserVars.lootsack}"
  81. multifput "get my statue","rub my statue","stow my statue"
  82. waitcastrt?
  83. end
  84. elsif(target_line =~ /#{person} is stunned./i)
  85. if Char.name =~ /Ceba/
  86. if mana?(10)
  87. multifput "prep 108", "cast #{person}"
  88. end
  89. end
  90. elsif(target_line =~ /#{person} gestures at./i)
  91. if Char.name =~ /Issibella/
  92. stand() if !standing?
  93. multifput "stance off", "attack",
  94. waitrt?
  95. fput "stance defens"
  96. elsif Char.name =~ /Ceba/
  97. stand() if !standing?
  98. change_stance('guarded')
  99. Spell[702].cast if mana(10)
  100. waitcastrt?
  101. elsif Char.name =~ /Arakus/
  102. stand() if !standing?
  103. change_stance('guarded')
  104. Spell[1106].cast if mana(10)
  105. waitcastrt?
  106. elsif Char.name =~ /Celebrim/
  107. if mana?(10)
  108. stand() if !standing?
  109. change_stance('offensive')
  110. Spell[903].cast if mana(10)
  111. change_stance('guarded')
  112. waitcastrt?
  113. elsif
  114. multifput "stance offens", "put ##{GameObj.left_hand.id} in #{UserVars.lootsack}","get wand from my long", "wave wand at target", "stow wand", "stance defensive"
  115. waitcastrt?
  116. end
  117.  
  118. elsif Char.name =~ /Sanch/
  119. stand() if !standing?
  120. change_stance('guarded')
  121. Spell[302].cast if mana(10)
  122. waitcastrt?
  123. end
  124. elsif(target_line =~ /#{person} offers you./i)
  125. fput "put ##{GameObj.left_hand.id} in #{UserVars.lootsack}"
  126. fput "accept"
  127. fput "put ##{GameObj.left_hand.id} in #{UserVars.lootsack}"
  128. if checkleft !=nil
  129. fput "put ##{GameObj.left_hand.id} in my #{UserVars.lootsack}"
  130. elsif checkright.nil?
  131. if Char.name =~ /Celebrim/
  132. fput "get my runestaff"
  133. elsif Char.name =~ /Issibella/
  134. fput "get my falchion"
  135. elsif Char.name =~ /Arakus/
  136. fput "get my runestaff"
  137. elsif Char.name =~ /Ceba/
  138. fput "get my runestaff"
  139. elsif Char.name =~ /Sanch/
  140. fput "get my runestaff"
  141. end
  142. end
  143. elsif(target_line =~ /#{person} swings a vultite falchion at./i)
  144. if Char.name =~ /Issibella/
  145. stand() if !standing?
  146. change_stance('offensive')
  147. fput "attack"
  148. waitrt?
  149. change_stance('guarded')
  150. elsif Char.name =~ /Ceba/
  151. stand() if !standing?
  152. #spellactive
  153. change_stance('guarded')
  154. Spell[702].cast if mana(10)
  155. waitcastrt?
  156. elsif Char.name =~ /Arakus/
  157. stand() if !standing?
  158. #spellactive
  159. change_stance('guarded')
  160. Spell[1106].cast if mana(10)
  161. waitcastrt?
  162. elsif Char.name =~ /Sanch/
  163. stand() if !standing?
  164. #spellactive
  165. change_stance('guarded')
  166. Spell[302].cast if mana(10)
  167. waitcastrt?
  168. elsif Char.name =~ /Celebrim/
  169. if mana?(10)
  170. stand() if !standing?
  171. #spellactive
  172. change_stance('offensive')
  173. Spell[903].cast if mana(10)
  174. change_stance('guarded')
  175. waitcastrt?
  176. elsif
  177. multifput "stance offens", "put ##{GameObj.left_hand.id} in #{UserVars.lootsack}","get wand from my long", "wave wand at target", "stow wand", "stance defensive"
  178. waitcastrt?
  179. end
  180. end
  181. end
  182. end
  183. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement