Hello guys,
How i can to make this script create item on corpose pos?
I'm using TFS 0.3.7
Ty u in advance!
How i can to make this script create item on corpose pos?
I'm using TFS 0.3.7
Ty u in advance!
Code:
local config = {
timeToRemove = 90, -- seconds
teleportId = 12278,
bosses = { -- Monster Name, Teleport Position
["Wrath of the Emperor"] = { pos = {x = 1515, y = 917, z = 7}, aid = 55555 }
}
}
local function removal(position)
doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
return TRUE
end
function onKill(cid, target, lastHit)
if(config.bosses[getCreatureName(target)]) then
local t = config.bosses[getCreatureName(target)]
local teleport = doCreateItem(config.teleportId, cid)
local position = t.pos
doItemSetAttribute(teleport, "aid", t.aid)
addEvent(removal, config.timeToRemove * 1000, position)
end
return true
end