OBS : COPIAR O QUE ESTÁ EM VERMELHO !!
OBS²: O que tiver em azul é algo que precisa ser alterado pelo usuario .
-Mystic defense ou qualquer outra skill de se defender com "mana"-
local castBelowHp = 40
macro(98, "SKILL AQUI", function()
if hppercent() <= castBelowHp and not hasManaShield() then
say('SKILL AQUI')
end
end)
-Usar potion-
local healthId = IDPOTION
local healthPercent = 9999
macro(200, "NOME DO POTION", function()
if (hppercent() <= healthPercent) then
usewith(healthId, player)
end
end)
-Essa serve para você dashar-
local function checkPos(x, y)
xyz = g_game.getLocalPlayer():getPosition()
xyz.x = xyz.x + x
xyz.y = xyz.y + y
tile = g_map.getTile(xyz)
if tile then
return g_game.use(tile:getTopUseThing())
else
return false
end
end
macro(1, 'Bug Map', function()
if modules.corelib.g_keyboard.isKeyPressed('w') then
checkPos(0, -5)
elseif modules.corelib.g_keyboard.isKeyPressed('e') then
checkPos(3, -3)
elseif modules.corelib.g_keyboard.isKeyPressed('d') then
checkPos(5, 0)
elseif modules.corelib.g_keyboard.isKeyPressed('c') then
checkPos(3, 3)
elseif modules.corelib.g_keyboard.isKeyPressed('s') then
checkPos(0, 5)
elseif modules.corelib.g_keyboard.isKeyPressed('z') then
checkPos(-3, 3)
elseif modules.corelib.g_keyboard.isKeyPressed('a') then
checkPos(-5, 0)
elseif modules.corelib.g_keyboard.isKeyPressed('q') then
checkPos(-3, -3)
end
end)
-ENEMY-
local friendlist = {'toei', 'ryan', 'darknuss', ''}
for i, v in ipairs(friendlist) do
friendlist[i] = v:lower()
end
macro(1, 'Enemy', function()
local possibleTarget = false
for _, creature in ipairs(getSpectators(posz())) do
local specHP = creature:getHealthPercent()
if creature:isPlayer() and SpecHP and SpecHP > 0 then
if not table.find(friendlist, creature:getName():lower()) and creature:getEmblem() ~= 1 then
if creature:canShoot() then
if not possibleTarget or possibleTargetHP > specHP or possibleTargetHP == specHP and
possibleTarget:getId() < creature:getId() then
possibleTarget = g
possibleTargetHP = possibleTarget:getHealthPercent()
end
end
end
end
end
if possibleTarget and g_game.getAttackingCreature() ~= possibleTarget then
g_game.attack(possibleTarget)
end
end)
-POTION-
local healthId = ID DO POTION
local healthPercent = 99 (Quanto de vida pra usar o potion)
macro(300, "VIDA PVP", function()
if (hppercent() <= healthPercent) then
usewith(healthId, player)
end
end)
local healthId = ID DO POTION
local healthPercent = 99
macro( 250, "POTION PVP", function()
if (hppercent() <= healthPercent) then
usewith(healthId, player)
end
end)
-USAR DETERMINADA MAGIA COM %-
macro(1, 'Silence', function()
x = g_game.getAttackingCreature()
if not x or x:getHealthPercent() > 80 then return end
say('nome da magia')
end)
-ENEMY-
local playerList = {}
local friendPlayers = {}
macro(10, "Atk Enemy Target", function()
for _,mob in ipairs(getSpectators(posz())) do
if mob:getEmblem() == 1 then
table.insert(friendPlayers, mob:getName():lower())
end
if not table.find(friendPlayers, mob:getName():lower()) then
if mob:isPlayer() then
table.insert(playerList, {player = mob, hpenemy = mob:getHealthPercent()})
end
end
end
table.sort(playerList, function(a,b) return a.hpenemy < b.hpenemy end)
if not g_game.isAttacking() and playerList[1] then
g_game.attack(playerList[1].player)
end
playerList = {}
end)
local playerList = {}
local friendPlayers = {"a", "eu", "player", "player", "play x",}
-TEMPO DE PK NA TELA-
xtela,ytela = 300, 200
local TempoPK = 15 -- tempo em minutos
if type(storage.attacked) ~= 'table' or storage.id ~= player:getId() then
storage.TimeRemain = 0
storage.attacked = {}
storage.id = player:getId()
end
onTextMessage(function(mode, text)
if not text:lower():find('due to your') and not text:lower():find('you deal') then return end
for _, x in ipairs(getSpectators(posz())) do
if x:isPlayer() and text:find(x:getName()) then
for v, u in pairs(storage.attacked) do
if x:getName() == u.nk then
table.remove(storage.attacked, v)
end
end
table.insert(storage.attacked, {nk = x:getName(), t = now + 60000, i = x:getId()})
end
end
end)
local function doFormatMin(v)
if v < 1000 then
return '00:00'
end
v = v/1000
local mins = 00
local seconds = 00
if v >= 60 then
mins = string.format("%02.f", math.floor(v / 60))
end
seconds = string.format("%02.f", math.abs(math.floor(math.mod(v, 60))))
return mins .. ":" .. seconds
end
local widget = setupUI([[
Panel
height: 400
width: 900
]], g_ui.getRootWidget())
local timepk = g_ui.loadUIFromString([[
Label
color: white
background-color: black
opacity: 0.85
text-horizontal-auto-resize: true
]], widget)
macro(1, function()
for c, q in ipairs(storage.attacked) do
for _, x in ipairs(getSpectators(true)) do
if x:isPlayer() and q.nk == x:getName() then
if x:getHealthPercent() == 0 then
storage.TimeRemain = now + (TempoPK * 60 * 1000)
table.remove(storage.attacked, c)
end
end
if q.t < now or q.t - now > 60000 or (q.nk == x:getName() and q.i ~= x:getId()) then
table.remove(storage.attacked, c)
end
end
end
timepk:setPosition({y = ytela+40, x = xtela+10})
if storage.TimeRemain < now then
timepk:setText('00:00:00')
timepk:setColor('green')
else
timepk:setText(doFormatMin(math.abs(now - storage.TimeRemain)))
timepk:setColor('red')
end
end)
-BUG MAP PARA CORRER MASI RAPIDO USANDO SWAD-
if type(storage.Key) ~= 'table' then
storage.Key = {}
end
dois = macro(1, 'Numpad', function()
storage.Key.n = 'Numpad8'
storage.Key.s = 'Numpad2'
storage.Key.e = 'Numpad4'
storage.Key.d = 'Numpad6'
end)
um = macro(1, 'WASD', function()
storage.Key.n = 'W'
storage.Key.s = 'S'
storage.Key.e = 'A'
storage.Key.d = 'D'
end)
function checkPos(x, y)
xyz = pos()
xyz.x = xyz.x + x
xyz.y = xyz.y + y
tile = g_map.getTile(xyz)
if tile then
return g_game.use(tile:getTopUseThing())
else
return false
end
end
onKeyPress(function(keys)
if um.isOff() and dois.isOff() then return end
if keys == storage.Key.n then
checkPos(0, -5)
elseif keys == storage.Key.s then
checkPos(0, 5)
elseif keys == storage.Key.e then
checkPos(-5, 0)
elseif keys == storage.Key.d then
checkPos(5, 0)
end
end)
-PARA SERVIDORES QUE TEM STAMINA PARA USAR COMO POTION-
macro(500, "STAMINA", function()
if stamina() < 2400 then
use(11588)
end
end)
-REVIDAR PLAYER-
local revidar = false
addSwitch("revidar", "revidar", function(widget)
revidar = not revidar
widget:setOn(revidar)
end)
onTextMessage(function(mode, text)
if revidar == true and not g_game.getAttackingCreature() and string.find(text, "You lose") then
local targetName = string.sub(text, string.find(text, " [^ ]*$") + 1, #text - 1)
local target = getPlayerByName(targetName)
if target then
g_game.attack(target)
end
end
end)
-ATACK OTHERS-
macro(300, "Atk Others", function()
local battlelist = getSpectators();
local closest = 10
local lowesthpc = 101
for key, val in pairs(battlelist) do
if val:isMonster() then
if getDistanceBetween(player:getPosition(), val:getPosition()) <= closest then
closest = getDistanceBetween(player:getPosition(), val:getPosition())
if val:getHealthPercent() < lowesthpc then
lowesthpc = val:getHealthPercent()
end
end
end
end
for key, val in pairs(battlelist) do
if val:isMonster() then
if getDistanceBetween(player:getPosition(), val:getPosition()) <= closest then
if g_game.getAttackingCreature() ~= val and val:getHealthPercent() <= lowesthpc then
g_game.attack(val)
delay(100)
break
end
end
end
end
end)
-MACRO DANCE-
macro(200, "DANCE" ,function()
turn(math.random(0, 3)) -- turn to a random direction.
end, warTab)
-MACRO UP ML-
macro(1000, "UP ML", function()
say('Powerdown')
end)
-MACRO FOLLOW-
macro(1000, "Follow", function()
if g_game.isFollowing() then
return
end
local getFollowCreature = getCreatureByName(storage.followLeader)
if getFollowCreature then
g_game.follow(getFollowCreature)
end
end)
addTextEdit("followleader", storage.followLeader or "player name", function(widget, text)
storage.followLeader = text
end)
-MACRO VIRA DO PLAYER-
macro(1, 'VIRA NO PLAYER', function()
if not g_game.isAttacking() then return end
tt = g_game.getAttackingCreature()
tx = tt:getPosition().x
ty = tt:getPosition().y
dir = player:getDirection()
tdx = math.abs(tx-pos().x)
tdy = math.abs(ty-pos().y)
if (tdy >= 2 and tdx >= 2) or tdx > 7 or tdy > 7 then return end
if tdy >= tdx then
if ty > pos().y then
if dir ~= 2 then
turn(2)
end
end
if ty < pos().y then
if dir ~= 0 then
turn(0)
end
end
elseif tdx >= tdy then
if tx > pos().x then
if dir ~= 1 then
turn(1)
end
end
if tx < pos().x then
if dir ~= 3 then
turn(3)
end
end
end
end)
-MACRO DE COMBO-
local combo
macro(1, "PVP", function()
if g_game.isAttacking() then
say('ESPECIAL')
say('magia1')
say('magia2')
say('magia3')
say('magia4')
end
end)
-MAGIA DE AREA-
local hpPercent = 100 macro(1, "Especial", function() if (hppercent() <= hpPercent) then say('genki
orijinaruredi') end end)
local combo
macro(1, "UP", function()
if g_game.isAttacking() then
say('MAGIA DE AREA')
say('MAGIA DE AREA')
say('')
say('')
end
end)
-MACRO DE SPEED-
macro(250, "SUPER SPEED", nil, function()
if isParalyzed() or not hasHaste() then
say("Super speed")
end
end)
-MAGIA DE AREA COM ANT RED-
AreaTime = 0
macro(1, "Ant Red", function()
for i,crt in ipairs(getSpectators()) do
if (crt:isPlayer() and player:getName() ~= crt:getName() and crt:getShield() < 3 and crt:getEmblem()
~= 1) or skull() > 2 then
AreaTime = now + 30000
end
if AreaTime <= now and getMonsters(1) > 1 then
say('area')
elseif g_game.isAttacking() then
say('anjel attack')
end
end
end)
-OUTRO TIPO DE COMBO-
macro(200, "COMBO", function()
if g_game.isAttacking() then
say('magia ')
say('magia ')
say('magia ')
end
end)
macro(200, "MAGIA EM AREA", function()
if g_game.isAttacking() then
say('magia em area')
end
end)
-USAR BUFF-
macro(250, "Auto Buff", function()
ifnot hasPartyBuff()then
say("SEUBUFFAQUI")
end
end)
-FAST REGENERATION-
local hpPercent = 99
macro(50, "Fast Regen", function()
if (hppercent() <= hpPercent) then
say(storage.HealText)
end
end)
addTextEdit("HealText", storage.HealText or "NOME DA REGEN", function(widget, text)
storage.HealText = text
end)