• 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 problem step by step!

Kaywin

Lord of War WoW/Tibia 2D
Joined
Oct 24, 2008
Messages
541
Reaction score
6
Location
SwedeN
I have explain as good I can, help me guys I can almost start our OT we just have to fix Inq and Yalahari Quest, I got some errors in the console can be the inqchests? and the bosses don't spawn when I going into the teleport wrong x, y , z ? help me change it in that case! Thanks!

2rz2hcy.png


and by the way, missing actions.xml for teleports script? and inquisitionPortals?



data/actions/scripts/inq/inqchests

Code:
   function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.uid == 1300 then
                queststatus = getPlayerStorageValue(cid,6075)
                if queststatus == -1 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found robe of the underworld.")
                        doPlayerAddItem(cid,8890,1)
                        setPlayerStorageValue(cid,6075,1)
                else
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
                end
        elseif item.uid == 1301 then
                queststatus = getPlayerStorageValue(cid,6075)
                if queststatus == -1 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a  Spellbook of Dark Mysteries.")
                        doPlayerAddItem(cid,8918,1)
                        setPlayerStorageValue(cid,6075,1)
                else
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
                end
        elseif item.uid == 1302 then
                queststatus = getPlayerStorageValue(cid,6075)
                if queststatus == -1 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Fireborn Giant Armor.")
                        doPlayerAddItem(cid,8881,1)
                        setPlayerStorageValue(cid,6075,1)
                else
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
                end
        elseif item.uid == 1304 then
                queststatus = getPlayerStorageValue(cid,6075)
                if queststatus == -1 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Master Archer's Armor.")
                        doPlayerAddItem(cid,8888,1)
                        setPlayerStorageValue(cid,6075,1)
                else
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
                end
        elseif item.uid == 1303 then
                queststatus = getPlayerStorageValue(cid,6075)
                if queststatus == -1 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Royal Crossbow.")
                        doPlayerAddItem(cid,8851,1)
                        setPlayerStorageValue(cid,6075,1)
                else
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
                end
        elseif item.uid == 1305 then
                queststatus = getPlayerStorageValue(cid,6075)
                if queststatus == -1 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Hellforged Axe.")
                        doPlayerAddItem(cid,8924,1)
                        setPlayerStorageValue(cid,6075,1)
                else
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
                end
        elseif item.uid == 1306 then
                queststatus = getPlayerStorageValue(cid,6075)
                if queststatus == -1 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Obsidian Truncheon.")
                        doPlayerAddItem(cid,8928,1)
                        setPlayerStorageValue(cid,6075,1)
                else
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
                end
        elseif item.uid == 1307 then
                queststatus = getPlayerStorageValue(cid,6075)
                if queststatus == -1 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Emerald Sword.")
                        doPlayerAddItem(cid,8930,1)
                        setPlayerStorageValue(cid,6075,1)
                else
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
                end
        elseif item.uid == 1308 then
                queststatus = getPlayerStorageValue(cid,6075)
                if queststatus == -1 then
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Warsinger Bow.")
                        doPlayerAddItem(cid,8854,1)
                        setPlayerStorageValue(cid,6075,1)
                else
                        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
                end
        end
        return 1
end

data/actions/scripts/inq/inquisitionPortals

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=1115, y=1214, z=12, stackpos=2}
        local annihilon_in_pos = {x=1187, y=1198, z=12, stackpos=2}
        local hellgorak_in_pos = {x=1192, y=1240, z=12, stackpos=2}
        local madareth_in_pos = {x=1112, y=1240, z=12, stackpos=2}
        local zugurosh_in_pos = {x=1149, y=1213, z=12, stackpos=2}
        local brothers_in_pos = {x=1147, y=1244, z=12, stackpos=1}

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

        local ushuriel_to_pos = {x=1173, y=1138, z=12, stackpos=1}
        local annihilon_to_pos = {x=1245, y=1297, z=12, stackpos=1}  
        local hellgorak_to_pos = {x=1064, y=1308, z=13, stackpos=1}
        local madareth_to_pos = {x=1045, y=1205, z=13, stackpos=1}
        local zugurosh_to_pos = {x=1128, y=1151, z=12, stackpos=1}
        local brothers_to_pos = {x=1152, y=1195, z=13, 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)

                        doPlayerSendTextMessage(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)

                        doPlayerSendTextMessage(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)

                        doPlayerSendTextMessage(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)

                        doPlayerSendTextMessage(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)

                        doPlayerSendTextMessage(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)

                        doPlayerSendTextMessage(cid, message, TALKTYPE_ORANGE_1)

                        addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))

       
                end
