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

[Request] Inquisition Teleport don't disappear

przemek1991

New Member
Joined
Feb 17, 2008
Messages
25
Reaction score
0
Hi, i have a problem, when i kill boss the teleport dont disappear after 3minutes, its still there and everybody can go through it.
Lua:
function onDeath(cid, corpse, killer)

	registerCreatureEvent(cid, "ushurielTeleport")

	local creaturename = getCreatureName(cid)
	local in_pos = {x=33175, y=31728, z=11, stackpos=2} 
	local checkIID = getThingfromPos(in_pos)
	local to_pos = {x=33068, y=31785, z=13, stackpos=1} 
	local time_to_pass = 10 -- in seconds
	local tpID = 1387

    if creaturename == 'ushuriel' then

		teleport = doCreateTeleport(tpID, to_pos, in_pos)

		doSendMagicEffect(in_pos, CONST_ME_TELEPORT)

		doCreatureSay(cid, "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during this time or the teleporter will disappear", TALKTYPE_ORANGE_1)
		addEvent(removeTeleport, (1000*time_to_pass))

	
		end 
	end

local function removeTeleport()
	if getThingfromPos({x=33175, y=31728, z=11, stackpos=1}).itemid == 1387 then
	doRemoveItem(getThingfromPos({x=33175, y=31728, z=11, stackpos=1}).uid,1)
	doSendMagicEffect({x=33175, y=31728, z=11, stackpos=1}, CONST_ME_POFF)
	return TRUE
	end
end
(i make time 10sec to check faster...) using tfs 0.2.5 plz help, i give REP++ :p
 
this doesn't work for me ;( still it's there, or if someone can plz relase a similar script that tp dont show on boss corpse but in my coords xyz and it would work
 
i changed stackpos 1,2,254,255, and still the same, JDB your script dont work too for 0.2.5 idk why and what to do I'm sitting on this for 3days ;(
 
i changed stackpos 1,2,254,255, and still the same, JDB your script dont work too for 0.2.5 idk why and what to do I'm sitting on this for 3days ;(

About stack positions:
beztytuu.PNG
 
It should work:
Lua:
function removeTeleport()
local teleportPos = {x=1, y=1, z=1}
local teleport = getTileItemById(teleportPos, 1387)

	if teleport.uid > 0 then
		doRemoveItem(teleport.uid)
		doSendMagicEffect(teleportPos, CONST_ME_POFF)
	end
	return true
end

and to add timer:
Lua:
addEvent(removeTeleport, time_to_pass * 1000)
 
haha thats funny and cool but stackpos 1 do not work :( stackpos 1 is one item above groundtile right, so tp should be on stackpos 1, the tp dont disappear and there are no puff when the tp should disappear so maybe something else in the script is wrong?

EDIT: JDB your script doesn't work for me ;( help plz...
 
Last edited:
@Up,

Yea, I was sure my script worked...
Another member tested it and said it worked fine.
 
This is the Inquis Teleports used in the server RealMap, Maybe you can use it.

Code:
function onDeath(cid, corpse, killer)

	registerCreatureEvent(cid, "inquisitionPortals")

	local creaturename = getCreatureName(cid)

--- positions where the teleports will be created:

	local ushuriel_in_pos = {x=1110, y=1219, z=5, stackpos=2} 
	local annihilon_in_pos = {x=1193, y=1207, z=5, stackpos=2} 
	local hellgorak_in_pos = {x=1197, y=1252, z=5, stackpos=2} 
	local madareth_in_pos = {x=1116, y=1254, z=5, stackpos=2} 
	local zugurosh_in_pos = {x=1144, y=1218, z=5, stackpos=2} 
	local brothers_in_pos = {x=1151, y=1254, z=5, stackpos=1}

--- positions where the teleports will be teleported you:

	local ushuriel_to_pos = {x=1193, y=1207, z=5, stackpos=1}
	local annihilon_to_pos = {x=1197, y=1252, z=5, stackpos=1}  
	local hellgorak_to_pos = {x=1116, y=1254, z=5, stackpos=1} 
	local madareth_to_pos = {x=1144, y=1218, z=5, stackpos=1} 
	local zugurosh_to_pos = {x=1151, y=1254, z=5, stackpos=1} 
	local brothers_to_pos = {x=1151, y=1254, z=5, stackpos=1}

	local time_to_pass = 180 -- in seconds
	local tpID = 1387
	local doEffect = CONST_ME_TELEPORT
	local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during this time or the teleporter will disappear."

	if creaturename == 'Ushuriel' then

			teleport = doCreateTeleport(tpID, ushuriel_to_pos, ushuriel_in_pos)

			doSendMagicEffect(ushuriel_in_pos, doEffect)

			doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

			addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))

	elseif creaturename == 'Annihilon' then

			teleport = doCreateTeleport(tpID, annihilon_to_pos, annihilon_in_pos)

			doSendMagicEffect(annihilon_in_pos, doEffect)

			doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

			addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))

	elseif creaturename == 'Madareth' then

			teleport = doCreateTeleport(tpID, madareth_to_pos, madareth_in_pos)

			doSendMagicEffect(madareth_in_pos, doEffect)

			doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

			addEvent(removeTeleportInMadarethWard, (1000*time_to_pass)) 

	elseif creaturename == 'Hellgorak' then

			teleport = doCreateTeleport(tpID, hellgorak_to_pos, hellgorak_in_pos)

			doSendMagicEffect(hellgorak_in_pos, doEffect)

			doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

			addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass)) 

	elseif creaturename == 'Zugurosh' then

			teleport = doCreateTeleport(tpID, zugurosh_to_pos, zugurosh_in_pos)

			doSendMagicEffect(zugurosh_in_pos, doEffect)

			doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

			addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))

	elseif creaturename == 'Latrivan' then

			teleport = doCreateTeleport(tpID, brothers_to_pos, brothers_in_pos)

			doSendMagicEffect(brothers_in_pos, doEffect)

			doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

			addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))

	
		end 
end

function removeTeleportInUshurielWard()
	if getThingfromPos({x=1110, y=1219, z=5, stackpos=2}).itemid == 1387 then
	doRemoveItem(getThingfromPos({x=1110, y=1219, z=5, stackpos=2}).uid,1)
	doSendMagicEffect({x=81110, y=1219, z=5, stackpos=1}, CONST_ME_POFF)
	return TRUE
	end
end

function removeTeleportInAnnihilonWard()
	if getThingfromPos({x=1193, y=1207, z=5, stackpos=2}).itemid == 1387 then
	doRemoveItem(getThingfromPos({x=1193, y=1207, z=5, stackpos=2}).uid,1)
	doSendMagicEffect({x=11193, y=1207, z=5, stackpos=1}, CONST_ME_POFF)
	return TRUE
	end
end

function removeTeleportInHellgorakWard()
	if getThingfromPos({x=1197, y=1252, z=5, stackpos=2}).itemid == 1387 then
	doRemoveItem(getThingfromPos({x=1197, y=1252, z=5, stackpos=2}).uid,1)
	doSendMagicEffect({x=1197, y=1252, z=5, stackpos=1}, CONST_ME_POFF)
	return TRUE
	end
end

function removeTeleportInMadarethWard()
	if getThingfromPos({x=1116, y=1254, z=5, stackpos=2}).itemid == 1387 then
	doRemoveItem(getThingfromPos({x=1116, y=1254, z=5, stackpos=2}).uid,1)
	doSendMagicEffect({x=1116, y=1254, z=5, stackpos=1}, CONST_ME_POFF)
	return TRUE
	end
end

function removeTeleportInZuguroshWard()
	if getThingfromPos({x=1144, y=1218, z=5, stackpos=2}).itemid == 1387 then
	doRemoveItem(getThingfromPos({x=1144, y=1218, z=5, stackpos=2}).uid,1)
	doSendMagicEffect({x=1144, y=1218, z=5, stackpos=1}, CONST_ME_POFF)
	return TRUE
	end
end

function removeTeleportInBrothersWard()
	if getThingfromPos({x=1151, y=1254, z=5, stackpos=1}).itemid == 1387 then
	doRemoveItem(getThingfromPos({x=1151, y=1254, z=5, stackpos=1}).uid,1)
	doSendMagicEffect({x=1151, y=1254, z=5, stackpos=1}, CONST_ME_POFF)
	return TRUE
	end
end
 
The problem is that he's using 0.2.5 and most scripts are for 0.3.4
Well, I've tested it in Real Map Project using TFS 0.2.5 .. and it's working flawlessly.. I've also made several edits (actually, onStepIn events and action IDs for newly created teleports) in order to make The Inquisition Quest more real (storage values, The Retreat, and heading back to the seals that you've 'unlocked' through teleports in The Retreat)
 
@Up,
You only need to edit a few functions on most 0.3.4 scripts, to work on 0.2.5.
I am sure it's possible to get it working.
 
Back
Top