Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Combo Archer for ArchlightOnline
- (Private Version) -- Released
- By Mr Trala
- Thanks to:
- Colandus from Otland for the string.explode function.
- Instructions;
- Config your ManaRune, your HealCast and your ManaCast just below here, then
- load the script, the rest of the instructions are in the Archer Channel.
- Change Log;
- 2.0 -- First and last Public version of archer script.
- 2.0.1 -- Fixed problem after Archlight HP/Mana Update.
- 2.0.2 -- Fixed an error in healer.
- ]]
- config = {
- ManaRune = 11632, -- ID of your manarune.
- HealCAST = 95, -- x% hp to cast exura san.
- ManaCAST = 80, -- x% mana to use manarune
- }
- -- Don't touch anything below this line if you don't know what are you doing.
- local spells = {
- -- Exaus
- FocusedEX = 'exevo gran mas flam',
- CannoEX = 'exevo vis hur',
- WavesEX = 'exevo dis flam hur', -- Sprays Exaus
- -- Words
- FocusedWD = 'Focused Shot',
- GranConWD = 'Exori Gran Con',
- ConWD = 'Energy Cannon',
- --Sprays
- ESpray = 'Earth Arrow Spray',
- ISpray = 'Ice Arrow Spray',
- FSpray = 'Flame Arrow Spray',
- ENSpray = 'Energy Arrow Spray'
- }
- function string.trim(str)
- return (str:gsub("^%s*(.-)%s*$", "%1"))
- end
- function string.explode(str, sep, limit)
- if limit and type(limit) ~= 'number' then
- error("string.explode: limit must be a number", 2)
- end
- if #sep == 0 or #str == 0 then return end
- local pos, i, t = 1, 1, {}
- for s, e in function() return str:find(sep, pos) end do
- table.insert(t, str:sub(pos, s-1):trim())
- pos = e + 1
- i = i + 1
- if limit and i == limit then break end
- end
- table.insert(t, str:sub(pos):trim())
- return t
- end
- spray = {}
- version = '2.0.2F'
- function onSpeak(channel, message)
- -- receives the channel object that called it and the message that was inputted.
- if (message == '/list') then
- channel:SendYellowMessage('List of Modules', '\n'..
- 'Combo -- Use this one to start the basic combo script, "focused shot, exori gran con and energy cannon".\n'..
- 'ComboW -- Same as combo but without Energy Cannon (not "new" spell).\n'..
- 'ComboA -- This one will shot an Arrow Spray spell, config which one like this "ComboA, earth" (earth, ice, flame and energy).\n'..
- 'Aim -- Auto Aim spell.\n'..
- 'Manarune -- Auto use your manarune (enabled by default).\n'..
- 'LifeSteal -- LifeSteal renew (enabled by default).\n'..
- 'Train -- Use this one to start the training module (exura san + utana vid).\n')
- end
- -- Modules
- if (message == '/start Combo') or (message == 'Combo') or (message == 'combo') then
- Module.Start('Combo')
- channel:SendYellowMessage('Mr Trala', 'The module with the name "Combo" has been started.')
- elseif (message == '/stop Combo') then
- Module.Stop('Combo')
- channel:SendRedMessage('Mr Trala', 'The module with the name "Combo" has been stopped.')
- elseif (message == '/start ComboW') or (message == 'ComboW') or (message == 'combow') then
- Module.Start('ComboW')
- channel:SendYellowMessage('Mr Trala', 'The module with the name "ComboW" has been started.')
- elseif (message == '/stop ComboW') then
- Module.Stop('ComboW')
- channel:SendRedMessage('Mr Trala', 'The module with the name "ComboW" has been stopped.')
- elseif (message == '/start Aim') or (message == 'Aim') or (message == 'aim') then
- Module.Start('Aim')
- channel:SendYellowMessage('Mr Trala', 'The module with the name "Aim" has been started.')
- elseif (message == '/stop Aim') then
- Module.Stop('Aim')
- channel:SendRedMessage('Mr Trala', 'The module with the name "Aim" has been stopped.')
- elseif (message == '/start Train') or (message == 'Train') or (message == 'train') then
- Module.Start('Train')
- channel:SendYellowMessage('Mr Trala', 'The module with the name "Train" has been started.')
- elseif (message == '/stop Train') or (message == '/stop train') then
- Module.Stop('Train')
- channel:SendRedMessage('Mr Trala', 'The module with the name "Train" has been stopped.')
- elseif (message == '/start Manarune') or (message == 'manarune') or (message == 'mr') then
- Module.Start('Manarune')
- channel:SendYellowMessage('Mr Trala', 'The module with the name "Manarune" has been started.')
- elseif (message == '/stop Manarune') or (message == '/stop train') then
- Module.Stop('Manarune')
- channel:SendRedMessage('Mr Trala', 'The module with the name "Manarune" has been stopped.')
- elseif (message == '/stop ComboA') or (message == '/stop comboa') then
- Module.Stop('ComboAOE')
- channel:SendRedMessage('Mr Trala', 'The module with the name "ComboAOE" has been stopped.')
- elseif (message == '/start LifeSteal') or (message == 'LifeSteal') or (message == 'lifesteal') then
- Module.Start('LifeSteal')
- channel:SendYellowMessage('Mr Trala', 'The module with the name "LifeSteal" has been started.')
- elseif (message == '/stop LifeSteal') or (message == '/stop lifesteal') then
- Module.Stop('LifeSteal')
- channel:SendRedMessage('Mr Trala', 'The module with the name "LifeSteal" has been stopped.')
- end
- -- ComboAOE Module
- if (message >= 'ComboA') and string.find(message, "ComboA") then
- local p = string.explode(message, ",")
- if p[2] == '' or not string.find(message, ",") then
- channel:SendRedMessage('Mr Trala', 'Please config which Spray to use like this "ComboA, earth" (earth, ice, flame and energy).')
- elseif p[2] == '' or string.find(message, "%d") then
- channel:SendRedMessage('Mr Trala', 'Please config which Spray to use like this "ComboA, earth" (earth, ice, flame and energy).')
- else
- spray = {}
- spray[#spray+1] = {SioT = p[2]}
- Module.Start('ComboAOE')
- channel:SendYellowMessage('Mr Trala', 'The module with the name "ComboAOE" has been started and is going to use '..p[2]..' spray.')
- end
- end
- end
- function ReOpen()
- local customChannel = Channel.New('Archer Channel', onSpeak, onClose)
- customChannel:SendYellowMessage('Mr Trala', 'Welcome to the Archer Combo Script, configured specifically for ArchlightOnline.\n'..
- 'This Script has been made by Mr Trala, and you are using the Version '..version..'\n'..
- 'If you found any bug send a message to Mr Trolo or Mr Ponid in Archlight.\n')
- customChannel:SendOrangeMessage('Instructions', '\n'..
- 'Write /list if you want to see a list of the modules you can use\n'..
- 'You can start or stop a Module with the command /start or /stop\n')
- end
- function onClose(channel)
- -- receives the channel object that called it
- print('To close '..channel:Name()..' you need to kill the script.')
- ReOpen()
- end
- local customChannel = Channel.New('Archer Channel', onSpeak, onClose)
- customChannel:SendYellowMessage('Mr Trala', 'Welcome to the Archer Combo Script, configured specifically for ArchlightOnline.\n'..
- 'This Script has been made by Mr Trala, and you are using the Version '..version..'\n'..
- 'If you found any bug send a message to Mr Trolo or Mr Ponid in Archlight.\n')
- customChannel:SendOrangeMessage('Instructions', '\n'..
- 'Write /list if you want to see a list of the modules you can use\n'..
- 'You can start or stop a Module with the command /start or /stop\n')
- -- Functions of the script.
- function Combo()
- local creature = Creature.GetByID(Self.TargetID())
- if creature:isValid() and creature:isAlive() and creature:isTarget() and creature:DistanceFromSelf() <= 6 then
- if Self.GetSpellCooldown(spells.FocusedEX) >= 1 and Self.GetSpellCooldown(spells.GranConWD) >= 1 and Self.GetSpellCooldown(spells.CannoEX) == 0 then
- Self.Cast(spells.ConWD)
- Manarune2()
- elseif Self.GetSpellCooldown(spells.FocusedEX) == 0 then
- Self.Cast(spells.FocusedWD)
- Manarune2()
- elseif Self.GetSpellCooldown(spells.FocusedEX) >= 1 and Self.GetSpellCooldown(spells.GranConWD) == 0 then
- Self.Cast(spells.GranConWD)
- Manarune2()
- end
- end
- end
- function ComboW()
- local creature = Creature.GetByID(Self.TargetID())
- if creature:isValid() and creature:isAlive() and creature:isTarget() and creature:DistanceFromSelf() <= 6 then
- if Self.GetSpellCooldown(spells.FocusedEX) == 0 then
- Self.Cast(spells.FocusedWD)
- Manarune2()
- elseif Self.GetSpellCooldown(spells.FocusedEX) >= 1 and Self.GetSpellCooldown(spells.GranConWD) == 0 then
- Self.Cast(spells.GranConWD)
- Manarune2()
- end
- end
- end
- exaus = 0
- function ComboAOE()
- for i = 1, #spray do
- local f = spray[i]
- local shot = f.SioT
- local earth = spells.ESpray
- local ice = spells.ISpray
- local flame = spells.FSpray
- local energy = spells.ENSpray
- local am = 0
- local creature = Creature.GetByID(Self.TargetID())
- for name, c in Creature.iMonsters(3) do
- if c:isValid() and c:isAlive() and not Self.isInPz() and c:isOnScreen()then
- am = am +1
- end
- if creature:isValid() and creature:isAlive() and creature:isTarget() and creature:DistanceFromSelf() <= 6 and am <= 2 then
- if Self.GetSpellCooldown(spells.FocusedEX) == 0 then
- Self.Cast(spells.FocusedWD, 3)
- Manarune2()
- elseif Self.GetSpellCooldown(spells.FocusedEX) >= 1 and Self.GetSpellCooldown(spells.GranConWD) == 0 and am <= 2 then
- Self.Cast(spells.GranConWD, 3)
- Manarune2()
- end
- end
- if am >= 3 and string.find(shot, "flame") and os.time() - exaus >= math.random(2.03, 2.1) then
- Self.Cast(flame, 3)
- exaus = os.time()
- elseif am >= 3 and string.find(shot, "ice") and os.time() - exaus >= math.random(2.03, 2.1) then
- Self.Cast(ice, 3)
- exaus = os.time()
- elseif am >= 3 and string.find(shot, "energy") and os.time() - exaus >= math.random(2.03, 2.1) then
- Self.Cast(energy, 3)
- exaus = os.time()
- elseif am >= 3 and string.find(shot, "earth") and os.time() - exaus >= math.random(2.03, 2.1) then
- Self.Cast(earth, 3)
- exaus = os.time()
- end
- end
- end
- end
- function Train()
- local spell = "exura san"
- local spell2 = "utana vid"
- if Self.GetSpellCooldown(spell) == 0 and (Self.Mana()>= 10) then
- Self.Say(spell)
- end
- if Self.GetSpellCooldown(spell2) == 0 and (Self.Mana()>= 10) then
- Self.Say(spell2)
- end
- end
- function Manarune2()
- if Self.Health() <= config.HealCAST then
- Self.UseItem(config.ManaRune)
- Self.Say('exura san')
- wait(200, 400)
- end
- if Self.Mana() <= config.ManaCAST then
- Self.UseItem(config.ManaRune)
- wait(400, 600)
- end
- end
- Module('Combo', Combo, false)
- Module('ComboW', ComboW, false)
- Module('Train', Train, false)
- Module('ComboAOE', ComboAOE, false)
- Module('LifeSteal', function(mod)
- local exaus = 'exura gran ico'
- if Self.GetSpellCooldown(exaus) == 0 then
- Self.Cast('Life Steal')
- end
- end, true)
- function AimT()
- local mana = 10
- if(Self.Mana() >= mana) then
- Self.Cast("Aim")
- end
- end
- Module.New('Aim', function(Mod)
- local exaus = 9
- if Self.CanCastSpell('Utani Hur') then
- AimT()
- Manarune2()
- Mod:Delay((exaus * 1000), (exaus * 1000) + 200)
- end
- end, true)
- Module('Manarune', function(mod)
- if Self.Health() <= config.HealCAST then
- Self.UseItem(config.ManaRune)
- Self.Say('exura san')
- wait(200, 400)
- end
- if Self.Mana() <= config.ManaCAST then
- Self.UseItem(config.ManaRune)
- wait(400, 600)
- end
- end, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement