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

god nacke

New Member
Joined
Sep 7, 2008
Messages
46
Reaction score
0
Hello,my scrip inquisition no work.what is the problem.in use tfs 0.3.2 crimdamson

PHP:
local config = {
	message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear..",
	timeToRemove = 180, -- seconds
	teleportId = 1387,
	bosses = { -- Monster Name, Teleport To Position, Teleport Position
		["Ushuriel"] = { {  x = 33333, y = 31653, z = 12 }, { x=33269, y = 31643, z = 12, stackpos = 1 } },
		["Annihilon"] = { { x = 33461, y = 31440, z = 13 }, { x = 33413, y = 31406, z = 13, stackpos = 1 } },
		["Hellgorak"] = { { x = 33534, y = 31243, z = 10 }, { x = 33489, y = 31279, z = 10, stackpos = 1 } },
		["Madareth"] = { { x = 33328, y = 31582, z = 12 }, { x = 33253, y = 31711, z = 12, stackpos = 1 } },
		["Zugurosh"] = { { x = 33261, y = 31662, z = 12 }, { x = 33269, y = 31663, z = 12, stackpos = 1 } },
		["Latrivan"] = { { x = 33203, y = 31296, z = 13 }, { x = 33246, y = 31690, z = 12, stackpos = 1 } }
	}
}

local function removal(position)
	if getThingfromPos(position).itemid == config.teleportId then
		doRemoveItem(getThingfromPos(position).uid)
	end
	return TRUE
end

function onKill(cid, target)
	local position = getCreaturePosition(target)
	for name, pos in pairs(config.bosses) do
		if name == getCreatureName(target) then
			teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, pos[2])
		end
	end
	return TRUE
end

thz for all
 
Try this
Code:
local config = {
    message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear..",
    timeToRemove = 180, -- seconds
    teleportId = 1387,
    bosses = { -- Monster Name, Teleport To Position, Teleport Position
        ["Ushuriel"] = { {  x = 33333, y = 31653, z = 12 }, { x=33269, y = 31643, z = 12, stackpos = 1 } },
        ["Annihilon"] = { { x = 33461, y = 31440, z = 13 }, { x = 33413, y = 31406, z = 13, stackpos = 1 } },
        ["Hellgorak"] = { { x = 33534, y = 31243, z = 10 }, { x = 33489, y = 31279, z = 10, stackpos = 1 } },
        ["Madareth"] = { { x = 33328, y = 31582, z = 12 }, { x = 33253, y = 31711, z = 12, stackpos = 1 } },
        ["Zugurosh"] = { { x = 33261, y = 31662, z = 12 }, { x = 33269, y = 31663, z = 12, stackpos = 1 } },
        ["Latrivan"] = { { x = 33203, y = 31296, z = 13 }, { x = 33246, y = 31690, z = 12, stackpos = 1 } }
    }
}

local function removal(position)
    if getThingfromPos(position).itemid == config.teleportId then
        doRemoveItem(getThingfromPos(position).uid)
    end
    return TRUE
end

function onDeath(cid, corpse, killer)
     local position = getCreaturePosition(cid)
    for name, pos in pairs(config.bosses) do
        if name == getCreatureName(cid) then
            teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
            doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
            addEvent(removal, config.timeToRemove * 1000, pos[2])
        end
    end
    return TRUE
end
 
Back
Top