Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local walk_button = modules.game_luniabot.walkButton;
- function hasEffect(tile, effect)
- for i, fx in ipairs(tile:getEffects()) do
- if fx:getId() == effect then
- return true
- end
- end
- return false
- end
- local walkButton = modules.game_luniabot.walkButton
- function turnOnWalking()
- walkButton:setChecked(true)
- end
- macro(1000, "open monster boxes", function()
- local tiles = g_map.getTiles(posz());
- for i = 1, #tiles do
- local items = tiles[i]:getItems();
- for i = 1, #items do
- local item = items[i];
- if (item and item:getId() == 9586) then
- walkButton:setChecked(false)
- g_game.use(item)
- schedule(5000, turnOnWalking);
- return
- end
- end
- end
- end)
- macro(100, "essence", function()
- for _, tile in pairs(g_map.getTiles(posz())) do
- if (hasEffect(tile, 56) or hasEffect(tile, 56)) then
- walk_button:setChecked(false)
- autoWalk(tile:getPosition(), 100, { ignoreNonPathable = true })
- schedule(5000, function() walk_button:setChecked(true); end)
- end
- end
- end)
- macro(1000, "open monster flames", function()
- for i, tile in ipairs(g_map.getTiles(posz())) do
- for u,item in ipairs(tile:getItems()) do
- if (item:getId() == 25058) then
- autoWalk(tile:getPosition(), 100, {ignoreNonPathable = true})
- end
- end
- end
- end)
- local manaId = 23374
- local manaPercent = 95
- macro(200, "faster mana potting", function()
- if (manapercent() <= manaPercent) then
- usewith(manaId, player)
- end
- end)
- local healthId = 23374
- local healthPercent = 99
- macro(200, "faster health potting", function()
- if (hppercent() <= healthPercent) then
- usewith(healthId, player)
- end
- end)
- local healingSpell = 'Exura gran san'
- local hpPercent = 90
- macro(50, "faster healing", function()
- if (hppercent() <= hpPercent) then
- say(healingSpell)
- end
- end)
- local singleTargetSpell = 'exori gran con'
- local multiTargetSpell = 'exori mas con'
- local fatal_spell = 'exori mas con'
- local distance = 4
- local amountOfMonsters = 2
- macro(250, "Multi target spell", 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(fatal_spell)
- say(multiTargetSpell)
- else
- say(singleTargetSpell)
- end
- end)
- macro(500, "replace coins", function()
- for i, container in pairs(getContainers()) do
- for j, item in ipairs(container:getItems()) do
- if item:getCount() == 100 and item:getId() == 3031 then
- g_game.use(item)
- return
- end
- end
- end
- end)
- local playerToFollow = 'name here'
- macro(1000, "auto follow - name here", 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)
- macro(1000, "activate follow", function() g_game.setChaseMode(1) end)
- local walkButton = modules.game_luniabot.walkButton
- function turnOnWalking()
- walkButton:setChecked(true)
- end
- macro(500, "Blackskull flames", function()for i, tile in ipairs(g_map.getTiles(g_game.getLocalPlayer():getPosition().z)) do
- if (tile) then
- for u,item in ipairs(tile:getItems()) do
- if (item) then
- if (item:getId() == 21463) then
- walkButton:setChecked(false)
- autoWalk(tile:getPosition(), 100, {ignoreNonPathable = true})
- schedule(5000, turnOnWalking);
- return
- end
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement