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

If you kill - Then you have tp.

Xanter

New Member
Joined
Nov 8, 2008
Messages
12
Reaction score
0
Is something like Svargrond arena. But i need to small room and if monster kill then created in X Y Z tp and 20-30 second tp destroy.

Can somebody help me?

Thanks.
 
Creatureevent:
PHP:
function onKill(cid, target)
	local m = {
		["NAME OF MONSTER"] = {
			message = "Escape through the teleport quickly before it closes! You have 30 seconds!",
			cfg = {
				{
					time = 30, -- Seconds until tp closes.
					to = { x = 495, y = 921, z = 8 }, -- Where the tp takes you.
					tp = { x = 497, y = 902, z = 8 } -- Where the tp creates.
				},
			}
		}
	}
	if isPlayer(target) then
		return true
	end
	local monster = m[getCreatureName(target)]
	if monster then
		for i = 1, #monster.cfg do
			local c = monster.cfg[i]
				local function deleteTeleport()
				local teleport = getTileItemById(c.tp, 1387).uid
					if(teleport > 0) then
						doRemoveItem(teleport)
						doSendMagicEffect(c.tp, CONST_ME_POFF)
					end
					return true
				end
			doCreateTeleport(1387, c.to, c.tp)
			doSendMagicEffect(c.tp, CONST_ME_ENERGYAREA)
			addEvent(deleteTeleport, c.time * 1000)
		end
		doCreatureSay(cid, monster.message, TALKTYPE_ORANGE_1)
	end
	return true
end
 
Back
Top