rogersenchou
Member
- Joined
- Nov 27, 2016
- Messages
- 48
- Reaction score
- 6
help me with monsters portal please:
I have this script but this doesn't work.
i have tfs 1.2 otx
please help
I have this script but this doesn't work.
local bosses = {
['demon'] = 20000 ------------> storange pueden cambiarlo por el que ustede no ocupen
}
function onKill(player, target)
local targetMonster = target:getMonster()
if not targetMonster then
return true
end
local targetName = targetMonster:getName():lower()
local bossStorage = bosses[targetName]
if not bossStorage then
return true
end
local function deleteTeleport(position)
local teleport = Tile(position):getItemById(1387)
if teleport then
teleport:remove()
end
end
local newValue = 2
Game.setStorageValue(bossStorage, newValue)
local item = Game.createItem(1387, 1,{x = 94, y = 130, z = 7}) ------> donde se creara
if item:isTeleport() then
item:setDestination({x = 94, y = 125, z = 7}) ------> donde te teleportara
end
if newValue == 2 then
player:say('You now have 1 minutes to exit this room through the teleporter. It will bring you to the next room.', TALKTYPE_MONSTER_SAY)
addEvent(deleteTeleport, 1 * 60 * 1000, {x = 94, y = 130, z = 7}) ------> donde lo removera
end
return true
end
i have tfs 1.2 otx
please help