Log in

View Full Version : Slime Trainer



mynigga
02-24-2016, 11:22 PM
So Im a new xenobot user and I have found a very usefull script for hunting slimes, but I was wondering is there any way to Add in alternate creatures? I keep getting interrupted from Skeletons and Rots.... Can someone point me in the right direction. Here is the script. (I am not taking any credit)

mynigga
02-24-2016, 11:29 PM
-- ╔═╗┬ ┬┌┬┐┌─┐ ╔╦╗┬─┐┌─┐┬┌┐┌┌─┐┬─┐
-- ╚═╗│ ││││├┤ ║ ├┬┘├─┤││││├┤ ├┬┘
-- ╚═╝┴─┘┴┴ ┴└─┘ ╩ ┴└─┴ ┴┴┘└┘└─┘┴└─
-- ╔╗ ┬ ┬ ╔═╗┌─┐┬ ┬┬ ┬ ┬┌─┐┬─┐┌─┐
-- ╠╩╗└┬┘ ╠╣ │ ││ ││ │││├┤ ├┬┘├─┘
-- ╚═╝ ┴ ╚ └─┘└─┘┴─┘└┴┘└─┘┴└─┴

-- Attacks Mother Slime till under a certain HP, then continues to attack summoned ones
-- Set MotherHP to the health percent you want to stop attacking the Mother Slime

MotherHP = 50

Module.New("Slime Trainer", function(Module)
if Self.TargetID() == 0 then
local Slimes = Self.GetTargets(1)
for i = 1, #Slimes do
if Slimes[i]:Name() == 'Slime' then
if (Slimes[i]:isMother() and Slimes[i]:HealthPercent() > MotherHP) or not Slimes[i]:isMother() then
Slimes[i]:Attack()
break
end
end
end
end
local Slime = Creature.New(Self.TargetID())
if Slime:isMother() and Slime:HealthPercent() <= MotherHP then
Self.StopAttack()
end
Module:Delay(2000)
end)

Furpan
03-13-2016, 05:54 AM
mynigga

Hi, wrote this real quick for you, let me know if it works out for you. It will kill any trash mobs and ignore the mother slime, updating after the current target is not available anymore (dead).

local trash = {
['Rat'] = true,
['Cave Rat'] = true
}

Module.New('Slimer', function(mod)
if Self.TargetID() == 0 then
local creatures = Self.GetTargets(1)
for i = 1, #creatures do
local c = creatures[i]
local name = c:Name()
if trash[name] then
c:Attack()
break
elseif name == 'Slime' then
if not c:isMother() then
c:Attack()
break
end
end
end
end
mod:Delay(5000)
end)