Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Vagabond
- --#main
- addLabel("mapinfo", "-- [[ Mandatory Scripts ]] --")
- local manaId = 28650
- local manaPercent = 95
- macro(200, "Potion Healing", function()
- if (manapercent() <= manaPercent) then
- usewith(manaId, player)
- end
- end)
- --#panels
- --#macros
- addLabel("mapinfo", "-- [[ Spell Caster ]] --")
- local singleTargetSpell = 'exori max pura'
- local multiTargetSpell = 'exevo max frigo'
- local strongerTargetSpell = 'exevo gran max frigo'
- local buffTargetSpell = 'utito gran mas frigo'
- local distance = 3
- local amountOfMonsters = 2
- macro(250, "Exp Caster", function()
- local specAmount = 0
- if not g_game.isAttacking() then
- return
- end
- for i,mob in ipairs(getSpectators()) do
- if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isMonster()) then
- specAmount = specAmount + 1
- end
- end
- if (specAmount >= amountOfMonsters) then
- say(buffTargetSpell)
- say(strongerTargetSpell)
- say(multiTargetSpell)
- else
- say(buffTargetSpell)
- say(strongerTargetSpell)
- say(singleTargetSpell)
- end
- end)
- local singleTargetSpell = 'exori max pura'
- local strongSpell = 'exevo gran max frigo'
- local distance = 3
- local amountOfMonsters = 1
- macro(250, "PVP Caster", function()
- local specAmount = 0
- if not g_game.isAttacking() then
- return
- end
- for i,mob in ipairs(getSpectators()) do
- if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isPlayer()) then
- specAmount = specAmount + 1
- end
- end
- if (specAmount >= amountOfMonsters) then
- say(strongSpell)
- say(singleTargetSpell)
- end
- end)
- local singleTargetSpell = 'exori max pura'
- local strongTargetSpell = 'exevo gran max frigo'
- local buffTargetSpell = 'utito gran mas frigo'
- local distance = 3
- local amountOfMonsters = 1
- macro(250, "Boss Caster", function()
- local specAmount = 0
- if not g_game.isAttacking() then
- return
- end
- for i,mob in ipairs(getSpectators()) do
- if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isMonster()) then
- specAmount = specAmount + 1
- end
- end
- if (specAmount >= amountOfMonsters) then
- say(buffTargetSpell)
- say(strongTargetSpell)
- say(singleTargetSpell)
- else
- say(buffTargetSpell)
- say(strongTargetSpell)
- say(singleTargetSpell)
- end
- end)
- local multiTargetSpell = 'exevo max frigo'
- local strongerTargetSpell = 'exevo gran max frigo'
- local buffTargetSpell = 'utito gran mas frigo'
- local distance = 3
- local amountOfMonsters = 1
- macro(250, "Dungeon Caster", function()
- local specAmount = 0
- for i,mob in ipairs(getSpectators()) do
- if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isMonster()) then
- specAmount = specAmount + 1
- end
- end
- if (specAmount >= amountOfMonsters) then
- say(buffTargetSpell)
- say(strongerTargetSpell)
- say(multiTargetSpell)
- end
- end)
- --
- addLabel("mapinfo", "-- [[ Other Scripts ]] --")
- --
- local walkButton = modules.game_luniabot.walkButton
- function turnOnWalking()
- walkButton:setChecked(true)
- end
- function turnOffWalking()
- walkButton:setChecked(false)
- end
- macro(500, "Exp Mode", function()
- for i, tile in ipairs(g_map.getTiles(posz())) do
- for u,item in ipairs(tile:getItems()) do
- if (item:getId() == 25058) or (item:getId() == 21463) then
- turnOffWalking()
- autoWalk(tile:getPosition(), 100, {ignoreNonPathable = true})
- schedule(5000, turnOnWalking)
- elseif (item:getId() == 9586) then
- turnOffWalking()
- g_game.use(item)
- schedule(5000, turnOnWalking)
- delay(1500)
- end
- end
- end
- end)
- --
- function hasEffect(tile, effect)
- for i, fx in ipairs(tile:getEffects()) do
- if fx:getId() == effect then
- return true
- end
- end
- return false
- end
- macro(100, "Arrows", function()
- for _, tile in pairs(g_map.getTiles(posz())) do
- if (hasEffect(tile, 56) or hasEffect(tile, 56)) then
- turnOffWalking();
- autoWalk(tile:getPosition(), 100, { ignoreNonPathable = true });
- schedule(5000, turnOnWalking);
- end
- end
- end)
- --
- local playerToFollow = 'Vithrax'
- macro(250, "Follow Vithrax", function()
- if g_game.isFollowing() then
- return
- end
- for _, followcreature in ipairs(g_map.getSpectators(pos(), false)) do
- if (followcreature:getName() == playerToFollow and getDistanceBetween(pos(), followcreature:getPosition()) <= 8) then
- g_game.follow(followcreature)
- end
- end
- end)
- --
- local friendList = {"Akalay", "Vithrax", "Lazar", "Boss Hunter"}
- macro(100, "Heal Friend", function()
- for i, friendSio in ipairs(friendList) do
- local friend = getPlayerByName(friendSio)
- if friend and friend:getHealthPercent() < 90 then
- say("exura gran sio \"" .. friendSio)
- delay(1000)
- end
- end
- end)
- --
- macro(10, "Reattack", function()
- if (not g_game.isAttacking()) then
- attack(target);
- end
- end)
- addLabel("mapinfo", "-- [[ Buttons ]] --")
- addButton("Bosses", "Bosses", function()
- say("!bosses")
- end)
- addButton("Spells", "Spells", function()
- say("!spells")
- end)
- --#hotkeys
- --#callbacks
- --#other
- onAddThing(function(tile, thing)
- if thing:isItem() and thing:getId() == 2129 then
- local pos = tile:getPosition().x .. "," .. tile:getPosition().y .. "," .. tile:getPosition().z
- if not storage[pos] or storage[pos] < now then
- storage[pos] = now + 20000
- end
- tile:setTimer(storage[pos] - now)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement