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

3 Pharaoh not create portal.

xitos

New Member
Joined
Oct 14, 2008
Messages
213
Reaction score
1
Hiho

I've got this error

when I kill Morguthis, Asmunrah and Rahemos the teleport does not appear

script:
Code:
function onDeath(cid, corpse, killer)

    registerCreatureEvent(cid, "hotaPortals")

    local creaturename = getCreatureName(cid)

--- positions where the teleports will be created:

    local omruc_in_pos = {x=33201, y=32999, z=14, stackpos=2}
    local thalas_in_pos = {x=33397, y=32841, z=14, stackpos=2}
    local dipthrah_in_pos = {x=33096, y=32588, z=15, stackpos=2}
    local mahrdis_in_pos = {x=33189, y=32953, z=15, stackpos=2}
    local vashresamun_in_pos = {x=33123, y=32655, z=15, stackpos=2}
    local morguthis_in_pos = {x=33166, y=32694, z=14, stackpos=2}
    local rahemos_in_pos = {x=33076, y=32779, z=14, stackpos=2}
    local ashmunrah_in_pos = {x=33179, y=32881, z=11, stackpos=2}

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

    local omruc_to_pos = {x=33179, y=33017, z=14, stackpos=1}
    local thalas_to_pos = {x=33350, y=32829, z=14, stackpos=1}
    local dipthrah_to_pos = {x=33127, y=32593, z=15, stackpos=1}
    local mahrdis_to_pos = {x=33175, y=32936, z=15, stackpos=1}
    local vashresamun_to_pos = {x=33146, y=32667, z=15, stackpos=1}
    local morguthis_in_pos = {x=33166, y=32694, z=14, stackpos=1}
    local rahemos_in_pos = {x=33052, y=32778, z=14, stackpos=1}
    local ashmunrah_in_pos = {x=33198, y=32886, z=11, stackpos=1}
  
    local time_to_pass = 60 -- in seconds
    local tpID = 5023
    local doEffect = CONST_ME_ENERGYHIT
    local message = "You now have 1 minute to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."

    if creaturename == 'omruc' then

            teleport1 = doCreateTeleport(tpID, omruc_to_pos, omruc_in_pos)
            
            teleport = doSetItemActionId(teleport2, 4072)

            doSendMagicEffect(omruc_in_pos, doEffect)

            doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

            addEvent(removeTeleportInOmrucWard, (1000*time_to_pass))

    elseif creaturename == 'thalas' then

            teleport2 = doCreateTeleport(tpID, thalas_to_pos, thalas_in_pos)

            teleport = doSetItemActionId(teleport2, 4078)

            doSendMagicEffect(thalas_in_pos, doEffect)

            doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

            addEvent(removeTeleportInThalasWard, (1000*time_to_pass))

    elseif creaturename == 'mahrdis' then

            teleport3 = doCreateTeleport(tpID, mahrdis_to_pos, mahrdis_in_pos)

            teleport = doSetItemActionId(teleport3, 4074)

            doSendMagicEffect(mahrdis_in_pos, doEffect)

            doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

            addEvent(removeTeleportInMahrdisWard, (1000*time_to_pass))

    elseif creaturename == 'dipthrah' then

            teleport4 = doCreateTeleport(tpID, dipthrah_to_pos, dipthrah_in_pos)

            teleport = doSetItemActionId(teleport4, 4080)

            doSendMagicEffect(dipthrah_in_pos, doEffect)

            doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

            addEvent(removeTeleportInDipthrahWard, (1000*time_to_pass))

    elseif creaturename == 'vashresamun' then

            teleport5 = doCreateTeleport(tpID, vashresamun_to_pos, vashresamun_in_pos)

            doSendMagicEffect(vashresamun_in_pos, doEffect)

            doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

            addEvent(removeTeleportInVashresamunWard, (1000*time_to_pass))

    elseif creaturename == 'morguthis' then

            teleport6 = doCreateTeleport(tpID, morguthis_to_pos, morguthis_in_pos)

            doSendMagicEffect(morguthis_in_pos, doEffect)

            doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

            addEvent(removeTeleportInMorguthisWard, (1000*time_to_pass))

    elseif creaturename == 'rahemos' then

            teleport7 = doCreateTeleport(tpID, rahemos_to_pos, rahemos_in_pos)

            doSendMagicEffect(rahemos_in_pos, doEffect)

            doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

            addEvent(removeTeleportInRahemosWard, (1000*time_to_pass))
            
    elseif creaturename == 'ashmunrah' then

            teleport8 = doCreateTeleport(tpID, ashmunrah_to_pos, ashmunrah_in_pos)

            doSendMagicEffect(ashmunrah_in_pos, doEffect)

            doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

            addEvent(removeTeleportInAshmunrahWard, (1000*time_to_pass))        


        end
end

function removeTeleportInomrucWard()
    if getThingfromPos({x=33201, y=32999, z=14, stackpos=1}).itemid == 5023 then
    doRemoveItem(getThingfromPos({x=33201, y=32999, z=14, z=12, stackpos=1}).uid,1)
    doSendMagicEffect({x=33201, y=32999, z=14, stackpos=1}, CONST_ME_POFF)
    return TRUE
    end
