-- tools tab
setDefaultTab("Tools")
if type([Link]) ~= "table" then
[Link] = {3031, 3035}
end
macro(1000, "Exchange money", function()
if not [Link][1] then return end
for index, container in pairs(containers) do
if not [Link] then -- ignore monster containers
for i, item in ipairs(container:getItems()) do
if item:getCount() == 100 then
for m, moneyId in ipairs([Link]) do
if item:getId() == [Link] then
return g_game.use(item)
end
end
end
end
end
end
end)
local moneyContainer = [Link](function(widget, items)
[Link] = items
end, true)
moneyContainer:setHeight(35)
moneyContainer:setItems([Link])
[Link]()
macro(60000, "Send message on trade", function()
local trade = getChannelId("advertising")
if not trade then
trade = getChannelId("trade")
end
if trade and [Link]:len() > 0 then
sayChannel(trade, [Link])
end
end)
[Link]([Link] or "I'm using OTClientV8!", function(widget,
text)
[Link] = text
end)
macro(1000, "Stack items", function()
local containers = g_game.getContainers()
local toStack = {}
for index, container in pairs(containers) do
if not [Link] then -- ignore monster containers
for i, item in ipairs(container:getItems()) do
if item:isStackable() and item:getCount() < 100 then
local stackWith = toStack[item:getId()]
if stackWith then
g_game.move(item, stackWith[1], [Link](stackWith[2],
item:getCount()))
return
end
toStack[item:getId()] = {container:getSlotPosition(i - 1), 100 -
item:getCount()}
end
end
end
end
end)
local Spells = {
{name = "utevo gran res sac", cast = true, range = 10, buffSpell = false, manaCost
= 1000, level = 0},}
-- script
macro(100, "Familiar", function()
if not g_game.isAttacking() then
return
end
local target = g_game.getAttackingCreature()
local distance = getDistanceBetween(player:getPosition(), target:getPosition())
for _, spell in ipairs(Spells) do
if mana() >= [Link] and lvl() >= [Link] and distance <= [Link]
and [Link] then
if not hasPartyBuff() or not [Link] then
say([Link])
end
end
end
end)
local Spells = {
{name = "utito tempo san", cast = true, range = 10, buffSpell = false, manaCost =
1000, level = 0},}
-- script
macro(5000, "Utito San", function()
if not g_game.isAttacking() then
return
end
local target = g_game.getAttackingCreature()
local distance = getDistanceBetween(player:getPosition(), target:getPosition())
for _, spell in ipairs(Spells) do
if mana() >= [Link] and lvl() >= [Link] and distance <= [Link]
and [Link] then
if not hasPartyBuff() or not [Link] then
say([Link])
end
end
end
end)