dgprado
Member
I was using this script in TFS 0.3.5 pl1 and it was working 100%.Now in 0.3.6 pl1 the tepelort is created but dont is removed
Someone can tell me why this dont work now ?
THX
local config = {
message = "Pise no corpo em 2 minutos, ele ira desaparecer.",
timeToRemove = 120, -- seconds
teleportId = 1387,
bosses = {
["Ushuriel"] = { x = 1173, y = 1140, z = 12 },
["Annihilion"] = { x = 965, y = 1663, z = 12 },
["Hellgorak"] = { x = 876, y = 1660, z = 12 },
["Madareth"] = { x = 918, y = 1760, z = 12 },
["Zugurosh"] = { x = 903, y = 1649, z = 11 },
["Latrivan"] = { x = 998, y = 1711, z = 11 },
["Pythius The Rotten"] = { x = 340, y = 840, z = 15 },
["Druid"] = { x = 32296, y = 31636, z = 6 },
["Hatori Hanzo"] = { x = 32300, y = 31634, z = 6 },
["Vampire Hunter"] = { x = 32296, y = 31634, z = 5 },
["Uhii"] = { x = 32297, y = 31639, z = 5 },
}
}
local function removal(position)
position.stackpos = 1
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "inquisitionPortals")
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
doSendMagicEffect(position,65)
end
end
return TRUE
end
Someone can tell me why this dont work now ?
THX