end

function removeTeleportInthalasWard()
    if getThingfromPos({x=33397, y=32841, z=14, stackpos=1}).itemid == 5023 then
    doRemoveItem(getThingfromPos({x=33397, y=32841, z=14, stackpos=1}).uid,1)
    doSendMagicEffect({x=33397, y=32841, z=14, stackpos=1}, CONST_ME_POFF)
    return TRUE
    end
end

function removeTeleportIndipthrahWard()
    if getThingfromPos({x=33096, y=32588, z=15, stackpos=1}).itemid == 5023 then
    doRemoveItem(getThingfromPos({x=33096, y=32588, z=15, stackpos=1}).uid,1)
    doSendMagicEffect({x=33096, y=32588, z=15, stackpos=1}, CONST_ME_POFF)
    return TRUE
    end
end

function removeTeleportInmahrdisWard()
    if getThingfromPos({x=33189, y=32953, z=15, stackpos=1}).itemid == 5023 then
    doRemoveItem(getThingfromPos({x=33189, y=32953, z=15, stackpos=1}).uid,1)
    doSendMagicEffect({x=33189, y=32953, z=15, stackpos=1}, CONST_ME_POFF)
    return TRUE
    end
end

function removeTeleportInvashresamunWard()
    if getThingfromPos({x=33123, y=32655, z=15, stackpos=1}).itemid == 5023 then
    doRemoveItem(getThingfromPos({x=33123, y=32655, z=15, stackpos=1}).uid,1)
    doSendMagicEffect({x=33123, y=32655, z=15, stackpos=1}, CONST_ME_POFF)
    return TRUE
    end
end

function removeTeleportInmorguthisWard()
    if getThingfromPos({x=33166, y=32694, z=14, stackpos=1}).itemid == 5023 then
    doRemoveItem(getThingfromPos({x=33166, y=32694, z=14, stackpos=1}).uid,1)
    doSendMagicEffect({x=33166, y=32694, z=14, stackpos=1}, CONST_ME_POFF)
    return TRUE
    end
end
    
function removeTeleportInrahemosWard()
    if getThingfromPos({x=33076, y=32779, z=14, stackpos=1}).itemid == 5023 then
    doRemoveItem(getThingfromPos({x=33076, y=32779, z=14, stackpos=1}).uid,1)
    doSendMagicEffect({x=33076, y=32779, z=14, stackpos=1}, CONST_ME_POFF)
    return TRUE
    end
end
    
function removeTeleportInashmunrahWard()
    if getThingfromPos({x=33179, y=32881, z=11, stackpos=1}).itemid == 5023 then
    doRemoveItem(getThingfromPos({x=33179, y=32881, z=11, stackpos=1}).uid,1)
    doSendMagicEffect({x=33179, y=32881, z=11, stackpos=1}, CONST_ME_POFF)
    return TRUE
    end
end
what is the problem?

Thanks !! :peace:
 
Last edited by a moderator:
Please help i need to fix this quest :D

what is wrong ??

when I kill the Morguthis, Rahemos and Ashmunrah, the portal does not appear

Please help :D

Thanks !!
 
Code:
--- positions where the teleports will be created:

local omruc_in_pos = {x=33201, y=32999, z=14}
local thalas_in_pos = {x=33397, y=32841, z=14}
local dipthrah_in_pos = {x=33096, y=32588, z=15}
local mahrdis_in_pos = {x=33189, y=32953, z=15}
local vashresamun_in_pos = {x=33123, y=32655, z=15}
local morguthis_in_pos = {x=33166, y=32694, z=14}
local rahemos_in_pos = {x=33076, y=32779, z=14}
local ashmunrah_in_pos = {x=33179, y=32881, z=11}

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

local omruc_to_pos = {x=33179, y=33017, z=14}
local thalas_to_pos = {x=33350, y=32829, z=14}
local dipthrah_to_pos = {x=33127, y=32593, z=15}
local mahrdis_to_pos = {x=33175, y=32936, z=15}
local vashresamun_to_pos = {x=33146, y=32667, z=15}
local morguthis_in_pos = {x=33166, y=32694, z=14}
local rahemos_in_pos = {x=33052, y=32778, z=14}
local ashmunrah_in_pos = {x=33198, y=32886, z=11}

local time_to_pass = 60 -- in seconds
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 1 minute to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."

local function removeTeleportInomrucWard()
	if getTileItemById({x=33201, y=32999, z=14}, tpID).uid > 0 then
	doRemoveItem(getTileItemById({x=33201, y=32999, z=14, z=12}, tpID).uid,1)
	doSendMagicEffect({x=33201, y=32999, z=14}, CONST_ME_POFF)
	end
end

