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

quest youtube

anormalius

New Member
Joined
Dec 27, 2012
Messages
44
Reaction score
1
hello
I found this quest in youtube and like but don´t found here script and script created for my don´t work ajja
need help
sorry for my english
 
So.. you click on each crystal.. it spawns stuff.. and after clicking each crystal you can loot the chest?

In my explanation on how storages work, I made a script that does this, but without spawning monsters.

https://otland.net/threads/closed-i...e-0-3-7-0-3-6-0-4.234306/page-12#post-2327447

Scroll until you see this..
If you want to get a player to use 4 pillars before opening a chest and getting that backpack from before, you could do it like this.
 
I think you can use the storage on each pillar for example:

Code:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)

    local c = Creature[cid]
    local storagePillarA = 1200
    local storagePillarB = 1201
    local storagePillarC = 1202
    local storagePillarD = 1203
    local allPillarsDone = 1204
    local checkAllPillar = c:getStorageValue(1204)
    local storageChestID = 1300
    local summonPosition = {
    {x = toPosition.x-1, y = toPosition.y, z = toPosition.z},
    {x = toPosition.x+1, y = toPosition.y, z = toPosition.z},
    {x = toPosition.x, y = toPosition.y-1, z = toPosition.z},
    {x = toPosition.x, y = toPosition.y+1, z = toPosition.z}
}  
    if item.uid == storagePillarA then
        if c:getStorageValue(storagePillarA) ~= 1 then
            c:setStorageValue(storagePillarA, 1)
            c:setStorageValue(allPillarsDone, checkAllPillar+1)
            doSummonCreature("Demon", summonPosition[1])
            doSummonCreature("Orshabaal", summonPosition[2])
            doSummonCreature("Morgaroth", summonPosition[3])
            doSummonCreature("Apocalypse", summonPosition[4])
        else
            c:sendTextMessage(MESSAGE_INFO_DESCR, "You already broke this pillar.")
        end
    elseif item.uid == storagePillarB then
        if c:getStorageValue(storagePillarB) ~= 1 then
            c:setStorageValue(storagePillarB, 1)
            c:setStorageValue(allPillarsDone, checkAllPillar+1)
            doSummonCreature("Demon", summonPosition[1])
            doSummonCreature("Orshabaal", summonPosition[2])
            doSummonCreature("Morgaroth", summonPosition[3])
            doSummonCreature("Apocalypse", summonPosition[4])
        else
            c:sendTextMessage(MESSAGE_INFO_DESCR, "You already broke this pillar.")
        end
    elseif item.uid == storagePillarC then
        if c:getStorageValue(storagePillarC) ~= 1 then
            c:setStorageValue(storagePillarC, 1)
            c:setStorageValue(allPillarsDone, checkAllPillar+1)
            doSummonCreature("Demon", summonPosition[1])
            doSummonCreature("Orshabaal", summonPosition[2])
            doSummonCreature("Morgaroth", summonPosition[3])
            doSummonCreature("Apocalypse", summonPosition[4])
        else
            c:sendTextMessage(MESSAGE_INFO_DESCR, "You already broke this pillar.")
        end
    elseif item.uid == storagePillarD then
        if c:getStorageValue(storagePillarD) ~= 1 then
            c:setStorageValue(storagePillarD, 1)
            c:setStorageValue(allPillarsDone, checkAllPillar+1)
            doSummonCreature("Demon", summonPosition[1])
            doSummonCreature("Orshabaal", summonPosition[2])
            doSummonCreature("Morgaroth", summonPosition[3])
            doSummonCreature("Apocalypse", summonPosition[4])
        else
            c:sendTextMessage(MESSAGE_INFO_DESCR, "You already broke this pillar.")
        end
    elseif item.uid == storageChestID then
        if c:getStorageValue(checkAllPillar) == 4 and storageChestID ~= 1 then
            c:addItem(rewardItem1, 1)
            c:addItem(rewardItem2, 1)
            c:setStorageValue(storageChestID, 1)
        else
            c:sendTextMessage(MESSAGE_INFO_DESCR, "It is empty.")
        end
    end  
    return true
end

Hope this can be usefull. Any error can tell me I made it on notepad and memory.
 
Back
Top