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

help with kill monster and create teleport in TFS 0.3.6

dgprado

Member
Joined
Apr 5, 2009
Messages
792
Reaction score
23
Location
Patria Amada Brasil
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

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
 
Code:
local function removal(position)
	doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    return TRUE
end
should work, I dont get why you make portal on creature pos, but well...
 
Back
Top