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

nathan0726

New Member
Joined
Feb 5, 2018
Messages
19
Reaction score
0
Trying to add the ability to have certain access quests skipped. I used the search function and read through all the threads and tried the suggestions but I still can't seem to get it to work properly.
I've got the correct storage ID's i believe for the Yalahar access quest. I tried adding player:setStorageValue(12249, 2) to my login.lua under --Events, but it doesn't appear to be working. Any suggestions?
 
I know exactly what I want to accomplish, I'm just not familiar with Lua at all. I explained clearly what I wanted in the very first post. There have been other threads about this exact topic with much less convoluted solutions, but seem to be dated.
 
I know exactly what I want to accomplish, I'm just not familiar with Lua at all. I explained clearly what I wanted in the very first post. There have been other threads about this exact topic with much less convoluted solutions, but seem to be dated.
convoluted solutions? Lol... ok
 
Login.lua where I'm trying to add player:setStorageValue(12249, 2):

<?xml version="1.0" encoding="UTF-8"?> <quests> <quest name="The Explorer Soc - Pastebin.com


If you search "In service of Yalahar" I'm trying to add the value for Mission 9 Mission State 2
This is the quests.xml where the storageid values reside:

local events = { 'ElementalSpheresOverlords', 'BigfootBurdenVersperoth - Pastebin.com
Try to set previous storages from the quest to their respective end values also. Like 12240,5; 12241,6; 12242,8; etc.
 
Go check the script that block the access.

Mission 2 of In Service of Yalahar shows as completed in my log, but Palimuth still access "Are you done with your work?" and won't respond to "yes". Tried going through the quest manually but none of the gate guards respond to "report"
 
Mission 2 of In Service of Yalahar shows as completed in my log, but Palimuth still access "Are you done with your work?" and won't respond to "yes". Tried going through the quest manually but none of the gate guards respond to "report"
give us the script of those npcs
 
Here's Palimuth's script:

local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new( - Pastebin.com

Here is the first gate guard, Tony:

Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)            npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)        npcHandler:onCreatureDisappear(cid)            end
function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)        end
function onThink()        npcHandler:onThink()        end

local function creatureSayCallback(cid, type, msg)
    if not npcHandler:isFocused(cid) then
        return false
    end

    local player = Player(cid)
    if msgcontains(msg, "report") then
        if player:getStorageValue(Storage.InServiceofYalahar.Questline) == 7 or player:getStorageValue(Storage.InServiceofYalahar.Questline) == 13 then
            npcHandler:say("Uhm, report, eh? <slowly gives a clumsy description of recent problems>. ", cid)
            player:setStorageValue(Storage.InServiceofYalahar.Questline, math.max(1, player:getStorageValue(Storage.InServiceofYalahar.Questline) +1))
            player:setStorageValue(Storage.InServiceofYalahar.Mission02, math.max(1, player:getStorageValue(Storage.InServiceofYalahar.Mission02) +1)) -- StorageValue for Questlog "Mission 02: Watching the Watchmen"
            npcHandler.topic[cid] = 0
        end
    elseif msgcontains(msg, "pass") then
        npcHandler:say("You can {pass} either to the {Arena Quarter} or {Foreigner Quarter}. Which one will it be?", cid)
        npcHandler.topic[cid] = 1
    elseif(msgcontains(msg, "arena")) then
        if npcHandler.topic[cid] == 1 then
            player:teleportTo(Position(32695, 31254, 7))
            player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
            npcHandler.topic[cid] = 0
        end
    elseif(msgcontains(msg, "foreigner")) then
        if npcHandler.topic[cid] == 1 then
            player:teleportTo(Position(32695, 31259, 7))
            player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
            npcHandler.topic[cid] = 0
        end
    end
    return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
If you want all the missions up to the final battle completed, you have to set storage 12240 to 50, not 5.
 
Solution
Back
Top