Advertisement
MrTrala

MonkCombo(Alpha)

Sep 3rd, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.62 KB | None | 0 0
  1. --[[
  2. Combo Monk for ArchlightOnline
  3. (Public Version)
  4. By Mr Trala
  5. ]]
  6.  
  7. config = {
  8. ManaRune = 11607, -- ID of your manarune.
  9. ManaCAST = 80, -- x% mana to use manarune.
  10.  
  11. -- Healing Config
  12. Quick = 90, -- x% health to use Quick Prayer.
  13. Pray = 80, -- x% health to use Prayer.
  14. BlessS = 50, -- x% health to use Blessing Spring.
  15. StrongB = 60 -- x% health to use Strong Blessing Spring.
  16. }
  17.  
  18. --[[
  19. Change Log;
  20.  
  21. 1.0 -- First version, added Combo punches module.
  22. 1.0.1 -- Added a healer.
  23. 1.0.2 -- First stable version (With healer and low lvl combo)
  24. 1.0.3 -- Made changes to the healer.
  25. 1.0.4 -- Added Focus module.
  26.  
  27. ]]
  28.  
  29. -- Don't touch anything below this line if you don't know what are you doing.
  30. spells = {
  31. -- Exhausteds
  32. StrongFPEX = 'exura gran ico', -- Strong Flurry of Punches
  33. FlurryPEX = 'exori ico', -- Flurry of Punches
  34. MinFPEX = 'exori gran ico', -- Min Flurry of Punches
  35.  
  36. -- Words
  37. StrongFPWD = 'Strong Flurry of Punches',
  38. FlurryPWD = 'Flurry of Punches',
  39. MinFPWD = 'Min Flurry of Punches',
  40.  
  41. -- Healers
  42. QuickEX = 'exura san', -- Quick Pray
  43. PrayEX = 'exura ico', -- Prayer
  44. BlessEX = 'exura gran mas res', -- Blessing spring
  45. StrongBEX = 'utura gran',-- Strong Blessing Spring
  46.  
  47. QuickW = 'Quick Prayer',
  48. PrayW = 'Prayer',
  49. BlessW = 'Blessing Spring',
  50. StrongBEW = 'Strong Blessing Spring'
  51. }
  52.  
  53. -- Shorts
  54. x = config
  55. s = spells
  56. Cool = Self.GetSpellCooldown
  57. version = '1.0.4A'
  58.  
  59. function onSpeak(channel, message)
  60. -- receives the channel object that called it and the message that was inputted.
  61. if (message == '/list') then
  62. channel:SendYellowMessage('List of Modules', '\n'..
  63. 'Combo -- Basic combo for Monks (Basic 3 punches).\n'..
  64. 'Healer -- This is your healer, dont turn it off, if you dont want to die thats it.\n'..
  65. 'Focus -- A module to keep using Focused Art (enabled by default).\n'..
  66. 'Train -- Use this one to start the training module (exura san + utana vid).\n')
  67. end
  68.  
  69. -- Modules
  70. if (message == '/start Combo') or (message == 'Combo') or (message == 'combo') then
  71. Module.Start('Combo')
  72. channel:SendYellowMessage('Mr Trala', 'The module with the name "Combo" has been started.')
  73.  
  74. elseif (message == '/stop Combo') or (message == '/stop combo') then
  75. Module.Stop('Combo')
  76. channel:SendRedMessage('Mr Trala', 'The module with the name "Combo" has been stopped.')
  77.  
  78. elseif (message == '/start Focus') or (message == 'Focus') or (message == 'focus') then
  79. Module.Start('Focus')
  80. channel:SendYellowMessage('Mr Trala', 'The module with the name "Focus" has been started.')
  81.  
  82. elseif (message == '/stop Focus') or (message == '/stop focus') then
  83. Module.Stop('Focus')
  84. channel:SendRedMessage('Mr Trala', 'The module with the name "Focus" has been stopped.')
  85.  
  86. elseif (message == '/start Healer') or (message == 'Healer') or (message == 'healer') then
  87. Module.Start('Healer')
  88. channel:SendYellowMessage('Mr Trala', 'The module with the name "Healer" has been started.')
  89.  
  90. elseif (message == '/stop Healer') or (message == '/stop healer') then
  91. Module.Stop('Healer')
  92. channel:SendRedMessage('Mr Trala', 'The module with the name "Healer" has been stopped.')
  93.  
  94.  
  95. end
  96. end
  97.  
  98. function ReOpen()
  99. local customChannel = Channel.New('Monk Channel', onSpeak, onClose)
  100. customChannel:SendYellowMessage('Mr Trala', 'Welcome to the Monk Combo Script, configured specifically for ArchlightOnline.\n'..
  101. 'This Script has been made by Mr Trala, and you are using the Version '..version..'\n'..
  102. 'If you found any bug send a message to Mr Trolo in Archlight.\n')
  103. customChannel:SendOrangeMessage('Instructions', '\n'..
  104. 'Write /list if you want to see a list of the modules you can use\n'..
  105. 'You can start or stop a Module with the command /start or /stop\n')
  106. end
  107.  
  108. function onClose(channel)
  109. -- receives the channel object that called it
  110. print('To close '..channel:Name()..' you need to kill the script.')
  111. ReOpen()
  112. end
  113.  
  114. local customChannel = Channel.New('Monk Channel', onSpeak, onClose)
  115. customChannel:SendYellowMessage('Mr Trala', 'Welcome to the Monk Combo Script, configured specifically for ArchlightOnline.\n'..
  116. 'This Script has been made by Mr Trala, and you are using the Version '..version..'\n'..
  117. 'If you found any bug send a message to Mr Trolo in Archlight.\n')
  118. customChannel:SendOrangeMessage('Instructions', '\n'..
  119. 'Write /list if you want to see a list of the modules you can use\n'..
  120. 'You can start or stop a Module with the command /start or /stop\n')
  121.  
  122. -- Functions
  123. function Combo()
  124. local c = Creature.GetByID(Self.TargetID())
  125. if c:isValid() and c:isAlive() and c:isTarget() and c:DistanceFromSelf() == 1 then
  126. if Cool(s.StrongFPEX) >= 1 and Cool(s.FlurryPEX) >= 1 and Cool(s.MinFPEX) == 0 then
  127. Self.Cast(s.MinFPWD)
  128. Healer2()
  129.  
  130. elseif Cool(s.StrongFPEX) == 0 then
  131. Self.Cast(s.StrongFPWD)
  132. Healer2()
  133.  
  134. elseif Cool(s.StrongFPEX) >= 1 and Cool(s.FlurryPEX) == 0 then
  135. Self.Cast(s.FlurryPWD)
  136. Healer2()
  137. end
  138. end
  139. end
  140.  
  141. function Healer2()
  142. if Self.Health() < x.StrongB and Cool(s.StrongBEX) == 0 and Self.Level() >= 1500 then
  143. Self.UseItem(x.ManaRune)
  144. Self.Say(s.StrongBEW)
  145. end
  146.  
  147. if Self.Health() < x.BlessS and Cool(s.BlessEX) == 0 and Self.Level() >= 1000 then
  148. Self.UseItem(x.ManaRune)
  149. Self.Say(s.BlessW)
  150. end
  151.  
  152. if Self.Health() < x.Pray and Cool(s.PrayEX) == 0 then
  153. Self.UseItem(x.ManaRune)
  154. Self.Say(s.PrayW)
  155. end
  156.  
  157. if Self.Health() < x.Quick and Cool(s.QuickEX) == 0 then
  158. Self.UseItem(x.ManaRune)
  159. Self.Say(s.QuickW)
  160. end
  161.  
  162. if Self.Mana() <= x.ManaCAST then
  163. Self.UseItem(x.ManaRune)
  164. end
  165. end
  166.  
  167. Module('Combo', Combo, false)
  168.  
  169. function FocusT()
  170. local mana = 5
  171. if(Self.Mana() >= mana) then
  172. Self.Cast("Focused Art")
  173. end
  174. end
  175.  
  176. Module.New('Focus', function(Mod)
  177. local exaus = 20
  178. if Self.CanCastSpell('Utani Hur') then
  179. FocusT()
  180. Healer2()
  181. Mod:Delay((exaus * 1000), (exaus * 1000) + 200)
  182. end
  183. end, true)
  184.  
  185. Module('Healer', function(mod)
  186. if Self.Health() < x.StrongB and Cool(s.StrongBEX) == 0 and Self.Level() >= 1500 then
  187. Self.UseItem(x.ManaRune)
  188. Self.Say(s.StrongBEW)
  189. end
  190.  
  191. if Self.Health() < x.BlessS and Cool(s.BlessEX) == 0 and Self.Level() >= 1000 then
  192. Self.UseItem(x.ManaRune)
  193. Self.Say(s.BlessW)
  194. end
  195.  
  196. if Self.Health() < x.Pray and Cool(s.PrayEX) == 0 then
  197. Self.UseItem(x.ManaRune)
  198. Self.Say(s.PrayW)
  199. end
  200.  
  201. if Self.Health() < x.Quick and Cool(s.QuickEX) == 0 then
  202. Self.UseItem(x.ManaRune)
  203. Self.Say(s.QuickW)
  204. end
  205.  
  206. if Self.Mana() <= x.ManaCAST then
  207. Self.UseItem(x.ManaRune)
  208. end
  209. end, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement