• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua [The Explorer Society Quest] NPC Angus error

lopez65

Member
Joined
May 10, 2012
Messages
294
Solutions
1
Reaction score
16
Location
Barcelona
hi guys

I'm testing the NPC of the quest.

1.- Melchior.lua 1st, djinn quest, does not answer when you talk., umar (djinn blue) not answered. solved

To fix just about melchior.lua I've changed this:

Code:
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)



2.- Angus, The Explorer Society Quest, answer but gives me this error:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    if player:getStorageValue(90) == 27 then
        player:setStorageValue(90, 28)
        player:addItem(4858, 1)  <-- this is a funeral urn (It contains the ashes of a lizard high priest.), where is the key?
        player:sendTextMessage(MESSAGE_INFO_DESCR, "You have found a funeral urn.")
    else
        player:sendTextMessage(MESSAGE_INFO_DESCR, "You have already received the funeral urn.")
    end
    return true
end

Code:
Lua Script Error: [Npc interface]
data/npc/scripts/Angus.lua:onCreatureSay
data/npc/scripts/Angus.lua:303: attempt to compare number with boolean
stack traceback:
        [C]: in function '__lt'
        data/npc/scripts/Angus.lua:303: in function 'callback'
        data/npc/lib/npcsystem/npchandler.lua:410: in function 'onCreatureSay'
        data/npc/scripts/Angus.lua:7: in function <data/npc/scripts/Angus.lua:7>


Lua Script Error: [Npc interface]
data/npc/scripts/Angus.lua:onCreatureSay
data/npc/scripts/Angus.lua:303: attempt to compare number with boolean
stack traceback:
        [C]: in function '__lt'
        data/npc/scripts/Angus.lua:303: in function 'callback'
        data/npc/lib/npcsystem/npchandler.lua:410: in function 'onCreatureSay'
        data/npc/scripts/Angus.lua:7: in function <data/npc/scripts/Angus.lua:7>

hanks and regards
 
Last edited:
I only know if you post the script or a link to the script. If you don't know which script is for which action, look for actionid/uniqueid/item if it's about an item and look for that in the xml file.
 
I only know if you post the script or a link to the script. If you don't know which script is for which action, look for actionid/uniqueid/item if it's about an item and look for that in the xml file.

This would be the script, I've taken a 0.4 TFS that had 8.60
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local key = doCreateItemEx(2088, 1)
    if item.uid == 64118 then
        if getPlayerStorageValue(cid,64118) == -1 then
            doPlayerSendTextMessage(cid,25,"You have found a key.")
         doSetItemActionId(key, 3610)
         doPlayerAddItemEx(cid, key, 1)
            setPlayerStorageValue(cid,64118, 1)
        else
            doPlayerSendTextMessage(cid,25,"The hole is empty.")
        end
    end
    return TRUE
end
-------------------------------------------------------------------------------------------------------------------------------
And this is the 1st mission angus Kazordoon sends you to look for a pick ax, you have to talk to Uzgod, which in turn asks you a snap family, to get it you have to find three keys in three different chest , are the chest, but no keys.
In short, we must do three 1st spoiler scripts, one for each key, but with that one I do the rest are guiding me the first thing you do, you want to clear this.
I hope you have understood.
greetings and thanks.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    if player:getStorageValue(90) == 27 then
        player:setStorageValue(90, 28)
        player:addItem(4858, 1)
        player:sendTextMessage(MESSAGE_INFO_DESCR, "You have found a funeral urn.")
    else
        player:sendTextMessage(MESSAGE_INFO_DESCR, "You have already received the funeral urn.")
    end
    return true
end
 
Back
Top