local function removeTeleportInthalasWard()
	if getTileItemById({x=33397, y=32841, z=14}, tpID).uid > 0 then
	doRemoveItem(getTileItemById({x=33397, y=32841, z=14}, tpID).uid,1)
	doSendMagicEffect({x=33397, y=32841, z=14}, CONST_ME_POFF)
	end
end

local function removeTeleportIndipthrahWard()
	if getTileItemById({x=33096, y=32588, z=15}, tpID).uid > 0 then
	doRemoveItem(getTileItemById({x=33096, y=32588, z=15}, tpID).uid,1)
	doSendMagicEffect({x=33096, y=32588, z=15}, CONST_ME_POFF)
	end
end

local function removeTeleportInmahrdisWard()
	if getTileItemById({x=33189, y=32953, z=15}, tpID).uid > 0 then
	doRemoveItem(getTileItemById({x=33189, y=32953, z=15}, tpID).uid,1)
	doSendMagicEffect({x=33189, y=32953, z=15}, CONST_ME_POFF)
	end
end

local function removeTeleportInvashresamunWard()
	if getTileItemById({x=33123, y=32655, z=15}, tpID).uid > 0 then
	doRemoveItem(getTileItemById({x=33123, y=32655, z=15}, tpID).uid,1)
	doSendMagicEffect({x=33123, y=32655, z=15}, CONST_ME_POFF)
	end
end

local function removeTeleportInmorguthisWard()
	if getTileItemById({x=33166, y=32694, z=14}, tpID).uid > 0 then
	doRemoveItem(getTileItemById({x=33166, y=32694, z=14}, tpID).uid,1)
	doSendMagicEffect({x=33166, y=32694, z=14}, CONST_ME_POFF)
	end
end
	
local function removeTeleportInrahemosWard()
	if getTileItemById({x=33076, y=32779, z=14}, tpID).uid > 0 then
	doRemoveItem(getTileItemById({x=33076, y=32779, z=14}, tpID).uid,1)
	doSendMagicEffect({x=33076, y=32779, z=14}, CONST_ME_POFF)
	end
end
	
local function removeTeleportInashmunrahWard()
	if getTileItemById({x=33179, y=32881, z=11}, tpID).uid > 0 then
	doRemoveItem(getTileItemById({x=33179, y=32881, z=11}, tpID).uid,1)
	doSendMagicEffect({x=33179, y=32881, z=11}, CONST_ME_POFF)
	end
end

function onDeath(cid, corpse, killer)
	registerCreatureEvent(cid, "hotaPortals")
	local creaturename = getCreatureName(cid):lower()
	if creaturename == 'omruc' then
		doSetItemActionId(doCreateTeleport(tpID, omruc_to_pos, omruc_in_pos), 4072)
		doSendMagicEffect(omruc_in_pos, doEffect)
		doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
		addEvent(removeTeleportInOmrucWard, time_to_pass * 1000)
	elseif creaturename == 'thalas' then
		doSetItemActionId(doCreateTeleport(tpID, thalas_to_pos, thalas_in_pos), 4078)
		doSendMagicEffect(thalas_in_pos, doEffect)
		doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
		addEvent(removeTeleportInThalasWard, time_to_pass * 1000)
	elseif creaturename == 'mahrdis' then
		doSetItemActionId(doCreateTeleport(tpID, mahrdis_to_pos, mahrdis_in_pos), 4074)
		doSendMagicEffect(mahrdis_in_pos, doEffect)
		doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
		addEvent(removeTeleportInMahrdisWard, time_to_pass * 1000)
	elseif creaturename == 'dipthrah' then
		doSetItemActionId(doCreateTeleport(tpID, dipthrah_to_pos, dipthrah_in_pos), 4080)
		doSendMagicEffect(dipthrah_in_pos, doEffect)
		doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
		addEvent(removeTeleportInDipthrahWard, time_to_pass * 1000)
	elseif creaturename == 'vashresamun' then
		doCreateTeleport(tpID, vashresamun_to_pos, vashresamun_in_pos)
		doSendMagicEffect(vashresamun_in_pos, doEffect)
		doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
		addEvent(removeTeleportInVashresamunWard, time_to_pass * 1000)
	elseif creaturename == 'morguthis' then
		doCreateTeleport(tpID, morguthis_to_pos, morguthis_in_pos)
		doSendMagicEffect(morguthis_in_pos, doEffect)
		doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
		addEvent(removeTeleportInMorguthisWard, time_to_pass * 1000)
	elseif creaturename == 'rahemos' then
		doCreateTeleport(tpID, rahemos_to_pos, rahemos_in_pos)
		doSendMagicEffect(rahemos_in_pos, doEffect)
		doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
		addEvent(removeTeleportInRahemosWard, time_to_pass * 1000)
	elseif creaturename == 'ashmunrah' then
		doCreateTeleport(tpID, ashmunrah_to_pos, ashmunrah_in_pos)
		doSendMagicEffect(ashmunrah_in_pos, doEffect)
		doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
		addEvent(removeTeleportInAshmunrahWard, time_to_pass * 1000)        
	end
end
The entire script should be rewritten, but I don't have time for that.
 
Back
Top Bottom