• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Firestrom Event not kill players.

damix

New Member
Joined
Dec 16, 2017
Messages
28
Reaction score
1
Hey. I added a firestorm event from this guide
Firestorm Event | Tfs 1.2
on my OTX server 3, however, when fire hits someone, does not kill the player. If he attacks another player then fire will kill him, but that player will get skull. I do not have a non-pvp or pz zone in the arena.
I do not know why this is so. Could it be OTX 3 fault? Is this happening over OTX 3?
 
Solution
Lua:
local target = Tile(randfire):getBottomCreature()

if target then
Creature(target):addHealth(-target:getMaxHealth())
end
That's probably because the script is using combat in behalf of a players.
You have to make it get the creature from fire position and use addHealth() instead.


/// that's some quick fix, im on my phone and dont really wanna bother much with it

Instead of
Lua:
doAreaCombatHealth()
Add something like
Lua:
local target = Tile(randfire):getBottomCreature()

Creature(target):addHealth(-target:getMaxHealth())


Btw. thats really pretty dumb event :v
 
Last edited:
bayview Otx serwer 3 based on tfs 1.2 so there is no need.
2Rec Thank you for this advice, I will try to fix it. At least I know where the error is.
 
I changed it
doAreaCombatHealth(creature.uid, COMBAT_HOLYDAMAGE, randfire,randfire, -9999, -1000000,7)
to
local target = Tile(randfire):getBottomCreature()

Creature(target):addHealth(-target:getMaxHealth())
but now after entering the event hit once and sends a error in console.

Lua Script Error: [Main Interface]
in a timer event called from:
(Unknown scriptfile)
data/firestorm_event.lua:73: attempt to index a nil value
stack traceback:
[C]: in function '__index'
data/firestorm_event.lua:73: in function 'doStartfirestorm'
data/firestorm_event.lua:42: in function <data/firestorm_event.lua:22>

Anyone have an idea?
 
Lua:
local target = Tile(randfire):getBottomCreature()

if target then
Creature(target):addHealth(-target:getMaxHealth())
end
 
Solution
Guys, I have one more problem. After killing the player does not start
function onPrepareDeath (player, killer),
which is responsible for announcing the winner and giving the prize. I tried to give this function in between
if target then
Creature (target): addHealth (-target: getMaxHealth ())


end
however, it crashes the "attempt to index global 'player'" error.
 
Back
Top