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

[Desert quest]+[Script]+[Map] - 100%

Tovar

Brak V
Joined
Jul 26, 2008
Messages
347
Reaction score
8
Hello guys, well I don't know if this was here in Otland, but I decided to re-edit the desert quest more "OLD", I put somethings inside, and add the scripts to this thread, you just need put in your map and put the scripts in ur data folder =P..

Go to Explain!:

First: You can found the map in the next cordenates -

x:185 y:172 z:7

Second: You need put the stairs and the teleport how the image says. I dont put it because I dont know the cordenates of your map :O..

Third: YOu Need change the cordenates in the script, I add comments to guide :thumbup:

Fourth: The players can make the quest when they want, but they cannot open the Chest reward xD.

Fifth: The chest have his own action id to give the reward, and the Switch or lever too.

Images:
(dead screenshots removed)

Scripts:

Add in your Actions.xml

XML:
<action actionid="61111" script="Questmias/desertquest/desert.lua"/>

Make new file Called desert.lua inside the scripts folder and put it inside.

Lua:
 local config = {
    -- level needed to make the quest
    level = 20,

    -- if players should be able to do the quest unlimited amount of times (not conflicting quest rewards)
    redo = {
        status = false, -- true = unlimited, false = once
        storageValue = 61111 -- only if status is false this will be used
    },
 
    -- vocation requirement, positions and item configuration
    {
        vocations = {1, 5},
        itemId = 2175,
        playerPos = {x=32677, y=32089, z=8}, -- Initial position in the Stone tile
        newPos = {x=32671, y=32069, z=8}, -- Position of the reward room.
        itemPos = {x=32679, y=32089, z=8}  -- Position of Spellbook "Sorcerer".
    },
 
    {
        vocations = {2, 6},
        itemId = 2674,
        playerPos = {x=32669, y=32089, z=8}, -- Initial position in the Stone tile
        newPos = {x=32672, y=32069, z=8}, -- Position of the reward room.
        itemPos = {x=32667, y=32089, z=8} -- Position of Red apple "Druid".
    },
 
    {
        vocations = {3, 7},
        itemId = 2455,
        playerPos = {x=32673, y=32085, z=8}, -- Initial position in the Stone tile
        newPos = {x=32671, y=32070, z=8}, -- Position of the reward room.
        itemPos = {x=32673, y=32084, z=8} -- Position of Crossbow "Paladin".
    },
 
    {
        vocations = {4, 8},
        itemId = 2376,
        playerPos = {x=32673, y=32093, z=8}, -- Initial position in the Stone tile
        newPos = {x=32672, y=32070, z=8}, --Position of the reward room.
        itemPos = {x=32673, y=32094, z=8} --Position of Sword "Knight".
    }
}

function onUse(cid)
    local players = {}
    for _, v in ipairs(config) do
 
        v.playerPos.stackpos = 253
        local player = getThingfromPos(v.playerPos).uid
 
        if isPlayer(player) == FALSE then
            return doPlayerSendCancel(cid, "There are not enough players.")
        elseif getPlayerLevel(player) < config.level then
            players.level = true
        elseif isInArray(v.vocations, getPlayerVocation(player)) == FALSE then
            players.vocation = true
        elseif config.redo.status and getPlayerStorageValue(cid, config.redo.storageValue) ~= TRUE then
            players.done = true
        else
            v.itemPos.stackpos = 1
            local item = getThingfromPos(v.itemPos)
 
            if item.itemid ~= v.itemId then
                players.item = true
            else
                table.insert(players, player)
            end
        end
    end

    if players.level then
        doPlayerSendCancel(cid, "All players need to be level " .. config.level .. " or above.")
    elseif players.vocation then
        doPlayerSendCancel(cid, "All players must stand on the correct tiles.")
    elseif players.done then
        doPlayerSendCancel(cid, "A player in your team has already done this quest.")
    elseif players.item then
        doPlayerSendCancel(cid, "All items must be on the correct positions.")
    else
        for k, player in ipairs(players) do
            doSendMagicEffect(getCreaturePosition(player), CONST_ME_POFF)
            doTeleportThing(player, config[k].newPos)
            doSendMagicEffect(getCreaturePosition(player), CONST_ME_TELEPORT)
        end
    end
 
    return TRUE
end


REMEMBER EDIT THE CORDENATES HERE.

Lua:
{
        vocations = {1, 5},
        itemId = 2175,
        playerPos = {x=32677, y=32089, z=8}, -- Initial position in the Stone tile
        newPos = {x=32671, y=32069, z=8}, -- Position of the reward room.
        itemPos = {x=32679, y=32089, z=8}  -- Position of Spellbook "Sorcerer".
    },
 
    {
        vocations = {2, 6},
        itemId = 2674,
        playerPos = {x=32669, y=32089, z=8}, -- Initial position in the Stone tile
        newPos = {x=32672, y=32069, z=8}, -- Position of the reward room.
        itemPos = {x=32667, y=32089, z=8} -- Position of Red apple "Druid".
    },
 
    {
        vocations = {3, 7},
        itemId = 2455,
        playerPos = {x=32673, y=32085, z=8}, -- Initial position in the Stone tile
        newPos = {x=32671, y=32070, z=8}, -- Position of the reward room.
        itemPos = {x=32673, y=32084, z=8} -- Position of Crossbow "Paladin".
    },
 
    {
        vocations = {4, 8},
        itemId = 2376,
        playerPos = {x=32673, y=32093, z=8}, -- Initial position in the Stone tile
        newPos = {x=32672, y=32070, z=8}, --Position of the reward room.
        itemPos = {x=32673, y=32094, z=8} --Position of Sword "Knight".
    }

Credits to Colandus and Cykotitan for the script.

Rep++ If you download or used this plx hehe xP
 

Attachments

Last edited by a moderator:
Back
Top