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

Inq Quest Error!!!

kotek944

New Member
Joined
Oct 22, 2010
Messages
8
Reaction score
0
I have problem with door on inq quest. After killing the boss, door should unlock but they don't. What should I do? There is a file inquisition_seal.


PHP:
function onUse(cid, item, frompos, item2, topos)

   	if item.uid == 4073 then
   		queststatus = getPlayerStorageValue(cid,4072)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have saved the Crystal Caves.")
   			setPlayerStorageValue(cid,4072,1)
   		else
   			doPlayerSendTextMessage(cid,22,"This seal was saved.")
   		end
   	elseif item.uid == 4075 then
   		queststatus = getPlayerStorageValue(cid,4074)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have saved the Blood Hall.")
   			setPlayerStorageValue(cid,4074,1)
   		else
   			doPlayerSendTextMessage(cid,22,"This seal was saved.")
   		end
   	elseif item.uid == 4077 then
   		queststatus = getPlayerStorageValue(cid,4076)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have saved the Vats.")
   			setPlayerStorageValue(cid,4076,1)
   		else
   			doPlayerSendTextMessage(cid,22,"This seal was saved.")
   		end
   	elseif item.uid == 4079 then
   		queststatus = getPlayerStorageValue(cid,4078)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have saved the Arcanum.")
   			setPlayerStorageValue(cid,4078,1)
   		else
   			doPlayerSendTextMessage(cid,22,"This seal was saved.")
   		end
   	elseif item.uid == 4081 then
   		queststatus = getPlayerStorageValue(cid,4080)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,22,"You have saved the Hive.")
   			setPlayerStorageValue(cid,4080,1)
   		else
   			doPlayerSendTextMessage(cid,22,"This seal was saved.")
   	   	
   		end
	else
		return 0
   	end

   	return 0
end
:(
 
This is the file where you use the statues(if you have that) and save the seal, nothing related to doors, just storages
 
I don't understand all. Can you explain it more clearly and accurately?

teleports_inquisition
PHP:
local config = {
	message = "You have 45 seconds for back use Death Monster For Teleport You.",
	timeToRemove = 60, -- seconds
	teleportId = 1387,
	bosses = {
		["Ushuriel"] = { x = 172, y = 559, z = 13 },
		["Annihilon"] = { x = 294, y = 681, z = 13},
		["Hellgorak"] = { x = 255, y = 467, z = 13},
		["Madareth"] = { x = 287, y = 365, z = 13},
		["Zugurosh"] = { x = 314,  y = 474, z = 13},
		["Latrivan"] = { x = 408, y = 413, z = 13},
                ["Tirecz"] = { x = 33061, y = 31029, z = 7 }
              
                
	}
}
	
local function removal(position)
	doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    return TRUE
end


function onDeath(cid, corpse, killer)
	registerCreatureEvent(cid, "inquisitionPortals")
	local position = getCreaturePosition(cid)
	
	for name, pos in pairs(config.bosses) do
		if name == getCreatureName(cid) then
			teleport = doCreateTeleport(config.teleportId, pos, position)
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, position)
			doSendMagicEffect(position,65)
		end
	end
	return TRUE
end
inquisitionPortals
PHP:
function onDeath(cid, corpse, killer)

registerCreatureEvent(cid, "inquisitionPortals")

local creaturename = getCreatureName(cid)

local ushuriel_in_position = {x=246, y=351, z=12, stackpos=2}
local annihilon_in_position = {x=637, y=472, z=13, stackpos=2}
local hellgorak_in_position = {x=335, y=581, z=10, stackpos=2}
local madareth_in_position = {x=340, y=460, z=13, stackpos=2}
local zugurosh_in_position = {x=390, y=525, z=13, stackpos=2}
local brothers_in_position = {x=505, y=345, z=13, stackpos=1}

local ushuriel_to_position = {x=172, y=559, z=13, stackpos=1}
local annihilon_to_position = {x=294, y=681, z=13, stackpos=1}
local hellgorak_to_position = {x=255, y=467, z=13, stackpos=1}
local madareth_to_position = {x=287, y=365, z=13, stackpos=1}
local zugurosh_to_position = {x=314, y=474, z=13, stackpos=1}
local brothers_to_position = {x=408, y=413, z=13, stackpos=1}

local time_to_pass = 180
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local 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."

if creaturename == 'Ushuriel' then

teleport = doCreateTeleport(tpID, ushuriel_to_position, ushuriel_in_position)

