• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[tfs 1.2] creature script help

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.


  1. 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 :p
 
Back
Top