View Full Version : Help on lua script
raphaelignacio
07-11-2016, 09:38 PM
I want a script when my character is below x life, he equips ring and close tibia
Trykon
07-11-2016, 10:31 PM
You will need to remake it as i post it through phone, just remake big/small letters and some spaces, but logic should be correct:
Local x = 100
Local ring = "ring of healing"
While true do
If (self.life < x) then
Self.equip (ring, "ring")
Os.exit ()
End
End
raphaelignacio
07-13-2016, 03:25 PM
You will need to remake it as i post it through phone, just remake big/small letters and some spaces, but logic should be correct:
Local x = 100
Local ring = "ring of healing"
While true do
If (self.life < x) then
Self.equip (ring, "ring")
Os.exit ()
End
End
dont work
12:24 XenoScript Error:
Script: PoeRING.lua
Line #: 5
Chunk: ...?Users?PC?DOCUME?1?XenoBot?Scripts??PoeRING.lua
Error: attempt to index global 'self' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.
Trykon
07-13-2016, 03:32 PM
Did you remake it?
Tirell
07-13-2016, 05:43 PM
local healtoxlog = 20 --- in percent
local ring = 'energy ring'
--------------------------------------------
function HealthPercent()
return math.ceil(Self.Health() / Self.MaxHealth() * 100)
end
while true do
if (HealthPercent() < healtoxlog) then
Self.Equip(ring, 'ring')
wait(100, 200)
os.exit()
end
wait(500)
end
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.