doSendMagicEffect(ushuriel_in_position, CONST_ME_ENERGYHIT)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))

elseif creaturename == 'Annihilon' then

teleport = doCreateTeleport(tpID, annihilon_to_position, annihilon_in_position)

doSendMagicEffect(annihilon_in_position, CONST_ME_ENERGYHIT)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInAnnihilonWard, (1000*time_to_pass))

elseif creaturename == 'Madareth' then

teleport = doCreateTeleport(tpID, madareth_to_position, madareth_in_position)

doSendMagicEffect(madareth_in_position, CONST_ME_ENERGYHIT)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInMadarethWard, (1000*time_to_pass))

elseif creaturename == 'Hellgorak' then

teleport = doCreateTeleport(tpID, hellgorak_to_position, hellgorak_in_position)

doSendMagicEffect(hellgorak_in_position, CONST_ME_ENERGYHIT)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInHellgorakWard, (1000*time_to_pass))

elseif creaturename == 'Zugurosh' then

teleport = doCreateTeleport(tpID, zugurosh_to_position, zugurosh_in_position)

doSendMagicEffect(zugurosh_in_position, CONST_ME_ENERGYHIT)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInZuguroshWard, (1000*time_to_pass))

elseif creaturename == 'Latrivan' then

teleport = doCreateTeleport(tpID, brothers_to_position, brothers_in_position)

doSendMagicEffect(brothers_in_position, CONST_ME_ENERGYHIT)

doCreatureSay(cid, message, TALKTYPE_ORANGE_1)

addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))


end
end