end

function removeTeleportInUshurielWard()
        if getThingfromPos({x=1115, y=1214, z=12, stackpos=2}).itemid == 1387 then
        doRemoveItem(getThingfromPos({x=1115, y=1214, z=12, stackpos=2}).uid,1)
        doSendMagicEffect({x=1115, y=1214, z=12, stackpos=2}, CONST_ME_POFF)
        return TRUE
        end
end

function removeTeleportInAnnihilonWard()
        if getThingfromPos({x=1187, y=1198, z=12, stackpos=2}).itemid == 1387 then
        doRemoveItem(getThingfromPos({x=1187, y=1198, z=12, stackpos=2}).uid,1)
        doSendMagicEffect({x=1187, y=1198, z=12, stackpos=2}, CONST_ME_POFF)
        return TRUE
        end
end

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

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

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

function removeTeleportInBrothersWard()
        if getThingfromPos({x=1147, y=1244, z=12, stackpos=1}).itemid == 1387 then
        doRemoveItem(getThingfromPos({x=1147, y=1244, z=12, stackpos=1}).uid,1)
        doSendMagicEffect({x=1147, y=1244, z=12, stackpos=1}, CONST_ME_POFF)
        return TRUE
        end
end

data/actions/scripts/teleports

Code:
  function onUse(cid, item, fromPosition, itemEx, toPosition)





-- tablica z pozycjami lawy


local Lawa = {


{x=921,y=1259,z=15},

{x=921,y=1258,z=15},

{x=921,y=1257,z=15},

{x=921,y=1256,z=15},

{x=921,y=1255,z=15},

{x=921,y=1254,z=15},

{x=920,y=1254,z=15},

{x=920,y=1255,z=15},

{x=920,y=1256,z=15},

{x=920,y=1257,z=15},

{x=920,y=1258,z=15},

{x=920,y=1259,z=15},


}






if (itemEx.uid == 12344) then -- unique kamienia

if (getGlobalStorageValue(5544) == -1) then

local Teleport = doCreateTeleport(1387, {x=0,y=0,z=0}, {x=921,y=1256,z=15}) -- tworzenie teleportu

doSetItemActionId(Teleport, 12345)


for i = 1, #Lawa do -- petla tworzenia lawy

 doCreateItem(5815, 1, Lawa[i]) -- funkcja tworzenia lawy
 doSendMagicEffect(Lawa[i], CONST_ME_POFF)


end
end

else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It\'s not time yet.")
end
end

data/actions/actions.xml

Code:
 <!-- InquisitonQuest -->
	<action uniqueid="1300" event="script" value="inq/inqchests.lua"/>
	<action uniqueid="1301" event="script" value="inq/inqchests.lua"/>
	<action uniqueid="1302" event="script" value="inq/inqchests.lua"/>
	<action uniqueid="1303" event="script" value="inq/inqchests.lua"/>
	<action uniqueid="1304" event="script" value="inq/inqchests.lua"/>
	<action uniqueid="1305" event="script" value="inq/inqchests.lua"/>
	<action uniqueid="1306" event="script" value="inq/inqchests.lua"/>
	<action uniqueid="1307" event="script" value="inq/inqchests.lua"/>
	<action uniqueid="1308" event="script" value="inq/inqchests.lua"/>
	<action uniqueid="12344" event="script" value="inq/teleports.lua"/>
 
Back
Top