Advertisement
MrTrala

MonkCombo(Beta)

Sep 17th, 2016
735
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.69 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.     SDID = 3155, -- ID of your sd.
  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 Strong Healing Spring.
  15.     StrongB = 40 -- 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. 1.0.5 -- Fixed an error in the healer module.
  27. 1.0.6 -- Added a basic sd target module.
  28. 1.0.7 -- Added ComboN module. -- Realeased bcz alot of ppl is asking for it.
  29. 1.0.8 -- Fixed a bug in the healer (Thx to Erma for reporting it).
  30. 1.0.9 -- Fixed a bug in the healer (Thx Spheon for reporting it).
  31. 1.1.0 -- Added an Anty Paralz.
  32. 1.1.1 -- Fixed a little bug in the Combo Module.
  33. ]]
  34.  
  35. -- Don't touch anything below this line if you don't know what are you doing.
  36. spells = {
  37.     -- Exhausteds
  38.     StrongFPEX = 'exura gran ico', -- Strong Flurry of Punches
  39.     FlurryPEX = 'exori ico', -- Flurry of Punches
  40.     MinFPEX = 'exori gran ico', -- Min Flurry of Punches
  41.     KnockEX = 'exevo vis hur', -- Knockout
  42.    
  43.     -- Words
  44.     StrongFPWD = 'Strong Flurry of Punches',
  45.     FlurryPWD = 'Flurry of Punches',
  46.     MinFPWD = 'Min Flurry of Punches',
  47.     KnockWD = 'Knockout Punch',
  48.    
  49.     -- Healers
  50.     QuickEX = 'exura san', -- Quick Pray
  51.     PrayEX = 'exura ico', -- Prayer
  52.     BlessEX = 'utura', -- Strong Healing Spring
  53.     StrongBEX = 'utura gran',-- Strong Blessing Spring
  54.    
  55.     QuickW = 'Quick Prayer',
  56.     PrayW = 'Prayer',
  57.     BlessW = 'Strong Healing Spring',
  58.     StrongBEW = 'Strong Blessing Spring'
  59. }
  60. version = '1.1.1(Beta)'
  61.  
  62. names =
  63. {
  64. {Name = Self.Name()}
  65. }
  66.  
  67. for _, name in ipairs(names) do
  68.     if Self.Name() == name.Name then
  69.         print('Welcome to the Monk Combo Script '..name.Name..'.\n'..
  70.         'You are using the version '..version..'.\n'..
  71.         'Since this is a Beta if you found any bugs please report it to Mr Trala.\n'..
  72.         'Have fun!')
  73.     end
  74. end
  75. -- Shorts
  76. x = config
  77. s = spells
  78. Cool = Self.GetSpellCooldown
  79.  
  80.  
  81. function onSpeak(channel, message)
  82.     -- receives the channel object that called it and the message that was inputted.
  83.     if (message == '/list') then
  84.         channel:SendYellowMessage('List of Modules', '\n'..
  85.         'Combo -- A normal combo for Monks (The 4 punches).\n'..
  86.         'Healer -- This is your healer module (Enabled by default).\n'..
  87.         'Focus -- A module to keep using Focused Art and Anti Paraz (enabled by default).\n'..
  88.         'ComboW -- The same as Combo but without the 650 spell.\n'..
  89.         'Train -- Use this one to start the training module (exura san + utana vid).\n')
  90.     end
  91.    
  92.     -- Modules
  93.     if (message == '/start Combo') or (message == 'Combo') or (message == 'combo') then
  94.         Module.Start('ComboNWS')
  95.         channel:SendYellowMessage('Mr Trala', 'The module with the name "Combo" has been started.')
  96.        
  97.     elseif (message == '/stop Combo') or (message == '/stop combo') then
  98.         Module.Stop('ComboNWS')
  99.         channel:SendRedMessage('Mr Trala', 'The module with the name "Combo" has been stopped.')   
  100.        
  101.     elseif (message == '/start Focus') or (message == 'Focus') or (message == 'focus') then
  102.         Module.Start('Focus')
  103.         channel:SendYellowMessage('Mr Trala', 'The module with the name "Focus" has been started.')
  104.        
  105.     elseif (message == '/stop Focus') or (message == '/stop focus') then
  106.         Module.Stop('Focus')
  107.         channel:SendRedMessage('Mr Trala', 'The module with the name "Focus" has been stopped.')
  108.        
  109.     elseif (message == '/start Healer') or (message == 'Healer') or (message == 'healer') then
  110.         Module.Start('Healer')
  111.         channel:SendYellowMessage('Mr Trala', 'The module with the name "Healer" has been started.')
  112.        
  113.     elseif (message == '/stop Healer') or (message == '/stop healer') then
  114.         Module.Stop('Healer')
  115.         channel:SendRedMessage('Mr Trala', 'The module with the name "Healer" has been stopped.')
  116.        
  117.     elseif (message == '/start SD') or (message == 'SD') or (message == 'sd') then
  118.         Module.Start('SDT')
  119.         channel:SendRedMessage('Mr Trala', 'The module with the name "SDT" has been started.')
  120.    
  121.     elseif (message == '/stop SD') or (message == '/stop sd') then
  122.         Module.Stop('SDT')
  123.         channel:SendRedMessage('Mr Trala', 'The module with the name "SDT" has been stopped.')
  124.        
  125.     elseif (message == '/start ComboW') or (message == 'ComboW') or (message == 'combow') then
  126.         Module.Start('Combo')
  127.         channel:SendRedMessage('Mr Trala', 'The module with the name "ComboW" has been started.')
  128.    
  129.     elseif (message == '/stop ComboW') or (message == '/stop combow') then
  130.         Module.Stop('Combo')
  131.         channel:SendRedMessage('Mr Trala', 'The module with the name "ComboW" has been stopped.')
  132.  
  133.        
  134.     end
  135. end
  136.  
  137. function ReOpen()
  138. local customChannel = Channel.New('Monk Channel', onSpeak, onClose)
  139. customChannel:SendYellowMessage('Mr Trala', 'Welcome to the Monk Combo Script, configured specifically for ArchlightOnline.\n'..
  140.         'This Script has been made by Mr Trala, and you are using the Version '..version..'\n'..
  141.         'If you found any bug or give a suggestion send a message to Mr Trolo in Archlight.\n')
  142. customChannel:SendOrangeMessage('Instructions', '\n'..
  143.         'Write /list if you want to see a list of the modules you can use\n'..
  144.         'You can start or stop a Module with the command /start or /stop\n')
  145. end
  146.  
  147. function onClose(channel)
  148.      -- receives the channel object that called it
  149.      print('To close '..channel:Name()..' you need to kill the script.')
  150.      ReOpen()
  151. end
  152.  
  153. local customChannel = Channel.New('Monk Channel', onSpeak, onClose)
  154. customChannel:SendYellowMessage('Mr Trala', 'Welcome to the Monk Combo Script, configured specifically for ArchlightOnline.\n'..
  155.         'This Script has been made by Mr Trala, and you are using the Version '..version..'\n'..
  156.         'If you found any bug send a message to Mr Trolo in Archlight.\n')
  157. customChannel:SendOrangeMessage('Instructions', '\n'..
  158.         'Write /list if you want to see a list of the modules you can use\n'..
  159.         'You can start or stop a Module with the command /start or /stop\n')
  160.        
  161. -- Functions
  162. function ComboNWS()
  163. local c = Creature.GetByID(Self.TargetID())
  164.     if c:isValid() and c:isAlive()  and c:isTarget() and c:DistanceFromSelf() == 1 then
  165.         if Cool(s.StrongFPEX) >= 1 and Cool(s.FlurryPEX) >= 1 and Cool(s.KnockEX) >= 1 and Cool(s.MinFPEX) == 0 then
  166.             Self.Say(s.MinFPWD)
  167.             Healer2()
  168.            
  169.         elseif Cool(s.StrongFPEX) == 0 then
  170.             Self.Say(s.StrongFPWD)
  171.             Healer2()
  172.            
  173.         elseif Cool(s.StrongFPEX) >= 1 and Cool(s.KnockEX) == 0 then
  174.             Self.Say(s.KnockWD)
  175.             Healer2()
  176.        
  177.         elseif Cool(s.StrongFPEX) >= 1 and Cool(s.KnockEX) >= 1 and Cool(s.FlurryPEX) == 0 then
  178.             Self.Say(s.FlurryPWD)
  179.             Healer2()
  180.         end
  181.     end
  182. end
  183.  
  184. function Combo()
  185. local c = Creature.GetByID(Self.TargetID())
  186.     if c:isValid() and c:isAlive()  and c:isTarget() and c:DistanceFromSelf() == 1  and Self.Level() >= 250 then
  187.         if Cool(s.StrongFPEX) >= 1 and Cool(s.FlurryPEX) >= 1 and Cool(s.MinFPEX) == 0 then
  188.             Self.Cast(s.MinFPWD)
  189.             Healer2()
  190.            
  191.         elseif Cool(s.StrongFPEX) == 0 then
  192.             Self.Cast(s.StrongFPWD)
  193.             Healer2()
  194.        
  195.         elseif Cool(s.StrongFPEX) >= 1  and Cool(s.FlurryPEX) == 0 then
  196.             Self.Cast(s.FlurryPWD)
  197.             Healer2()
  198.         end
  199.     end
  200.    
  201.     if c:isValid() and c:isAlive()  and c:isTarget() and c:DistanceFromSelf() == 1  and Self.Level() <= 249 then   
  202.         if Cool(s.FlurryPEX) == 0 then
  203.             Self.Cast(s.FlurryPWD)
  204.             Healer2()
  205.        
  206.         elseif Cool(s.FlurryPEX) >= 1  and Cool(s.MinFPEX) == 0 then
  207.             Self.Cast(s.MinFPWD)
  208.             Healer2()
  209.         end
  210.     end
  211. end
  212.  
  213. function Healer2()
  214.     if Self.Health() < x.StrongB and Cool(s.StrongBEX) == 0 and Self.Level() >= 1500 then
  215.         Self.UseItem(x.ManaRune)
  216.         Self.Say(s.StrongBEW)
  217.     end
  218.    
  219.     if Self.Health() < x.BlessS and Cool(s.BlessEX) == 0 and Self.Level() >= 1000 then
  220.         Self.UseItem(x.ManaRune)
  221.         Self.Say(s.BlessW)
  222.      end
  223.      
  224.     if Self.Health() < x.Pray and Cool(s.PrayEX) == 0 then
  225.         Self.UseItem(x.ManaRune)
  226.         Self.Say(s.PrayW)
  227.     end
  228.    
  229.     if Self.Health() < x.Quick and Cool(s.QuickEX) == 0 then
  230.         Self.UseItem(x.ManaRune)
  231.         Self.Say(s.QuickW)
  232.     end
  233.    
  234.     if Self.Mana() <= x.ManaCAST and Self.Health() >= x.Quick then
  235.         Self.UseItem(x.ManaRune)
  236.     end
  237. end
  238.  
  239. function SDT()
  240. local c = Creature.GetByID(Self.TargetID())
  241.     if c:isValid() and c:isAlive() and c:DistanceFromSelf() >= 2 then
  242.         Self.UseItemWithTarget(x.SDID)
  243.     end
  244. end
  245.  
  246. function Paraz()
  247.     if Self.isParalyzed() == true and Self.Mana() >= 5  then
  248.         Self.Say("Focused Art")
  249.     end
  250. end
  251.  
  252. registerEventListener(TIMER_TICK, "Paraz")
  253. Module('Combo', Combo, false)
  254. Module('ComboNWS', ComboNWS, false)
  255. Module('SDT', SDT, false)
  256.  
  257. function FocusT()
  258. local mana = 5
  259.     if(Self.Mana() >= mana) then
  260.         Self.Cast("Focused Art")
  261.     end
  262. end
  263.  
  264. Module.New('Focus', function(Mod)
  265. local exaus = 20
  266.     if Self.CanCastSpell('Utani Hur') then
  267.         FocusT()
  268.         Healer2()
  269.         Mod:Delay((exaus * 1000), (exaus * 1000) + 200)
  270.     end
  271. end, true)
  272.  
  273. Module('Healer', function(mod)
  274.     if Self.Health() < x.StrongB and Cool(s.StrongBEX) == 0 and Self.Level() >= 1500 then
  275.         Self.UseItem(x.ManaRune)
  276.         Self.Say(s.StrongBEW)
  277.     end
  278.    
  279.     if Self.Health() < x.BlessS and Cool(s.BlessEX) == 0 and Self.Level() >= 1000 then
  280.         Self.UseItem(x.ManaRune)
  281.         Self.Say(s.BlessW)
  282.      end
  283.      
  284.     if Self.Health() < x.Pray and Cool(s.PrayEX) == 0 then
  285.         Self.UseItem(x.ManaRune)
  286.         Self.Say(s.PrayW)
  287.     end
  288.    
  289.     if Self.Health() < x.Quick and Cool(s.QuickEX) == 0 then
  290.         Self.UseItem(x.ManaRune)
  291.         Self.Say(s.QuickW)
  292.     end
  293.    
  294.     if Self.Mana() <= x.ManaCAST and Self.Health() >= x.Quick then
  295.         Self.UseItem(x.ManaRune)
  296.     end
  297. end, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement