Ir para conteúdo
  • 0

[AJUDA] Xenobot script erro


VitinhoMapp

Pergunta

Ola, tentando achar um script de treino afk pra kina achei essa pra xenobot, intendo porr@ nenhuma de script, só sei que quando tento executar ele no xenobot da o erro a seguir:

oJRyGGw.png

SCRIPT

 

 

--Notes--
--[[
Damage Slime Mother until its health is below 50%.
If you check the 'Advanced Info' (Adv Info) checkbox in Tools, XenoBot will automatically label the Slime Mother for you.
Set your training up where the Slime Mother is attacking you (adjacent to you).
If you're training with small stones, for example, their range is 4, so try to setup training in an area where the slime summons can't get out of range.
Any questions, problems, suggestions, etc., contact Jo3Bingham at XenoBot forums. http://forums.xenobot.net/
]]--

--Slime Trainer Settings--
local CreatureName = 'Slime' -- Name of creature you want to train on.
local CreatureRange = 4 -- Distance from self to get creatures.
local CreatureDistance = 2 -- Minimum distance target creature should be from self.

--Weapon Switcher Settings--
local TrainingWeaponID = 1781 -- ID of weapon you are training with. (Default: Small Stones)
local LowHealthWeaponID = 3277 -- ID of weapon you want to switch to when low on health. (Default: Spears)
local LowAmmoWeaponID = 3277 -- ID of weapon you want to switch to when low on ammo. (Default: Spears)

local SwitchOnLowHealth = false -- Set to false if you don't want to switch to alternate weapon on low health.
local SwitchLowHealth = math.floor(Self.MaxHealth() * 0.5) -- Your health at which you want to switch to alternate weapon. (Default: 50%)
local SwitchHighHealth = math.floor(Self.MaxHealth() * .75) -- Your health at which you want to switch back to training weapon. (Default: 75%)

local SwitchOnLowAmmo = false -- Set to true if you want to switch to alternate weapon on low ammo.
local SwitchAmmoCount = 50 -- Amount of ammo to switch to alternate weapon at.

--Slime Mother Killer Settings--
local KillOnLowHealth = true -- Set to false if you don't want to kill slime mother when low on health.
local KillLowHealth = math.floor(Self.MaxHealth() * .35) -- Your health at which you want to kill slime mother.

local KillOnLowAmmo = true -- Set to false if you don't want to kill slime mother when low on ammo.
local KillAmmoCount = 25 -- Amount of ammo to kill slime mother at.

--Alerts--
local AlertOnWeaponSwitch = false -- Set to true if you want to be alerted when weapon is switched.
local AlertOnLowAmmo = false -- Set to true if you want to be alerted when ammo is switched.
local AlertOnLowHealth = false -- Set to true if you want to be alerted when low on health.
local AlertOnKill = true -- Set to false if you don't want to be alerted when slime mother is killed.

--Only edit below if you want to.--
local KillingSlimeMother = false -- Do not change!

local SlimeTrainer = Module.New('Slime Trainer', function()
if (Self.TargetID() == 0) then
local creatures = Self.GetTargets(CreatureRange)
for i = 1, #creatures do
if (creatures[i]:DistanceFromSelf() >= CreatureDistance) then
if (creatures[i]:Attack()) then break end
end
end
end
end)

local WeaponSwitcher = Module.New('Weapon Switcher', function()
if (SwitchOnLowHealth) then
if (Self.Health() <= SwitchLowHealth and Self.Weapon().id ~= LowHealthWeaponID) then
if (AlertOnLowHealth) then alert() end
if (MoveWeapon(LowHealthWeaponID) and AlertOnWeaponSwitch) then alert() end
elseif (Self.Health() >= SwitchHighHealth and Self.Weapon().id ~= TrainingWeaponID) then
if (MoveWeapon(TrainingWeaponID) and AlertOnWeaponSwitch) then alert() end
end
end
if (SwitchOnLowAmmo) then
if (Self.Weapon().id == TrainingWeaponID and Self.Weapon().count <= SwitchAmmoCount) then
if (MoveWeapon(LowAmmoWeaponID) and AlertOnLowAmmo) then alert() end
end
end
wait(1000, 2000)
end, false)

local SlimeMotherKiller = Module.New('Slime Mother Killer', function()
if (KillOnLowHealth) then
if (Self.Health() <= KillLowHealth) then KillSlimeMother() end
end
if (KillOnLowAmmo) then
if (Self.Weapon().count <= KillAmmoCount) then KillSlimeMother() end
end
wait(1000, 2000)
end, false)

function MoveWeapon(ItemID)
local container = Container.GetFirst()
while (container:isOpen()) do
for spot = 0, container:ItemCapacity() do
if (container:GetItemData(spot).id == ItemID) then
return (container:MoveItemToEquipment(spot, 'weapon'))
end
end
container = container:GetNext()
end
return false
end

function KillSlimeMother()
if not (KillingSlimeMother) then
SlimeTrainer:Stop()
Self.StopAttack()
if (AlertOnLowHealth) then alert() end
local creatures = Self.GetTargets(1)
for i = 1, #creatures do
if (creatures:Name() == 'Slime' and creatures[i]:HealthPercent() <= 50) then
if (creatures[i]:Attack()) then break end
end
end
elseif (KillingSlimeMother and Self.TargetID == 0) then
local creatures = Self.GetTargets(1)
for i = 1, #creatures do
if (creatures:Name() == 'Slime' and creatures[i]:HealthPercent() <= 50) then
if (creatures[i]:Attack()) then break end
end
end
if (AlertOnKill) then alert() end
KillingSlimeMother = false
end
end

if (SwitchOnLowHealth or SwitchOnLowAmmo) then WeaponSwitcher:Start() end
if (KillOnLowHealth or KillOnLowAmmo) then SlimeMotherKiller:Start() end

local info = [['Slime Trainer' by Jo3Bingham loaded successfully.]]
print(info)
wait(500)

 

 

 

Se alguém souber como arrumar ajudaria bastante!

Abç

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0

Ola amigo, beleza? Mano; deixa eu falar - Não creio que nesse fórum vão te ajudar em relação a isso. Digo, sei que tem relação a script.lua mas o xTibia é destinado a DESENVOLVIMENTO DE SERVIDORES; não suporte a bots. Aconselho você a pedir ajuda em fórum específicos a isso.

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...