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

Solved Kill the boss but does not appear to teleport

xitos

New Member
Joined
Oct 14, 2008
Messages
213
Reaction score
1
I'm having problem in the teleport hota

the teleport only opens when I kill the monster Ashmunrah

kill the other when nothing happens

i use the mod of inquisition

MOD:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Helmet"

version="1.0" author="Tommy" contact="[email protected]" enabled="yes">

        <event type="login" name="helmetRegister" event="script"><![CDATA[
        function onLogin(cid)
    registerCreatureEvent(cid, "Helmet")
        return true
end]]></event>

    <event type="kill" name="Helmet" event="script"><![CDATA[
local config = {

    message = "Go into the teleporter in 3 minutes, else it will disappear.",

    timeToRemove = 180, -- seconds

    teleportId = 1387,

    bosses = { -- Monster Name, Teleport To Position, Teleport Position

        ["Omruc"] = { { x=33179, y=33017, z=14 }, { x=33201, y=32999, z=14, stackpos=1 } },

        ["Thalas"] = { { x=33350, y=32829, z=14 }, { x=33397, y=32841, z=14, stackpos=1 } },

        ["Dipthrah"] = { { x=33127, y=32593, z=15 }, { x=33096, y=32588, z=15, stackpos=1 } },

        ["Mahrdis"] = { { x=33175, y=32936, z=15 }, { x=33189, y=32953, z=15, stackpos=1 } },

        ["Vashresamun"] = { { x=33146, y=32667, z=15 }, { x=33123, y=32655, z=15, stackpos=1 } },

        ["Morguthis"] = { { x=33166, y=32694, z=14 }, { x=33166, y=32694, z=14, stackpos=1 } },
		
		["Rahemos"] = { { x=33052, y=32778, z=14 }, { x=33076, y=32779, z=14, stackpos=1 } },
		
		["Ashmunrah"] = { { x=33198, y=32886, z=11 }, { x=33179, y=32881, z=11, stackpos=1 } }

    }

}



local function removal(position)

    if getThingfromPos(position).itemid == config.teleportId then

        doRemoveItem(getThingfromPos(position).uid)

    end

    return TRUE

end



function onKill(cid, target, lastHit)
if lastHit == true then

    local position = getCreaturePosition(target)

    for name, pos in pairs(config.bosses) do

        if name == getCreatureName(target) then

            teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])

            doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)

            addEvent(removal, config.timeToRemove * 1000, pos[2])
            doSendMagicEffect(pos[2], 10)

        end

    end
end

    return TRUE

end]]></event>

         <action fromuid="14000" touid="14011" event="script"><![CDATA[
       if item.uid == 14000 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found robe of the underworld.")

               doPlayerAddItem(cid,8890,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

       elseif item.uid == 14001 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a  Spellbook of Dark Mysteries.")

               doPlayerAddItem(cid,8918,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

       elseif item.uid == 14002 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Fireborn Giant Armor.")

               doPlayerAddItem(cid,8881,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

        end

       elseif item.uid == 14003 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Master Archer's Armor.")

               doPlayerAddItem(cid,8888,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

      elseif item.uid == 14004 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Royal Crossbow.")

               doPlayerAddItem(cid,8851,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

    elseif item.uid == 14005 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Executioner.")

               doPlayerAddItem(cid,7435,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

    elseif item.uid == 14006 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a The Stomper.")

               doPlayerAddItem(cid,8929,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

    elseif item.uid == 14007 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Runed Sword.")

               doPlayerAddItem(cid,7417,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

    elseif item.uid == 14008 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Warsinger Bow.")

               doPlayerAddItem(cid,8854,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

    elseif item.uid == 14009 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a spellbook of Lost Souls.")

               doPlayerAddItem(cid,8903,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

    elseif item.uid == 14010 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Mystical Armor.")

               doPlayerAddItem(cid,2508,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

    elseif item.uid == 14011 then

        queststatus = getPlayerStorageValue(cid,50301)

           if queststatus == -1 then

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Rainbow Shield.")

               doPlayerAddItem(cid,8905,1)

               setPlayerStorageValue(cid,50301,1)

                                addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)

           else

               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")

           end

    end

       return TRUE]]></action>
</mod>

whats problem ??

thanks !! :peace:

EDIT:

Haha problem solved

the problem was because the letters :p
 
Last edited:
Back
Top