Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- ExpFARM for Archlight
- Version 1.0
- By Mr Trala
- ]]
- local config = {
- mrid = 11614, -- Id of manarune
- mana = 90, -- Mana x% to use manarune
- emrmana = 60, -- Exana Restoras mana x%
- sdid = 3155, -- Your SD ID (dont change it even if you have infi sd)
- manaspl = 500, -- Mana to use spells
- exaus = 20, -- Exausthed in Seconds (for utamo vita)
- WhiteList = {"Lord Guardian", "Chiro Lavir", "Jliu"},
- healWhiteList = true,
- healParty = false,
- healAlly = false,
- range = 7,
- health = 95,
- method = "exura sio" ,
- Words = {"GO", "go", "come", "COME"},
- Follow = {"Follow me", "Follow", "follow", "Follow", "FOLLOW"},
- DP = {"godp", "GODP", "DP", "dp", "dptorift", "rift", "dp to rift"},
- DROP = {"Drop", "drop", "drp"},
- LEAVE = {"leave", "LEAVE", "logout"},
- leaderName = {"Chiro Lavir", "Mr Trilo"}, -- For cavebot commands
- FriendName = "Mr Trilo" -- For "follow" commands
- }
- local cooldowns = {
- -- Don't touch this if you don't know what are you doing
- restor = "exura san",
- masrst = "utura gran",
- -- spells
- sprest = "exana restora",
- spmres = "exana gran restora"
- }
- function onSpeak(channel, message)
- -- receives the channel object that called it and the message that was inputted.
- if (message == '/help') then
- channel:SendOrangeMessage('Mr Trala', 'List of commands available:\n'..
- '/start - name of module to start\n'..
- '/stop - name of module to stop\n'..
- '/list - gives you a list of the current modules of the script\n')
- else
- channel:SendOrangeMessage('Mr Trala', 'Invalid command type /help for a list of commands')
- end
- if (message == '/start Utamo') then
- Module.Start("Utamo")
- channel:SendOrangeMessage('Mr Trala', 'The module with the name "ExpFARM" has started.')
- end
- end
- function onClose(channel)
- -- receives the channel object that called it
- print(channel:Name() .. ' has been closed.')
- end
- local customChannel = Channel.New('ExpFARM', onSpeak, onClose)
- function follow()
- if Self.TargetID() == 0 then
- for name, creature in Creature.iPlayers() do
- if(name == config.FriendName) then
- Creature.Follow(creature)
- wait(500)
- end
- end
- else
- for name, creature in Creature.iPlayers() do
- if(name == FriendName) then
- if(creature:DistanceFromSelf() > config.range) then
- Self.StopAttack()
- Creature.Follow(creature)
- wait(1000)
- end
- end
- end
- end
- end
- Module('Follow', follow, false)
- Module('sdtarg', function(mod)
- local creature = Creature.GetByID(Self.TargetID())
- if creature:isValid() and creature:isAlive() and creature:isTarget() and Self.ItemCount(3154) >= 1 then
- Self.UseItemWithTarget(3154)
- else
- Self.UseItemWithTarget(config.sdid)
- end
- end)
- Module('Manarune', function(mod)
- Self.ManaPercent = function()
- return math.abs(Self.Mana()/(Self.MaxMana()*0.01))
- end
- if Self.ManaPercent() <= config.mana then
- Self.UseItem(config.mrid)
- end
- if Self.ManaPercent() <= config.emrmana and Self.GetSpellCooldown(cooldowns.masrst) == 0 then
- Self.Cast(cooldowns.spmres, config.manaspl)
- end
- if Self.ManaPercent() <= config.emrmana and Self.GetSpellCooldown(cooldowns.restor) == 0 then
- Self.Cast(cooldowns.sprest, config.manaspl)
- end
- end)
- Module('Utamo', function(Mod)
- if(Self.Mana() >= config.manaspl) then
- Self.Cast("utamo vita")
- end
- Mod:Delay((config.exaus * 1000), (config.exaus * 1000) + 500)
- end)
- Module('Sios', function(mod)
- local function sio(name)
- if(Self.Mana() >= config.mana)then
- Self.Say("exura huma sio \""..name)
- sleep(math.random(100,200))
- end
- end
- for i = CREATURES_LOW, CREATURES_HIGH do
- local creature = Creature.GetFromIndex(i)
- if (creature:isValid()) then
- if (creature:isOnScreen() and creature:isVisible() and creature:isAlive()) then
- local name = creature:Name()
- if(creature:isWarAlly() and config.healAlly) or (creature:isPartyMember() and config.healParty) or (table.find(config.WhiteList, name, false) and config.healWhiteList)then
- if(creature:DistanceFromSelf() <= config.range) and (creature:HealthPercent() <= config.health)then
- if(config.method == "exura sio")then
- sio(name)
- else
- displayInformationMessage("Unsupported method type in Auto Healer Script!")
- end
- end
- end
- end
- end
- end
- sleep(math.random(100,300))
- end)
- LocalSpeechProxy.OnReceive("Buffs", function(proxy, mtype, speaker, level, text)
- if (table.find(config.Words, text)) and (table.find(config.leaderName, speaker)) then
- Self.Step(EAST)
- elseif text == "back" and (table.find(config.leaderName, speaker)) then
- Self.Step(WEST)
- Walker.Goto("riftdp")
- Walker.Start()
- elseif (table.find(config.Follow, text)) and (table.find(config.leaderName, speaker)) then
- Module.Start("Follow")
- elseif text == "stop" and (table.find(config.leaderName, speaker)) then
- Module.Stop("Follow")
- Self.Step()
- elseif text == "exitall" and (table.find(config.leaderName, speaker)) then
- os.exit()
- elseif text == "manualdp" and (table.find(config.leaderName, speaker)) then
- Walker.Goto("manualdp")
- Walker.Start()
- elseif (table.find(config.DP, text)) and (table.find(config.leaderName, speaker)) then
- Walker.Goto("start")
- Walker.Start()
- elseif (table.find(config.DROP, text)) and (table.find(config.leaderName, speaker)) then
- Self.CloseContainers()
- Self.OpenMainBackpack()
- Self.DropItem(911, 1075, 6, 11372)
- elseif (table.find(config.LEAVE, text)) and (table.find(config.leaderName, speaker)) then
- Walker.Goto("Leave")
- Walker.Start()
- end
- end)
- registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
- function onWalkerSelectLabel(labelName)
- if (labelName == "stop") then
- Walker.Stop()
- elseif (labelName == "firstpause") then
- Walker.Stop()
- elseif (labelName == "pause1") then
- Walker.Stop()
- elseif (labelName == "end2") then
- os.exit()
- Walker.Stop()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement