Code:
function getMother()
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.New(i)
if c:Name() == "Slime" and c:HealthPercent() <= 75 then
return c
end
end
end
local mother = getMother()
local me = Creature.GetByID(Self.ID())
Module.New('slime-trainer', function(module)
if mother:isAlive() and (me:HealthPercent() <= 80 or Self.ItemCount("small stone") < 1 or not Self.isAreaPvPSafe(8, false, true)) then
mother:Attack()
module:Stop()
end
end)
I havent test isAreaPvPSafe Im not 100% sure I used it correctly. Its suppose to detect players on the screen.
you might been to change "small stone" to the itemid. Im not sure if it will pick it up I believe tibia has more then 1 item called "small stone"
look in C:\Program Files (x86)\XenoBot\Data\XenoLuaLib.lua for scripting functions(or what your calling commands).