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

put that floor to summon monster for 4 minutes, after that time would summon a boss.

falls13

New Member
Joined
Nov 3, 2015
Messages
29
Reaction score
1
tfs 0 3 6



local monster = {"demon", {x = 1, y = 1, z = 1}}
local timetoremove = {2, "min"}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if getCreatureByName(monster[1]) then return true end
local m = doCreateMonster(monster[1], monster[2])
addEvent(function() if isMonster(m) then doRemoveCreature(m) end end, mathtime(timetoremove) * 1000)
return true
end

function mathtime(table) -- by dwarfer
local unit = {"sec", "min", "hour", "day"}
for i, v in pairs(unit) do
if v == table[2] then
return table[1](60^(v == unit[4] and 2 or i-1))(v == unit[4] and 24 or 1)
end
end
return error("Bad declaration in mathtime function.")
end
 
Back
Top