Untitled
Guest 19 5th Oct, 2024
local singleTargetSpell = 'demonic surge'
local multiTargetSpell = 'ice shark'
local distance = 3
local amountOfMonsters = 1
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(multiTargetSpell)
else
say(singleTargetSpell)
end
end)
macro(1000, "Stop CaveBot (20% MP)", function()
local mpPercent = manapercent()
if mpPercent < 20 then
CaveBot.setOn(false)
elseif mpPercent > 60 then
CaveBot.setOn(true)
end
end)
-- Auto-Tasking
local autoTasking = addSwitch("autoTasking", "Auto-Tasking", function(widget)
widget:setOn(not widget:isOn())
storage.autoTasking = widget:isOn()
end)
autoTasking:setOn(storage.autoTasking)
onTextMessage(function(mode, text)
if autoTasking:isOn() and string.find(text, 'task. Wpisz') then
local creature = string.match(text, "!tasklevel%s+([%a%s']+)")
if creature then say('!tasklevel ' .. creature) end
end
end)
-- Repair Cyleria/Soft boots
macro(10000, "Repair Cyleria/Soft boots", function()
if getFeet() == nil then return end
if getFeet():getId() == 6530 then
say("!soft")
elseif getFeet():getId() == 9020 then
say("!cyleria boots")
end
end)
macro(200, "utamka", function() say "utamo vita" delay(60000) end)
-- AUTO STAMINA 40H
macro(10*1000, "Auto stamina (40h)", function()
local minimalStamina = 60*40
local item1 = 11719
local item2 = 3209
stamina = g_game.getLocalPlayer():getStamina()
if stamina < minimalStamina then
local foundItem1 = findItem(item1)
local foundItem2 = findItem(item2)
if foundItem1 then
use(item1)
elseif foundItem2 then
use(item2)
end
end
end)
-- AUTO EXP POTION
macro(1000, "Auto Exp Potion", function()
local item1 = 11720
local item2 = 7440
local Mp = 95
if not isInPz() then
if manapercent() < Mp then
delay(20000)
local foundItem1 = findItem(item1)
local foundItem2 = findItem(item2)
if foundItem1 then
return use(item1)
elseif foundItem2 then
return use(item2)
end
end
end
end)
-- AUTO LORD EXP
macro(1000, "Auto Lord Exp", function()
local item1 = 11721
local item2 = 3594
local Mp = 95
if not isInPz() then
if manapercent() < Mp then
delay(20000)
local foundItem1 = findItem(item1)
local foundItem2 = findItem(item2)
if foundItem1 then
return use(item1)
elseif foundItem2 then
return use(item2)
end
end
end
end)
UI.Label("Mana shield spell:")
UI.TextEdit(storage.manaShield or "utamo vita", function(widget, newText)
storage.manaShield = newText
end)
local lastManaShield = 0
macro(20, "mana shield", function()
if hasManaShield() or lastManaShield + 90000 > now then return end
if TargetBot then
TargetBot.saySpell(storage.manaShield) -- sync spell with targetbot if available
else
say(storage.manaShield)
end
end)
local comboTab = addTab("Spell Combo")
local comboOptions = {
leader = storage.gpSpellComboLeader or "",
trigger = storage.gpSpellComboTrigger or "",
spell = storage.gpSpellComboSpell or "exevo gran mas vis",
}
addLabel("leaderLabel", "Leader Player Name: ", comboTab)
addTextEdit("leaderValue", comboOptions.leader, function(widget, text)
comboOptions.leader = text
storage.gpSpellComboLeader = text
end, comboTab)
addLabel("triggerLabel", "Trigger Text: ", comboTab)
addTextEdit("triggerValue", comboOptions.trigger, function(widget, text)
comboOptions.trigger = text
storage.gpSpellComboTrigger = text
end, comboTab)
addLabel("spellLabel", "Spell Combo:", comboTab)
addTextEdit("spellValue", comboOptions.spell, function(widget, text)
comboOptions.spell = text
storage.gpSpellComboSpell = text
end, comboTab)
onTalk(function(name, level, mode, text, channelId, pos)
if not comboOptions.trigger then
return
end
if name and name:lower() == comboOptions.leader:lower() then
if text == comboOptions.trigger then
say(comboOptions.spell)
end
end
end)
local lootItemIds = {
["3281"] = "giant sword",
["3555"] = "golden boots",
["3364"] = "golden legs",
["3079"] = "boots of haste",
["3366"] = "magic plate armor",
["3386"] = "dragon scale mail",
["3320"] = "fire axe",
["3309"] = "thunder hammer",
["3422"] = "great shield",
["3387"] = "Demon Helmet",
["3414"] = "mastermind shield"
}
local ids={}
local currentIdIdx = 0
local count = 0
for k,_ in pairs(lootItemIds) do
count=count+1
ids[count]=k
end
macro(10*1000, "LOOT SELL", function()
if not g_game.isOnline() then return end
for idx, id in pairs(ids) do
if idx <= currentIdIdx then goto skip_to_next end
currentIdIdx = idx
found = findItem(id)
if found then
say("!sell " .. lootItemIds[id])
return
end
::skip_to_next::
end
currentIdIdx = 0
end)
local botToggleSetPositionX = 0.05
local botToggleSetPositionY = 0.05
local botToggleId = "Toggle BOT"
addIcon(botToggleId, {item=25486, outfit={mount=0, feet=82, legs=82, body=82, type=128, auxType=0, addons=3, head=94}, hotkey=nil, movable=true, text=botToggleId, x=botToggleSetPositionX, y=botToggleSetPositionY},
function(icon, isOn)
if isOn == true then
TargetBot.setOn()
CaveBot.setOn()
else
TargetBot.setOff()
CaveBot.setOff()
end
end)
storage._icons[botToggleId].x = botToggleSetPositionX
storage._icons[botToggleId].y = botToggleSetPositionY
local moneyIds = { 3035, 3043 } -- platinium coin, crystal coin
macro(500, "Wymiana monet", function()
local containers = g_game.getContainers()
for index, container in pairs(containers) do
if not container.lootContainer then
for i, item in ipairs(container:getItems()) do
if item:getCount() >= 100 then
for m, moneyId in ipairs(moneyIds) do
if item:getId() == moneyId then
return g_game.use(item)
end
end
end
end
end
end
end)
local singleTargetSpell = 'exori vis'
local multiTargetSpell = 'satanology'
local distance = 3
local amountOfMonsters = 1
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(multiTargetSpell)
else
say(singleTargetSpell)
end
end)
To share this paste please copy this url and send to your friends
RAW Paste Data