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

Turning off the quest

Dorianek

Member
Joined
Nov 29, 2018
Messages
247
Reaction score
10
Location
Poland
how to deactivate the quest?

because in lib quest I do not have anything about this quest?


C++:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target:isItem() then
        return false
    end
    if player:getStorageValue(Storage.FerumbrasAscension.BoneFlute) >= 1 then
        return false
    end
    if not isInRange(target:getPosition(), Position(33477, 32775, 11), Position(33493, 32781, 11)) then
        return false
    end
    if target:getName():lower() == 'snake' or target:getName():lower() == 'lion' or target:getName():lower() == 'bear' or target:getName():lower() == 'seagull' or target:getName():lower() == 'pig'  then
        local rand = math.random(100)
        if rand <= 5 then
            player:say('Finally this one reveal your spirit animal.', TALKTYPE_MONSTER_SAY)
            player:setStorageValue(Storage.FerumbrasAscension.BoneFlute, 1)
            item:remove()
            return true
        elseif rand > 5 and rand <= 50 then
            player:say('This one has shaken its head. This probably means it\'s not your spirit animal.', TALKTYPE_MONSTER_SAY)
            return true
        elseif rand > 50 then
            player:say('This one\'s still unwilling reveal whether it\'s your spirit animal.', TALKTYPE_MONSTER_SAY)
            return true
        end
    end
    return true
end
 
Solution
What do you mean by deactivate? Making it work without doing anything prior or delete it?
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target:isItem() then
        return false
    end
    if not isInRange(target:getPosition(), Position(33477, 32775, 11), Position(33493, 32781, 11)) then
        return false
    end
    if target:getName():lower() == 'snake' or target:getName():lower() == 'lion' or target:getName():lower() == 'bear' or target:getName():lower() == 'seagull' or target:getName():lower() == 'pig'  then
        local rand = math.random(100)
        if rand <= 5 then
            player:say('Finally this one reveal your spirit animal.', TALKTYPE_MONSTER_SAY)...
What do you mean by deactivate? Making it work without doing anything prior or delete it?
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target:isItem() then
        return false
    end
    if not isInRange(target:getPosition(), Position(33477, 32775, 11), Position(33493, 32781, 11)) then
        return false
    end
    if target:getName():lower() == 'snake' or target:getName():lower() == 'lion' or target:getName():lower() == 'bear' or target:getName():lower() == 'seagull' or target:getName():lower() == 'pig'  then
        local rand = math.random(100)
        if rand <= 5 then
            player:say('Finally this one reveal your spirit animal.', TALKTYPE_MONSTER_SAY)
            player:setStorageValue(Storage.FerumbrasAscension.BoneFlute, 1)
            item:remove()
            return true
        elseif rand > 5 and rand <= 50 then
            player:say('This one has shaken its head. This probably means it\'s not your spirit animal.', TALKTYPE_MONSTER_SAY)
            return true
        elseif rand > 50 then
            player:say('This one\'s still unwilling reveal whether it\'s your spirit animal.', TALKTYPE_MONSTER_SAY)
            return true
        end
    end
    return true
end
This should make it work regardless or previous progress.

However, if you want it to be done you just add this storage to login.lua or smth

Lua:
if player:getStorageValue(Storage.FerumbrasAscension.BoneFlute) < 1 then
    player:setStorageValue(Storage.FerumbrasAscension.BoneFlute, 1)
end
 
Last edited:
Solution
Back
Top