• 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!

TFS 1.X+ Kick boss time

robert100

Member
Joined
May 2, 2011
Messages
33
Solutions
1
Reaction score
5
Hi, the time to kill the boss is 10 minutes.
How can I add that my time resets to zero when I leave?
The problem is that the overall time is not counted on one fight and often kick at a time

local function clearBossRoom()
-- if fighters are inside arena too long kick them --
if Game.getStorageValue(red_config.game_storage) == 1 then
local spectators = Game.getSpectators(red_config.boss_room_center, false, false, 13, 11, 12, 10)
for i = 1, #spectators do
local spectator = spectators
if spectator:isPlayer() then
spectator:teleportTo(red_config.room_exit_coord)
spectator:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
spectator:say('Time out! You were teleported out by strange forces.', TALKTYPE_MONSTER_SAY)
elseif spectator:isMonster() then
spectator:remove()
end
end
Game.setStorageValue(red_config.game_storage, 0)
end
end



exit
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()

if not player then
return true
end

player:teleportTo(Position(4408, 4127, 7))
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)

return true

end
 
Back
Top