function removeTeleportInUshurielWard()
if getThingfromPos({x=246, y=351, z=12, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=246, y=351, z=12, stackpos=1}).uid,1)
doSendMagicEffect({x=246, y=351, z=12, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInAnnihilonWard()
if getThingfromPos({x=637, y=472, z=13, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=637, y=472, z=13, stackpos=1}).uid,1)
doSendMagicEffect({x=637, y=472, z=13, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInHellgorakWard()
if getThingfromPos({x=335, y=581, z=10, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=335, y=581, z=10, stackpos=1}).uid,1)
doSendMagicEffect({x=335, y=581, z=10, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInMadarethWard()
if getThingfromPos({x=340, y=460, z=13, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=340, y=460, z=13, stackpos=1}).uid,1)
doSendMagicEffect({x=340, y=460, z=13, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInZuguroshWard()
if getThingfromPos({x=390, y=525, z=13, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=390, y=525, z=13, stackpos=1}).uid,1)
doSendMagicEffect({x=390, y=525, z=13, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end

function removeTeleportInBrothersWard()
if getThingfromPos({x=505, y=345, z=13, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=505, y=345, z=13, stackpos=1}).uid,1)
doSendMagicEffect({x=505, y=345, z=13, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
 
D:\OTS\start\data\actions\scripts\other\doors


PHP:
local function checkStackpos(item, position)
	position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
	local thing = getThingFromPos(position)

	position.stackpos = STACKPOS_TOP_FIELD
	local field = getThingFromPos(position)

	return (item.uid == thing.uid or thing.itemid < 100 or field.itemid == 0)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getItemLevelDoor(item.itemid) > 0) then
		if(item.actionid == 189) then
			if(isPremium(cid) ~= TRUE) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return TRUE
			end

			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
			return TRUE
		end

		local gender = item.actionid - 186
		if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender) == TRUE) then
			local playerGender = getPlayerSex(cid)
			if(playerGender ~= gender) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return TRUE
			end

			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
			return TRUE
		end

		local skull = item.actionid - 180
		if(skull >= 0 and skull < 6) then
			local playerSkull = getCreatureSkullType(cid)
			if(playerSkull ~= skull) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return TRUE
			end

			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
			return TRUE
		end

		local group = item.actionid - 150
		if(group >= 0 and group < 30) then
			local playerGroup = getPlayerGroupId(cid)
			if(playerGroup < group) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return TRUE
			end

			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
			return TRUE
		end

		local vocation = item.actionid - 100
		if(vocation >= 0 and vocation < 50) then
			local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
			if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
				return TRUE
			end

			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
			return TRUE
		end

		if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
		end

		return TRUE
	end

	if(isInArray(specialDoors, item.itemid) == TRUE) then
		if(item.actionid == 100 or (item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) > 0)) then
			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
		end

		return TRUE
	end

	if(isInArray(keys, item.itemid) == TRUE) then
		if(itemEx.actionid > 0) then
			if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then
				doTransformItem(itemEx.uid, doors[itemEx.itemid])
				return TRUE
			end

			doPlayerSendCancel(cid, "The key does not match.")
			return TRUE
		end

		return FALSE
	end

	if(isInArray(horizontalOpenDoors, item.itemid) == TRUE and checkStackpos(item, fromPosition)) then
		local newPosition = toPosition
		newPosition.y = newPosition.y + 1
		local doorPosition = fromPosition
		doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
		local doorCreature = getThingfromPos(doorPosition)
		if(doorCreature.itemid ~= 0) then
			if(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
				doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
			else
				doTeleportThing(doorCreature.uid, newPosition, TRUE)
				if(isInArray(closingDoors, item.itemid) ~= TRUE) then
					doTransformItem(item.uid, item.itemid - 1)
				end
			end

			return TRUE
		end

		doTransformItem(item.uid, item.itemid - 1)
		return TRUE
	end

	if(isInArray(verticalOpenDoors, item.itemid) == TRUE and checkStackpos(item, fromPosition)) then
		local newPosition = toPosition
		newPosition.x = newPosition.x + 1
		local doorPosition = fromPosition
		doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
		local doorCreature = getThingfromPos(doorPosition)
		if(doorCreature.itemid ~= 0) then
			if(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
				doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
			else
				doTeleportThing(doorCreature.uid, newPosition, TRUE)
				if(isInArray(closingDoors, item.itemid) ~= TRUE) then
					doTransformItem(item.uid, item.itemid - 1)
				end
			end

			return TRUE
		end

		doTransformItem(item.uid, item.itemid - 1)
		return TRUE
	end

	if(doors[item.itemid] ~= nil and checkStackpos(item, fromPosition)) then
		if(item.actionid == 0) then
			doTransformItem(item.uid, doors[item.itemid])
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
		end

		return TRUE
	end

	return TRUE
end


I don't have any other files with doors.
Help!
 
Those are the statues to save the seals.
Put each statue an AID depending the name.
Example:
LUA:
local AIDs = {
[6666] = {5555,"The Dark Path"},
[6667] = {5556,"The Crystal Caves"},

I will put before the TP (to finish the seal), to the statue in RME, AID 6666.
Before 2nd seal ends I will put statue in RME with 6667, and so on.
I think they're in order
 
I had that script but I didn't like it so you should use this..
Code:
function onStepIn(cid, item, position, fromPosition)
	if getPlayerStorageValue(cid,4072) <= 0 then
		setPlayerStorageValue(cid, 4072, 1)
	end
return true
end
You need to use this script for every teleport so 5 times and you must change the storage value each teleport sets. Set a unique ID on the teleport BEFORE the boss so once they go through it they get set that storage value that the script tells it to, don't forget to set the Action ID on the door (which is the same as the storage Value but it must change for each one, 4072, 4073 etc) and then add this to movements.xml
Code:
<movevent type="StepIn" uniqueid="xxx" event="script" value="tpstorage.lua"/>
and ofcourse you need to add this 5 times changing the unique ID's to match the teleports.

Don't forget to REP me if I helped :D and if you don't understand write back on the thread.
 
I had that script but I didn't like it so you should use this..
Code:
function onStepIn(cid, item, position, fromPosition)
	if getPlayerStorageValue(cid,4072) <= 0 then
		setPlayerStorageValue(cid, 4072, 1)
	end
return true
end
You need to use this script for every teleport so 5 times and you must change the storage value each teleport sets. Set a unique ID on the teleport BEFORE the boss so once they go through it they get set that storage value that the script tells it to, don't forget to set the Action ID on the door (which is the same as the storage Value but it must change for each one, 4072, 4073 etc) and then add this to movements.xml
Code:
<movevent type="StepIn" uniqueid="xxx" event="script" value="tpstorage.lua"/>
and ofcourse you need to add this 5 times changing the unique ID's to match the teleports.

Don't forget to REP me if I helped :D and if you don't understand write back on the thread.

That wont work? You can only do one seal and go through all doors, since it always set storage 4072 to 1? :/
You can use mine just make it a StepIn function and it shud work fine, I just aint got time to do it now.
 
It does work I use it on my server, you just have to use the script 5 times and set a different storage value for each script and door :p

Oh ofc, but you must change the storage, lol.
Mine is easier though, only 1 file, but its ok
 
Back
Top