Mr Erimyth
Member
Give as much information as possible(TFS version, OS, errors, scripts)
Version: Tfs 1.2 Downgrade to 8.6
os: Linux - Debian 9
Hail Bros, anyone can help me? i need fix my zombie event! this dont remove monsters if are finished.
I need clean the Zombie arena in finish event.
fron potision: {x = 32068, y = 32188, z = 7}
to position: {x = 32105, y = 32220, z = 7}
Monster name: Walking dead.
My Close function In Lib:
Thx Brothers!
os: Linux - Debian 9
Hail Bros, anyone can help me? i need fix my zombie event! this dont remove monsters if are finished.
I need clean the Zombie arena in finish event.
fron potision: {x = 32068, y = 32188, z = 7}
to position: {x = 32105, y = 32220, z = 7}
Monster name: Walking dead.
My Close function In Lib:
Lua:
function Zombie:Close()
if not self.open then
return false
end
self.open = false
local function returnWinner()
for i = 1, #self.players do
local pid = self.players[i]
local name = getCreatureName(pid) or pid
if pid and #self.players == 1 then
table.remove(self.players, i)
print(">> ["..self.eventName.."] Finalizado com sucesso. Vencedor: " .. name)
return pid
end
end
end
local player = Player(returnWinner())
if player then
broadcastMessage(string.format("["..self.eventName.."]\nPlayer %s survived until the end and won the event!", player:getName()))
else
broadcastMessage("["..self.eventName.."] - Error\nNobody won the event.")
end
for i = 1, #self.reward do
local item = player:addItem(self.reward[i].id, self.reward[i].quantidade)
end
player:teleportTo(player:getTown():getTemplePosition())
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "["..self.eventName.."]\nYou won the event!")
return true
end
Thx Brothers!
Last edited: