0% found this document useful (0 votes)
31 views7 pages

Macros

The document contains a series of macros for automating gameplay actions in a game, including attacking monsters, managing inventory, casting spells, and healing. It defines specific conditions for actions like opening bags, using items, and following a target player. Additionally, it includes configurations for health and mana management, as well as ignoring certain monsters during combat.

Uploaded by

ByAlan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views7 pages

Macros

The document contains a series of macros for automating gameplay actions in a game, including attacking monsters, managing inventory, casting spells, and healing. It defines specific conditions for actions like opening bags, using items, and following a target player. Additionally, it includes configurations for health and mana management, as well as ignoring certain monsters during combat.

Uploaded by

ByAlan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 7

macro(200, "spells", function()

if g_game.isAttacking() then

say("name spells")

end

end)

macro(1000, "Abrir Bag Principal", function()

bpItem = getBack()

bp = getContainer(0)

if not bp and bpItem ~= nil then

g_game.open(bpItem)

end

end)

macro(1000, "Abrir proxima Bag", function()

local containers = getContainers()

for i, container in pairs(containers) do

if container:getItemsCount() == container:getCapacity() then

for _, item in ipairs(container:getItems()) do

if item:isContainer() then

g_game.open(item, container)

end

end

end

end
end)

macro(500, "Auto Haste", nil, function()

if not hasHaste() and storage.autoHasteText:len() > 0 then

if saySpell(storage.autoHasteText) then

delay(5000)

end

end

end)

addTextEdit("autoHasteText", storage.autoHasteText or "utani sonic hur", function(widget, text)

storage.autoHasteText = text

end)

--monstros que vão ser ignorados no target

local monstrosIgnorados = {

['vip trainer'] = true,

['Training Monk'] = true,

['pet'] = true,

local distancia2 = 5 -- distancia para atacar os monstros

macro(200, "autoattack", function()

local monstros = g_map.getSpectators(g_game.getLocalPlayer():getPosition(), false)

for k,v in pairs(monstros) do

if not isInPz() and v:isMonster() and not g_game.isAttacking()

and not monstrosIgnorados[v:getName():lower()]


and getDistanceBetween(pos(), v:getPosition()) <= distancia2 then

g_game.attack(v)

end

end

end)

local manaId = 3185

local manaPercent = 99

macro(200, "faster mana", function()

if (manapercent() <= manaPercent) then

usewith(manaId, player)

end

end)

macro(500, "transform cc", function()

for i, container in pairs(getContainers()) do

for j, item in ipairs(container:getItems()) do

if item:getCount() == 100 and item:getId() == 3043 then

g_game.use(item)

return

end

end

end

end)

macro(500, "transform nuggets", function()

for i, container in pairs(getContainers()) do

for j, item in ipairs(container:getItems()) do


if item:getCount() == 100 and item:getId() == 3040 then

g_game.use(item)

return

end

end

end

end)

local hpPercent = 99

macro(50, "faster healing", function()

if (hppercent() <= hpPercent) then

say(storage.HealText)

end

end)

addTextEdit("HealText", storage.HealText or "exura vita", function(widget, text)

storage.HealText = text

end)

function distanceFromPlayer(coords)

if not coords then return false end

return getDistanceBetween(pos(), coords)

end

function getMonsters(range, multifloor)

if not range then range = 5 end

local mobs = 0;

for _, spec in pairs(getSpectators(multifloor)) do


mobs = (g_game.getClientVersion() < 960 or spec:getType() < 1) and

spec:isMonster() and distanceFromPlayer(spec:getPosition()) <=

range and mobs + 1 or mobs;

end

return mobs;

end

macro(500, "auto on/off cave", function()

if getMonsters() > 0 then

CaveBot.setOff()

else

if getMonsters() < 1 then

CaveBot.setOn()

end

end

end)

macro(100, "Puxar item pra bag", function()

local tile = g_map.getTile(pos())

if tile then

for _, item in ipairs(tile:getItems()) do

if item:isPickupable() then

if g_game.move(item, {x=65535, y=SlotBack, z=0}, item:getCount()) then

delay(100)

end

end
end

end

end)

local castBelowHp = 99

local deactiveBelowMana = 9

macro(100, "advanced manashield", function()

if (hppercent() <= castBelowHp and manapercent() >= deactiveBelowMana and not hasManaShield())
then

say('utamo vita')

end

if (manapercent() <= deactiveBelowMana and hppercent() >= castBelowHp and hasManaShield()) then

say('utamo vita')

end

end)

local toFollow = "name de jugador" -- nome do jogador

local toFollowPos = {nick}

local followMacro = macro(200, "follow target", function()

local target = getCreatureByName(toFollow)

if target then

local tpos = target:getPosition()

toFollowPos[tpos.z] = tpos

end

if player:isWalking() then return end

local p = toFollowPos[posz()]

if not p then return end


if autoWalk(p, 20, {ignoreNonPathable=true, precision=1}) then

delay(100)

end

end)

onCreaturePositionChange(function(creature, oldPos, newPos)

if creature:getName() == toFollow then

toFollowPos[newPos.z] = newPos

end

end)

You might also like