Ir para conteúdo
  • Cadastre-se

(Resolvido)[AJUDA] [Error - Npc interface]


Ir para solução Resolvido por Xagah,

Posts Recomendados

Boa noite pessoal,

 

Relutei para não abrir este tópico mas não aguentei... estou o dia procurando uma solução para este erro...

Abaixo o output do executável do meu servidor:

---------------------------------------------------------------------------------------------------------------------------------

 

[22/01/2016 18:25:42] The Forgotten Server - Edited By Cyko V8, version 0.3.6 - Edited By Cyko V8 (Crying Damson - Edited By Cyko V8)
[22/01/2016 18:25:42] Compiled with GNU C++ version 3.4.5 (mingw special) at Apr  6 2013, 11:07:44.

[22/01/2016 18:25:42] A server developed by Elf, slawkens, Talaturen, KaczooH, Lithium, Kiper, Kornholijo.
[22/01/2016 18:25:42] Visit our forum for updates, support and resources: http://otland.net.

[22/01/2016 18:25:42] >> Loading config (config.lua)
[22/01/2016 18:25:42] > Using plaintext encryption
[22/01/2016 18:25:42] >> Checking software version... failed checking - malformed file.
[22/01/2016 18:25:43] >> Fetching blacklist
[22/01/2016 18:25:43] >> Loading RSA key
[22/01/2016 18:25:43] >> Starting SQL connection
[22/01/2016 18:25:43] >> Running Database Manager
[22/01/2016 18:25:44] > No tables were optimized.
[22/01/2016 18:25:44] >> Loading items
[22/01/2016 18:25:44] >> Loading groups
[22/01/2016 18:25:44] >> Loading vocations
[22/01/2016 18:25:44] >> Loading script systems
[22/01/2016 18:25:45] >> Loading chat channels
[22/01/2016 18:25:45] >> Loading outfits
[22/01/2016 18:25:45] >> Loading experience stages
[22/01/2016 18:25:45] >> Loading monsters
[22/01/2016 18:25:45] >> Loading mods...
[22/01/2016 18:25:45] > Loading buypremium_command.xml... done.
[22/01/2016 18:25:45] > Loading changender_command.xml... done.
[22/01/2016 18:25:45] > Loading custommonsters.xml... done.
[22/01/2016 18:25:45] > Loading customspells.xml... done.
[22/01/2016 18:25:45] > Loading firstitems.xml... done.
[22/01/2016 18:25:45] > Loading highscorebook.xml... done.
[22/01/2016 18:25:45] > Loading Military Ranks.xml... done.
[22/01/2016 18:25:45] > 7 mods were loaded.
[22/01/2016 18:25:45] >> Loading map and spawns...
[22/01/2016 18:25:49] > Map size: 33407x33023.
[22/01/2016 18:25:49] > Map descriptions: 
[22/01/2016 18:25:49] "Saved with Remere's Map Editor 2.1"
[22/01/2016 18:25:49] "No map description available."
[22/01/2016 18:26:13] > Map loading time: 28.011 seconds.
[22/01/2016 18:26:14] [Warning] NpcSystem:
[22/01/2016 18:26:14] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 18:26:14] [Error - Npc interface] 
[22/01/2016 18:26:14] data/npc/scripts/default.lua
[22/01/2016 18:26:14] Description: 
[22/01/2016 18:26:14] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 18:26:14] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/default.lua

[22/01/2016 18:26:15] > Data parsing time: 2.028 seconds.
[22/01/2016 18:26:21] > Houses synchronization time: 5.508 seconds.
[22/01/2016 18:26:27] > Content unserialization time: 5.792 seconds.
[22/01/2016 18:26:27] >> Checking world type... PvP
[22/01/2016 18:26:27] >> Initializing game state modules and registering services...
[22/01/2016 18:26:27] > Global address: 127.0.0.1
[22/01/2016 18:26:27] > Local ports: 7171    7172    
[22/01/2016 18:26:27] >> All modules were loaded, server is starting up...
[22/01/2016 18:26:27] >> Forgotten 8.60 server Online!

 

--------------------------------------------------------------------------------------------------------------------------------

 

Estes são os arquivos que imagino que precisem dar uma olhada:

 

data\npc\lib\npcsystem\modules.lua

Spoiler

-- Advanced NPC System (Created by Jiddo),
-- Modified by Talaturen.
-- Modified by Elf.

if(Modules == nil) then
    -- Constants used to separate buying from selling.
    SHOPMODULE_SELL_ITEM = 1
    SHOPMODULE_BUY_ITEM = 2
    SHOPMODULE_BUY_ITEM_CONTAINER = 3

    -- Constants used for shop mode. Notice: addBuyableItemContainer is working on all modes
    SHOPMODULE_MODE_TALK = 1 -- Old system used before Tibia 8.2: sell/buy item name
    SHOPMODULE_MODE_TRADE = 2 -- Trade window system introduced in Tibia 8.2
    SHOPMODULE_MODE_BOTH = 3 -- Both working at one time

    -- Used in shop mode
    SHOPMODULE_MODE = SHOPMODULE_MODE_BOTH

    -- Constants used for outfit giving mode
    OUTFITMODULE_FUNCTION_OLD = { doPlayerAddOutfit, canPlayerWearOutfit } -- lookType usage
    OUTFITMODULE_FUNCTION_NEW = { doPlayerAddOutfitId, canPlayerWearOutfitId } -- OutfitId usage

    -- Used in outfit module
    OUTFITMODULE_FUNCTION = OUTFITMODULE_FUNCTION_NEW
    if(OUTFITMODULE_FUNCTION[1] == nil or OUTFITMODULE_FUNCTION[2] == nil) then
        OUTFITMODULE_FUNCTION = OUTFITMODULE_FUNCTION_OLD
    end

    Modules = {
        parseableModules = {}
    }

    StdModule = {}

    -- These callback function must be called with parameters.npcHandler = npcHandler in the parameters table or they will not work correctly.
    -- Notice: The members of StdModule have not yet been tested. If you find any bugs, please report them to me.
    -- Usage:
        -- keywordHandler:addKeyword({'offer'}, StdModule.say, {npcHandler = npcHandler, text = 'I sell many powerful melee weapons.'})
    function StdModule.say(cid, message, keywords, parameters, node)
        local npcHandler = parameters.npcHandler
        if(npcHandler == nil) then
            error('StdModule.say called without any npcHandler instance.')
        end

        local onlyFocus = (parameters.onlyFocus == nil or parameters.onlyFocus == true)
        if(not npcHandler:isFocused(cid) and onlyFocus) then
            return false
        end

        local parseInfo = {[TAG_PLAYERNAME] = getCreatureName(cid)}
        npcHandler:say(npcHandler:parseMessage(parameters.text or parameters.message, parseInfo), cid, parameters.publicize and true)
        if(parameters.reset == true) then
            npcHandler:resetNpc()
        elseif(parameters.moveup ~= nil and type(parameters.moveup) == 'number') then
            npcHandler.keywordHandler:moveUp(parameters.moveup)
        end

        return true
    end

    --Usage:
        -- local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, text = 'I can promote you for 20000 brozne coins. Do you want me to promote you?'})
        --         node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, promotion = 1, level = 20}, text = 'Congratulations! You are now promoted.')
        --         node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = 'Alright then, come back when you are ready.'}, reset = true)
    function StdModule.promotePlayer(cid, message, keywords, parameters, node)
        local npcHandler = parameters.npcHandler
        if(npcHandler == nil) then
            error('StdModule.promotePlayer called without any npcHandler instance.')
        end

        if(not npcHandler:isFocused(cid)) then
            return false
        end

        if(isPlayerPremiumCallback(cid) or not getBooleanFromString(getConfigValue('premiumForPromotion')) or not(parameters.premium)) then
            if(getPlayerPromotionLevel(cid) >= parameters.promotion) then
                npcHandler:say('You are already promoted!', cid)
            elseif(getPlayerLevel(cid) < parameters.level) then
                npcHandler:say('I am sorry, but I can only promote you once you have reached level ' .. parameters.level .. '.', cid)
            elseif(not doPlayerRemoveMoney(cid, parameters.cost)) then
                npcHandler:say('You do not have enough money!', cid)
            else
                setPlayerPromotionLevel(cid, parameters.promotion)
                npcHandler:say(parameters.text, cid)
            end
        else
            npcHandler:say("You need a premium account in order to get promoted.", cid)
        end

        npcHandler:resetNpc()
        return true
    end

    function StdModule.learnSpell(cid, message, keywords, parameters, node)
        local npcHandler = parameters.npcHandler
        if(npcHandler == nil) then
            error('StdModule.learnSpell called without any npcHandler instance.')
        end

        if(not npcHandler:isFocused(cid)) then
            return false
        end

        if(isPlayerPremiumCallback(cid) or not(parameters.premium)) then
            if(getPlayerLearnedInstantSpell(cid, parameters.spellName)) then
                npcHandler:say('You already know this spell.', cid)
            elseif(getPlayerLevel(cid) < parameters.level) then
                npcHandler:say('You need to obtain a level of ' .. parameters.level .. ' or higher to be able to learn ' .. parameters.spellName .. '.', cid)
            elseif(not parameters.vocation(cid)) then
                npcHandler:say('This spell is not for your vocation', cid)
            elseif(not doPlayerRemoveMoney(cid, parameters.price)) then
                npcHandler:say('You do not have enough money, this spell costs ' .. parameters.price .. ' gold coins.', cid)
            else
                npcHandler:say('You have learned ' .. parameters.spellName .. '.', cid)
                playerLearnInstantSpell(cid, parameters.spellName)
            end
        else
            npcHandler:say('You need a premium account in order to buy ' .. parameters.spellName .. '.', cid)
        end

        npcHandler:resetNpc()
        return true
    end

    function StdModule.bless(cid, message, keywords, parameters, node)
        local npcHandler = parameters.npcHandler
        if(npcHandler == nil) then
            error('StdModule.bless called without any npcHandler instance.')
        end

        if(not npcHandler:isFocused(cid)) then
            return false
        end

        if(isPlayerPremiumCallback(cid) or not getBooleanFromString(getConfigValue('blessingsOnlyPremium')) or not parameters.premium) then
            local price = parameters.baseCost
            if(getPlayerLevel(cid) > parameters.startLevel) then
                price = (price + ((math.min(parameters.endLevel, getPlayerLevel(cid)) - parameters.startLevel) * parameters.levelCost))
            end

            if(getPlayerBlessing(cid, parameters.number)) then
                npcHandler:say("Gods have already blessed you with this blessing!", cid)
            elseif(not doPlayerRemoveMoney(cid, price)) then
                npcHandler:say("You don't have enough money for blessing.", cid)
            else
                npcHandler:say("You have been blessed by one of the five gods!", cid)
                doPlayerAddBlessing(cid, parameters.number)
            end
        else
            npcHandler:say('You need a premium account in order to be blessed.', cid)
        end

        npcHandler:resetNpc()
        return true
    end

    function StdModule.travel(cid, message, keywords, parameters, node)
        local npcHandler = parameters.npcHandler
        if(npcHandler == nil) then
            error('StdModule.travel called without any npcHandler instance.')
        end

        if(not npcHandler:isFocused(cid)) then
            return false
        end

        local storage, pzLocked = parameters.storageValue or (EMPTY_STORAGE + 1), parameters.allowLocked or false
        if(parameters.premium and not isPlayerPremiumCallback(cid)) then
            npcHandler:say('I can only allow premium players to travel with me.', cid)
        elseif(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then
            npcHandler:say('You must reach level ' .. parameters.level .. ' before I can let you go there.', cid)
        elseif(parameters.storageId ~= nil and getPlayerStorageValue(cid, parameters.storageId) < storage) then
            npcHandler:say(parameters.storageInfo or 'You may not travel there!', cid)
        elseif(not pzLocked and isPlayerPzLocked(cid)) then
            npcHandler:say('Get out of there with this blood!', cid)
        elseif(not doPlayerRemoveMoney(cid, parameters.cost)) then
            npcHandler:say('You do not have enough money.', cid)
        else
            npcHandler:say('It was a pleasure doing business with you.', cid)
            npcHandler:releaseFocus(cid)

            doTeleportThing(cid, parameters.destination, false)
            doSendMagicEffect(parameters.destination, CONST_ME_TELEPORT)
        end

        npcHandler:resetNpc()
        return true
    end

    FocusModule = {
        npcHandler = nil
    }

    -- Creates a new instance of FocusModule without an associated NpcHandler.
    function FocusModule:new()
        local obj = {}
        setmetatable(obj, self)
        self.__index = self
        return obj
    end

    -- Inits the module and associates handler to it.
    function FocusModule:init(handler)
        self.npcHandler = handler
        for i, word in pairs(FOCUS_GREETWORDS) do
            local obj = {}
            table.insert(obj, word)
            obj.callback = FOCUS_GREETWORDS.callback or FocusModule.messageMatcher
            handler.keywordHandler:addKeyword(obj, FocusModule.onGreet, {module = self})
        end

        for i, word in pairs(FOCUS_FAREWELLWORDS) do
            local obj = {}
            table.insert(obj, word)
            obj.callback = FOCUS_FAREWELLWORDS.callback or FocusModule.messageMatcher
            handler.keywordHandler:addKeyword(obj, FocusModule.onFarewell, {module = self})
        end
    end

    -- Greeting callback function.
    function FocusModule.onGreet(cid, message, keywords, parameters)
        parameters.module.npcHandler:onGreet(cid)
        return true
    end

    -- UnGreeting callback function.
    function FocusModule.onFarewell(cid, message, keywords, parameters)
        if(not parameters.module.npcHandler:isFocused(cid)) then
            return false
        end

        parameters.module.npcHandler:onFarewell(cid)
        return true
    end

    -- Custom message matching callback function for greeting messages.
    function FocusModule.messageMatcher(keywords, message)
        local spectators = getSpectators(getCreaturePosition(getNpcId()), 7, 7)
        for i, word in pairs(keywords) do
            if(type(word) == 'string') then
                if(string.find(message, word) and not string.find(message, '[%w+]' .. word) and not string.find(message, word .. '[%w+]')) then
                    if(string.find(message, getCreatureName(getNpcId()))) then
                        return true
                    end

                    for i, uid in ipairs(spectators) do
                        if(string.find(message, getCreatureName(uid))) then
                            return false
                        end
                    end

                    return true
                end
            end
        end

        return false
    end

    KeywordModule = {
        npcHandler = nil
    }
    -- Add it to the parseable module list.
    Modules.parseableModules['module_keywords'] = KeywordModule

    function KeywordModule:new()
        local obj = {}
        setmetatable(obj, self)
        self.__index = self
        return obj
    end

    function KeywordModule:init(handler)
        self.npcHandler = handler
    end

    -- Parses all known parameters.
    function KeywordModule:parseParameters()
        local ret = NpcSystem.getParameter('keywords')
        if(ret ~= nil) then
            self:parseKeywords(ret)
        end
    end

    function KeywordModule:parseKeywords(data)
        local n = 1
        for keys in string.gmatch(data, '[^;]+') do
            local i = 1

            local keywords = {}
            for temp in string.gmatch(keys, '[^,]+') do
                table.insert(keywords, temp)
                i = i + 1
            end

            if(i ~= 1) then
                local reply = NpcSystem.getParameter('keyword_reply' .. n)
                if(reply ~= nil) then
                    self:addKeyword(keywords, reply)
                else
                    print('[Warning] NpcSystem:', 'Parameter \'' .. 'keyword_reply' .. n .. '\' missing. Skipping...')
                    print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter '" .. "keyword_reply" .. n .. "' missing. Skipping...")
                end
            else
                print('[Warning] NpcSystem:', 'No keywords found for keyword set #' .. n .. '. Skipping...')
            end

            n = n + 1
        end
    end

    function KeywordModule:addKeyword(keywords, reply)
        self.npcHandler.keywordHandler:addKeyword(keywords, StdModule.say, {npcHandler = self.npcHandler, onlyFocus = true, text = reply, reset = true})
    end

    TravelModule = {
        npcHandler = nil,
        destinations = nil,
        yesNode = nil,
        noNode = nil,
    }
    -- Add it to the parseable module list.
    Modules.parseableModules['module_travel'] = TravelModule

    function TravelModule:new()
        local obj = {}
        setmetatable(obj, self)
        self.__index = self
        return obj
    end

    function TravelModule:init(handler)
        self.npcHandler = handler
        self.yesNode = KeywordNode:new(SHOP_YESWORD, TravelModule.onConfirm, {module = self})
        self.noNode = KeywordNode:new(SHOP_NOWORD, TravelModule.onDecline, {module = self})

        self.destinations = {}
    end

    -- Parses all known parameters.
    function TravelModule:parseParameters()
        local ret = NpcSystem.getParameter('travel_destinations')
        if(ret ~= nil) then
            self:parseDestinations(ret)
            for _, word in ipairs({'destination', 'list', 'where', 'travel'}) do
                self.npcHandler.keywordHandler:addKeyword({word}, TravelModule.listDestinations, {module = self})
            end
        end
    end

    function TravelModule:parseDestinations(data)
        for destination in string.gmatch(data, '[^;]+') do
            local i, name, pos, cost, premium, level, storage = 1, nil, {x = nil, y = nil, z = nil}, nil, false
            for tmp in string.gmatch(destination, '[^,]+') do
                if(i == 1) then
                    name = tmp
                elseif(i == 2) then
                    pos.x = tonumber(tmp)
                elseif(i == 3) then
                    pos.y = tonumber(tmp)
                elseif(i == 4) then
                    pos.z = tonumber(tmp)
                elseif(i == 5) then
                    cost = tonumber(tmp)
                elseif(i == 6) then
                    premium = getBooleanFromString(tmp)
                else
                    print('[Warning] NpcSystem:', 'Unknown parameter found in travel destination parameter.', tmp, destination)
                end

                i = i + 1
            end

            if(name ~= nil and pos.x ~= nil and pos.y ~= nil and pos.z ~= nil and cost ~= nil) then
                self:addDestination(name, pos, cost, premium)
            else
                print('[Warning] NpcSystem:', 'Parameter(s) missing for travel destination:', name, pos, cost, premium)
                print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for travel destination:", name, pos, cost, premium)
            end
        end
    end

    function TravelModule:addDestination(name, position, price, premium)
        table.insert(self.destinations, name)
        local parameters = {
            cost = price,
            destination = position,
            premium = premium,
            module = self
        }

        local keywords, bringwords = {}, {}
        table.insert(keywords, name)

        table.insert(bringwords, 'bring me to ' .. name)
        self.npcHandler.keywordHandler:addKeyword(bringwords, TravelModule.bring, parameters)

        local node = self.npcHandler.keywordHandler:addKeyword(keywords, TravelModule.travel, parameters)
        node:addChildKeywordNode(self.yesNode)
        node:addChildKeywordNode(self.noNode)
    end

    function TravelModule.travel(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        module.npcHandler:say('Do you want to travel to ' .. keywords[1] .. ' for ' .. parameters.cost .. ' gold coins?', cid)
        return true
    end

    function TravelModule.onConfirm(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        local parent = node:getParent():getParameters()
        if(isPlayerPremiumCallback(cid) or not parent.premium) then
            if(not isPlayerPzLocked(cid)) then
                if(doPlayerRemoveMoney(cid, parent.cost)) then
                    module.npcHandler:say('It was a pleasure doing business with you.', cid)
                    module.npcHandler:releaseFocus(cid)

                    doTeleportThing(cid, parent.destination, true)
                    doSendMagicEffect(parent.destination, CONST_ME_TELEPORT)
                else
                    module.npcHandler:say('You do not have enough money.', cid)
                end
            else
                module.npcHandler:say('Get out of there with this blood!', cid)
            end
        else
            module.npcHandler:say('I can only allow premium players to travel there.', cid)
        end

        module.npcHandler:resetNpc()
        return true
    end

    -- onDecline keyword callback function. Generally called when the player sais 'no' after wanting to buy an item.
    function TravelModule.onDecline(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        module.npcHandler:say(module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_DECLINE), {[TAG_PLAYERNAME] = getCreatureName(cid)}), cid)
        module.npcHandler:resetNpc()
        return true
    end

    function TravelModule.bring(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        if((isPlayerPremiumCallback(cid) or not parameters.premium) and not isPlayerPzLocked(cid) and doPlayerRemoveMoney(cid, parameters.cost)) then
            module.npcHandler:say('Sure!', cid)
            module.npcHandler:releaseFocus(cid)

            doTeleportThing(cid, parameters.destination, false)
            doSendMagicEffect(parameters.destination, CONST_ME_TELEPORT)
        end

        module.npcHandler:releaseFocus(cid)
        return true
    end

    function TravelModule.listDestinations(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        local msg = nil
        for _, destination in ipairs(module.destinations) do
            if(msg ~= nil) then
                msg = msg .. ", "
            else
                msg = ""
            end

            msg = msg .. "{" .. destination .. "}"
        end

        module.npcHandler:say(msg .. ".", cid)
        module.npcHandler:resetNpc()
        return true
    end

    OutfitModule = {
        npcHandler = nil,
        outfits = nil,
        yesNode = nil,
        noNode = nil,
    }
    -- Add it to the parseable module list.
    Modules.parseableModules['module_outfit'] = OutfitModule

    function OutfitModule:new()
        if(OUTFITMODULE_FUNCTION[1] == nil or OUTFITMODULE_FUNCTION[2] == nil) then
            return nil
        end

        local obj = {}
        setmetatable(obj, self)
        self.__index = self
        return obj
    end

    function OutfitModule:init(handler)
        self.npcHandler = handler
        self.yesNode = KeywordNode:new(SHOP_YESWORD, OutfitModule.onConfirm, {module = self})
        self.noNode = KeywordNode:new(SHOP_NOWORD, OutfitModule.onDecline, {module = self})

        self.outfits = {}
    end

    -- Parses all known parameters.
    function OutfitModule:parseParameters()
        local ret = NpcSystem.getParameter('outfits')
        if(ret ~= nil) then
            self:parseKeywords(ret)
            for _, word in ipairs({'outfits', 'addons'}) do
                self.npcHandler.keywordHandler:addKeyword({word}, OutfitModule.listOutfits, {module = self})
            end
        end
    end

    function OutfitModule:parseKeywords(data)
        local n = 1
        for outfit in string.gmatch(data, '[^;]+') do
            local i, keywords = 1, {}
            for tmp in string.gmatch(outfit, '[^,]+') do
                table.insert(keywords, tmp)
                i = i + 1
            end

            if(i > 0) then
                local ret = NpcSystem.getParameter('outfit' .. n)
                if(ret ~= nil) then
                    self:parseList(keywords, ret)
                else
                    print('[Warning] NpcSystem:', 'Missing \'outfit' .. n .. '\' parameter, skipping...')
                end
            else
                print('[Warning] NpcSystem:', 'No keywords found for outfit set #' .. n .. ', skipping...')
            end

            n = n + 1
        end
    end

    function OutfitModule:parseList(keywords, data)
        local outfit, items = nil, {}
        for list in string.gmatch(data, '[^;]+') do
            local a, b, c, d, e = nil, nil, nil, nil, 1
            for tmp in string.gmatch(list, '[^,]+') do
                if(e == 1) then
                    a = tmp
                elseif(e == 2) then
                    b = tmp
                elseif(e == 3) then
                    c = tmp
                elseif(e == 4) then
                    d = tmp
                else
                    print('[Warning] NpcSystem:', 'Unknown parameter found in outfit list while parsing ' .. (outfit == nil and 'outfit' or 'item') .. '.', tmp, list)
                end

                e = e + 1
            end

            if(outfit == nil) then
                outfit = {tonumber(a), tonumber(b), getBooleanFromString(c), d}
            elseif(a ~= nil) then
                local tmp = tonumber(a)
                if((tmp ~= nil or tostring(a) == "money") and b ~= nil and c ~= nil) then
                    a = tmp or 20000
                    tmp = tonumber(d)
                    if(tmp == nil) then
                        tmp = -1
                    end

                    items[a] = {b, tmp, c}
                else
                    print('[Warning] NpcSystem:', 'Missing parameter(s) for outfit items.', b, c, d)
                end
            else
                print('[Warning] NpcSystem:', 'Missing base parameter for outfit items.', a)
            end
        end

        if(type(outfit) == 'table') then
            local tmp = true
            for i = 1, 2 do
                if(outfit == nil) then
                    tmp = false
                    break
                end
            end

            if(tmp and table.maxn(items) > 0) then
                self:addOutfit(keywords, outfit, items)
            else
                print('[Warning] NpcSystem:', 'Invalid outfit, addon or empty items pool.', data)
            end
        end
    end

    function OutfitModule:addOutfit(keywords, outfit, items)
        table.insert(self.outfits, keywords[1])
        local parameters = {
            outfit = outfit[1],
            addon = outfit[2],
            premium = outfit[3],
            gender = nil,
            items = items,
            module = self
        }

        if(outfit[4] ~= nil) then
            local tmp = string.lower(tostring(outfit[5]))
            if(tmp == 'male' or tmp == '1') then
                parameters.gender = 1
            elseif(tmp == 'female' or tmp == '0') then
                parameters.gender = 0
            end
        end

        for i, name in pairs(keywords) do
            local words = {}
            table.insert(words, name)

            local node = self.npcHandler.keywordHandler:addKeyword(words, OutfitModule.obtain, parameters)
            node:addChildKeywordNode(self.yesNode)
            node:addChildKeywordNode(self.noNode)
        end
    end

    function OutfitModule.obtain(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        local i, items, size = 0, nil, table.maxn(parameters.items)
        for k, v in pairs(parameters.items) do
            if(v[1] ~= "storageset") then
                i = i + 1
                if(items ~= nil) then
                    if(i == size) then
                        items = items .. " and "
                    else
                        items = items .. ", "
                    end
                else
                    items = ""
                end

                if(tonumber(v[1]) ~= nil and tonumber(v[1]) > 1) then
                    items = items .. v[1] .. " "
                end

                items = items .. v[3]
            end
        end
    
        module.npcHandler:say('Do you want ' .. keywords[1] .. ' ' .. (addon == 0 and "outfit" or "addon") .. ' for ' .. items .. '?', cid)
        return true

    end

    function OutfitModule.onConfirm(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        local parent = node:getParent():getParameters()
        if(isPlayerPremiumCallback(cid) or not parent.premium) then
            if(not OUTFITMODULE_FUNCTION[2](cid, parent.outfit, parent.addon)) then
                if(parent.addon == 0 or OUTFITMODULE_FUNCTION[2](cid, parent.outfit)) then
                    if(parent.gender == nil or parent.gender == getPlayerSex(cid)) then
                        local found = true
                        for k, v in pairs(parent.items) do
                            local tmp = tonumber(v[1])
                            if(tmp == nil) then
                                if(v[1] == "storagecheck") then
                                    if(getCreatureStorage(cid, k) < v[2]) then
                                        found = false
                                    end
                                elseif(v[1] == "outfitid") then
                                    if(not canPlayerWearOutfitId(cid, k, v[2])) then
                                        found = false
                                    end
                                elseif(v[1] == "outfit") then
                                    if(not canPlayerWearOutfit(cid, k, v[2])) then
                                        found = false
                                    end
                                else
                                    found = false
                                end
                            elseif(k == 20000) then
                                if(getPlayerMoney(cid) < tmp) then
                                    found = false
                                end
                            elseif(getPlayerItemCount(cid, k, v[2]) < tmp) then
                                found = false
                            end

                            if(not found) then
                                break
                            end
                        end

                        if(found) then
                            for k, v in pairs(parent.items) do
                                if(tonumber(v[1]) ~= nil) then
                                    if(k == 20000) then
                                        doPlayerRemoveMoney(cid, v[1])
                                    else
                                        doPlayerRemoveItem(cid, k, v[1], v[2])
                                    end
                                elseif(v[1] == "storageset") then
                                    doCreatureSetStorage(cid, k, v[2])
                                end
                            end

                            module.npcHandler:say('It was a pleasure to dress you.', cid)
                            OUTFITMODULE_FUNCTION[1](cid, parent.outfit, parent.addon)
                            doPlayerSetStorageValue(cid, parent.storageId, storage)
                        else
                            module.npcHandler:say('You don\'t have these items!', cid)
                        end
                    else
                        module.npcHandler:say('Sorry, this ' .. (parent.addon == 0 and 'outfit' or 'addon') .. ' is not for your gender.', cid)
                    end
                else
                    module.npcHandler:say('I will not dress you with addon of outfit you cannot wear!', cid)
                end
            else
                module.npcHandler:say('You alrady have this ' .. (parent.addon == 0 and 'outfit' or 'addon') .. '!', cid)
            end
        else
            module.npcHandler:say('Sorry, I dress only premium players.', cid)
        end

        module.npcHandler:resetNpc()
        return true
    end

    -- onDecline keyword callback function. Generally called when the player sais 'no' after wanting to buy an item.
    function OutfitModule.onDecline(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        module.npcHandler:say(module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_DECLINE), {[TAG_PLAYERNAME] = getCreatureName(cid)}), cid)
        module.npcHandler:resetNpc()
        return true
    end

    function OutfitModule.listOutfits(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        local msg, size = nil, table.maxn(module.outfits)
        if(size > 0) then
            for i, outfit in ipairs(module.outfits) do
                if(msg ~= nil) then
                    if(i == size) then
                        msg = msg .. " and "
                    else
                        msg = msg .. ", "
                    end
                else
                    msg = "I can dress you into "
                end

                msg = msg .. "{" .. outfit .. "}"
            end
        else
            msg = "Sorry, I have nothing to offer right now."
        end

        module.npcHandler:say(msg .. ".", cid)
        module.npcHandler:resetNpc()
        return true
    end

    ShopModule = {
        npcHandler = nil,
        yesNode = nil,
        noNode = nil,
        noText = '',
        maxCount = 100,
        amount = 0
    }

    -- Add it to the parseable module list.
    Modules.parseableModules['module_shop'] = ShopModule

    -- Creates a new instance of ShopModule
    function ShopModule:new()
        local obj = {}
        setmetatable(obj, self)
        self.__index = self
        return obj
    end

    -- Parses all known parameters.
    function ShopModule:parseParameters()
        local ret = NpcSystem.getParameter('shop_buyable')
        if(ret ~= nil) then
            self:parseBuyable(ret)
        end

        local ret = NpcSystem.getParameter('shop_sellable')
        if(ret ~= nil) then
            self:parseSellable(ret)
        end

        local ret = NpcSystem.getParameter('shop_buyable_containers')
        if(ret ~= nil) then
            self:parseBuyableContainers(ret)
        end
    end

    -- Parse a string contaning a set of buyable items.
    function ShopModule:parseBuyable(data)
        for item in string.gmatch(data, '[^;]+') do
            local i, name, itemid, cost, subType, realName = 1, nil, nil, nil, nil, nil
            for temp in string.gmatch(item, '[^,]+') do
                if(i == 1) then
                    name = temp
                elseif(i == 2) then
                    itemid = tonumber(temp)
                elseif(i == 3) then
                    cost = tonumber(temp)
                elseif(i == 4) then
                    subType = tonumber(temp)
                elseif(i == 5) then
                    realName = temp
                else
                    print('[Warning] NpcSystem:', 'Unknown parameter found in buyable items parameter.', temp, item)
                end
                i = i + 1
            end

            if(SHOPMODULE_MODE == SHOPMODULE_MODE_TRADE) then
                if(itemid ~= nil and cost ~= nil) then
                    if((isItemRune(itemid) or isItemFluidContainer(itemid)) and subType == nil) then
                        print('[Warning] NpcSystem:', 'SubType missing for parameter item:', item)
                    else
                        self:addBuyableItem(nil, itemid, cost, subType, realName)
                    end
                else
                    print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', itemid, cost)
                    print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for item:", itemid, cost)
                end
            elseif(name ~= nil and itemid ~= nil and cost ~= nil) then
                if((isItemRune(itemid) or isItemFluidContainer(itemid)) and subType == nil) then
                    print('[Warning] NpcSystem:', 'SubType missing for parameter item:', item)
                else
                    local names = {}
                    table.insert(names, name)
                    self:addBuyableItem(names, itemid, cost, subType, realName)
                end
            else
                print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', name, itemid, cost)
                print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for item:", name, itemid, cost)
            end
        end
    end

    -- Parse a string contaning a set of sellable items.
    function ShopModule:parseSellable(data)
        for item in string.gmatch(data, '[^;]+') do
            local i, name, itemid, cost, realName = 1, nil, nil, nil, nil
            for temp in string.gmatch(item, '[^,]+') do
                if(i == 1) then
                    name = temp
                elseif(i == 2) then
                    itemid = tonumber(temp)
                elseif(i == 3) then
                    cost = tonumber(temp)
                elseif(i == 4) then
                    realName = temp
                else
                    print('[Warning] NpcSystem:', 'Unknown parameter found in sellable items parameter.', temp, item)
                end
                i = i + 1
            end

            if(SHOPMODULE_MODE == SHOPMODULE_MODE_TRADE) then
                if(itemid ~= nil and cost ~= nil) then
                    self:addSellableItem(nil, itemid, cost, realName, subType)
                else
                    print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', itemid, cost)
                    print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for item:", itemid, cost)
                end
            elseif(name ~= nil and itemid ~= nil and cost ~= nil) then
                local names = {}
                table.insert(names, name)
                self:addSellableItem(names, itemid, cost, realName, subType)
            else
                print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', name, itemid, cost)
            end
        end
    end

    -- Parse a string contaning a set of buyable items.
    function ShopModule:parseBuyableContainers(data)
        for item in string.gmatch(data, '[^;]+') do
            local i, name, container, itemid, cost, subType, realName = 1, nil, nil, nil, nil, nil, nil
            for temp in string.gmatch(item, '[^,]+') do
                if(i == 1) then
                    name = temp
                elseif(i == 2) then
                    itemid = tonumber(temp)
                elseif(i == 3) then
                    itemid = tonumber(temp)
                elseif(i == 4) then
                    cost = tonumber(temp)
                elseif(i == 5) then
                    subType = tonumber(temp)
                elseif(i == 6) then
                    realName = temp
                else
                    print('[Warning] NpcSystem:', 'Unknown parameter found in buyable items parameter.', temp, item)
                end
                i = i + 1
            end

            if(name ~= nil and container ~= nil and itemid ~= nil and cost ~= nil) then
                if((isItemRune(itemid) or isItemFluidContainer(itemid)) and subType == nil) then
                    print('[Warning] NpcSystem:', 'SubType missing for parameter item:', item)
                else
                    local names = {}
                    table.insert(names, name)
                    self:addBuyableItemContainer(names, container, itemid, cost, subType, realName)
                end
            else
                print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', name, container, itemid, cost)
                print("[Warning : " .. Npc():getName() .. "] NpcSystem:", "Parameter(s) missing for item:", name, container, itemid, cost)
            end
        end
    end

    -- Initializes the module and associates handler to it.
    function ShopModule:init(handler)
        self.npcHandler = handler
        self.yesNode = KeywordNode:new(SHOP_YESWORD, ShopModule.onConfirm, {module = self})
        self.noNode = KeywordNode:new(SHOP_NOWORD, ShopModule.onDecline, {module = self})

        self.noText = handler:getMessage(MESSAGE_DECLINE)
        if(SHOPMODULE_MODE ~= SHOPMODULE_MODE_TALK) then
            for i, word in pairs(SHOP_TRADEREQUEST) do
                local obj = {}
                table.insert(obj, word)

                obj.callback = SHOP_TRADEREQUEST.callback or ShopModule.messageMatcher
                handler.keywordHandler:addKeyword(obj, ShopModule.requestTrade, {module = self})
            end
        end
    end

    -- Custom message matching callback function for requesting trade messages.
    function ShopModule.messageMatcher(keywords, message)
        for i, word in pairs(keywords) do
            if(type(word) == 'string' and string.find(message, word) and not string.find(message, '[%w+]' .. word) and not string.find(message, word .. '[%w+]')) then
                return true
            end
        end

        return false
    end

    -- Resets the module-specific variables.
    function ShopModule:reset()
        self.amount = 0
    end

    -- Function used to match a number value from a string.
    function ShopModule:getCount(message)
        local ret, b, e = 1, string.find(message, PATTERN_COUNT)
        if(b ~= nil and e ~= nil) then
            ret = tonumber(string.sub(message, b, e))
        end

        return math.max(1, math.min(self.maxCount, ret))
    end

    -- Adds a new buyable item.
    --    names = A table containing one or more strings of alternative names to this item. Used only for old buy/sell system.
    --    itemid = The itemid of the buyable item
    --    cost = The price of one single item
    --    subType - The subType of each rune or fluidcontainer item. Can be left out if it is not a rune/fluidcontainer. Default value is 1.
    --    realName - The real, full name for the item. Will be used as ITEMNAME in MESSAGE_ONBUY and MESSAGE_ONSELL if defined. Default value is nil (getItemNameById will be used)
    function ShopModule:addBuyableItem(names, itemid, cost, subType, realName)
        if(SHOPMODULE_MODE ~= SHOPMODULE_MODE_TALK) then
            local item = {
                id = itemid,
                buy = cost,
                sell = -1,
                subType = subType or 1,
                name = realName or getItemNameById(itemid)
            }

            for i, shopItem in ipairs(self.npcHandler.shopItems) do
                if(shopItem.id == item.id and shopItem.subType == item.subType) then
                    if(item.sell ~= shopItem.sell) then
                        item.sell = shopItem.sell
                    end

                    self.npcHandler.shopItems = item
                    item = nil
                    break
                end
            end

            if(item ~= nil) then
                table.insert(self.npcHandler.shopItems, item)
            end
        end

        if(names ~= nil and SHOPMODULE_MODE ~= SHOPMODULE_MODE_TRADE) then
            local parameters = {
                itemid = itemid,
                cost = cost,
                eventType = SHOPMODULE_BUY_ITEM,
                module = self,
                realName = realName or getItemNameById(itemid),
                subType = subType or 1
            }

            for i, name in pairs(names) do
                local keywords = {}
                table.insert(keywords, 'buy')
                table.insert(keywords, name)

                local node = self.npcHandler.keywordHandler:addKeyword(keywords, ShopModule.tradeItem, parameters)
                node:addChildKeywordNode(self.yesNode)
                node:addChildKeywordNode(self.noNode)
            end
        end
    end

    -- Adds a new buyable container of items.
    --    names = A table containing one or more strings of alternative names to this item.
    --    container = Backpack, bag or any other itemid of container where bought items will be stored
    --    itemid = The itemid of the buyable item
    --    cost = The price of one single item
    --    subType - The subType of each rune or fluidcontainer item. Can be left out if it is not a rune/fluidcontainer. Default value is 1.
    --    realName - The real, full name for the item. Will be used as ITEMNAME in MESSAGE_ONBUY and MESSAGE_ONSELL if defined. Default value is nil (getItemNameById will be used)
    function ShopModule:addBuyableItemContainer(names, container, itemid, cost, subType, realName)
        if(names ~= nil) then
            local parameters = {
                container = container,
                itemid = itemid,
                cost = cost,
                eventType = SHOPMODULE_BUY_ITEM_CONTAINER,
                module = self,
                realName = realName or getItemNameById(itemid),
                subType = subType or 1
            }

            for i, name in pairs(names) do
                local keywords = {}
                table.insert(keywords, 'buy')
                table.insert(keywords, name)

                local node = self.npcHandler.keywordHandler:addKeyword(keywords, ShopModule.tradeItem, parameters)
                node:addChildKeywordNode(self.yesNode)
                node:addChildKeywordNode(self.noNode)
            end
        end
    end

    -- Adds a new sellable item.
    --    names = A table containing one or more strings of alternative names to this item. Used only by old buy/sell system.
    --    itemid = The itemid of the sellable item
    --    cost = The price of one single item
    --    realName - The real, full name for the item. Will be used as ITEMNAME in MESSAGE_ONBUY and MESSAGE_ONSELL if defined. Default value is nil (getItemNameById will be used)
    function ShopModule:addSellableItem(names, itemid, cost, realName, subType)
        local v = getItemInfo(itemid)
        if(SHOPMODULE_MODE ~= SHOPMODULE_MODE_TALK) then
            local item = {
                id = itemid,
                buy = -1,
                sell = cost,
                subType = ((v.charges > 0 and v.stackable) and v.charges or 0),
                name = realName or v.name
            }

            for i, shopItem in ipairs(self.npcHandler.shopItems) do
                if(shopItem.id == item.id and shopItem.subType == item.subType) then
                    if(item.buy ~= shopItem.buy) then
                        item.buy = shopItem.buy
                    end

                    self.npcHandler.shopItems = item
                    item = nil
                    break
                end
            end

            if(item ~= nil) then
                table.insert(self.npcHandler.shopItems, item)
            end
        end

        if(names ~= nil and SHOPMODULE_MODE ~= SHOPMODULE_MODE_TRADE) then
            local parameters = {
                itemid = itemid,
                cost = cost,
                eventType = SHOPMODULE_SELL_ITEM,
                module = self,
                realName = realName or v.name
            }

            for i, name in pairs(names) do
                local keywords = {}
                table.insert(keywords, 'sell')
                table.insert(keywords, name)

                local node = self.npcHandler.keywordHandler:addKeyword(keywords, ShopModule.tradeItem, parameters)
                node:addChildKeywordNode(self.yesNode)
                node:addChildKeywordNode(self.noNode)
            end
        end
    end

    -- onModuleReset callback function. Calls ShopModule:reset()
    function ShopModule:callbackOnModuleReset()
        self:reset()
        return true
    end

    -- Callback onBuy() function. If you wish, you can change certain Npc to use your onBuy().
    function ShopModule:callbackOnBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks)
        local shopItem = nil
        for _, item in ipairs(self.npcHandler.shopItems) do
            if(item.id == itemid and item.subType == subType) then
                shopItem = item
                break
            end
        end

        if(shopItem == nil) then
            error("[ShopModule.onBuy]", "Item not found on shopItems list")
            return false
        end

        if(shopItem.buy == -1) then
            error("[ShopModule.onSell]", "Attempt to purchase an item which only sellable")
            return false
        end

        local backpack, totalCost = 1988, amount * shopItem.buy
        if(inBackpacks) then
            totalCost = totalCost + (math.max(1, math.floor(amount / getContainerCapById(backpack))) * 20)
        end

        local parseInfo = {
            [TAG_PLAYERNAME] = getPlayerName(cid),
            [TAG_ITEMCOUNT] = amount,
            [TAG_TOTALCOST] = totalCost,
            [TAG_ITEMNAME] = shopItem.name
        }

        if(getPlayerMoney(cid) < totalCost) then
            local msg = self.npcHandler:getMessage(MESSAGE_NEEDMONEY)
            doPlayerSendCancel(cid, self.npcHandler:parseMessage(msg, parseInfo))
            return false
        end

        local subType = shopItem.subType or 1
        local a, b = doNpcSellItem(cid, itemid, amount, subType, ignoreCap, inBackpacks, backpack)
        if(a < amount) then
            local msgId = MESSAGE_NEEDMORESPACE
            if(a == 0) then
                msgId = MESSAGE_NEEDSPACE
            end

            local msg = self.npcHandler:getMessage(msgId)
            parseInfo[TAG_ITEMCOUNT] = a

            doPlayerSendCancel(cid, self.npcHandler:parseMessage(msg, parseInfo))
            if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then
                self.npcHandler.talkStart[cid] = os.time()
            else
                self.npcHandler.talkStart = os.time()
            end

            if(a > 0) then
                doPlayerRemoveMoney(cid, ((a * shopItem.buy) + (b * 20)))
                return true
            end

            return false
        end

        local msg = self.npcHandler:getMessage(MESSAGE_BOUGHT)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, self.npcHandler:parseMessage(msg, parseInfo))

        doPlayerRemoveMoney(cid, totalCost)
        if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then
            self.npcHandler.talkStart[cid] = os.time()
        else
            self.npcHandler.talkStart = os.time()
        end

        return true
    end

    -- Callback onSell() function. If you wish, you can change certain Npc to use your onSell().
    function ShopModule:callbackOnSell(cid, itemid, subType, amount, ignoreCap, inBackpacks)
        local shopItem = nil
        for _, item in ipairs(self.npcHandler.shopItems) do
            if(item.id == itemid and item.subType == subType) then
                shopItem = item
                break
            end
        end

        if(shopItem == nil) then
            error("[ShopModule.onBuy]", "Item not found on shopItems list")
            return false
        end

        if(shopItem.sell == -1) then
            error("[ShopModule.onSell]", "Attempt to sell an item which is only buyable")
            return false
        end

        local parseInfo = {
            [TAG_PLAYERNAME] = getPlayerName(cid),
            [TAG_ITEMCOUNT] = amount,
            [TAG_TOTALCOST] = amount * shopItem.sell,
            [TAG_ITEMNAME] = shopItem.name
        }

        if(subType < 1 or getItemInfo(itemid).stackable) then
            subType = -1
        end

        if(doPlayerRemoveItem(cid, itemid, amount, subType)) then
            local msg = self.npcHandler:getMessage(MESSAGE_SOLD)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, self.npcHandler:parseMessage(msg, parseInfo))

            doPlayerAddMoney(cid, amount * shopItem.sell)
            if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then
                self.npcHandler.talkStart[cid] = os.time()
            else
                self.npcHandler.talkStart = os.time()
            end

            return true
        end

        local msg = self.npcHandler:getMessage(MESSAGE_NEEDITEM)
        doPlayerSendCancel(cid, self.npcHandler:parseMessage(msg, parseInfo))
        if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then
            self.npcHandler.talkStart[cid] = os.time()
        else
            self.npcHandler.talkStart = os.time()
        end

        return false
    end

    -- Callback for requesting a trade window with the NPC.
    function ShopModule.requestTrade(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        if(table.maxn(module.npcHandler.shopItems) == 0) then
            local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid) }
            local msg = module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_NOSHOP), parseInfo)

            module.npcHandler:say(msg, cid)
            return true
        end

        local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid) }
        local msg = module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_SENDTRADE), parseInfo)
        openShopWindow(cid, module.npcHandler.shopItems,
            function(cid, itemid, subType, amount, ignoreCap, inBackpacks)
                module.npcHandler:onBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks)
            end,
            function(cid, itemid, subType, amount, ignoreCap, inBackpacks)
                module.npcHandler:onSell(cid, itemid, subType, amount, ignoreCap, inBackpacks)
            end
        )

        module.npcHandler:say(msg, cid)
        return true
    end

    -- onConfirm keyword callback function. Sells/buys the actual item.
    function ShopModule.onConfirm(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        local parentParameters = node:getParent():getParameters()
        local parseInfo = {
            [TAG_PLAYERNAME] = getPlayerName(cid),
            [TAG_ITEMCOUNT] = module.amount,
            [TAG_TOTALCOST] = parentParameters.cost * module.amount,
            [TAG_ITEMNAME] = parentParameters.realName
        }

        if(parentParameters.eventType == SHOPMODULE_SELL_ITEM) then
            local ret = doPlayerSellItem(cid, parentParameters.itemid, module.amount, parentParameters.cost * module.amount)
            if(ret) then
                local msg = module.npcHandler:getMessage(MESSAGE_ONSELL)
                msg = module.npcHandler:parseMessage(msg, parseInfo)
                module.npcHandler:say(msg, cid)
            else
                local msg = module.npcHandler:getMessage(MESSAGE_MISSINGITEM)
                msg = module.npcHandler:parseMessage(msg, parseInfo)
                module.npcHandler:say(msg, cid)
            end
        elseif(parentParameters.eventType == SHOPMODULE_BUY_ITEM) then
            local ret = doPlayerBuyItem(cid, parentParameters.itemid, module.amount, parentParameters.cost * module.amount, parentParameters.subType)
            if(ret) then
                if parentParameters.itemid == ITEM_PARCEL then
                    doPlayerBuyItem(cid, ITEM_LABEL, module.amount, 0, parentParameters.subType)
                end
                local msg = module.npcHandler:getMessage(MESSAGE_ONBUY)
                msg = module.npcHandler:parseMessage(msg, parseInfo)
                module.npcHandler:say(msg, cid)
            else
                local msg = module.npcHandler:getMessage(MESSAGE_MISSINGMONEY)
                msg = module.npcHandler:parseMessage(msg, parseInfo)
                module.npcHandler:say(msg, cid)
            end
        elseif(parentParameters.eventType == SHOPMODULE_BUY_ITEM_CONTAINER) then
            local ret = doPlayerBuyItemContainer(cid, parentParameters.container, parentParameters.itemid, module.amount, parentParameters.cost * module.amount, parentParameters.subType)
            if(ret) then
                local msg = module.npcHandler:getMessage(MESSAGE_ONBUY)
                msg = module.npcHandler:parseMessage(msg, parseInfo)
                module.npcHandler:say(msg, cid)
            else
                local msg = module.npcHandler:getMessage(MESSAGE_MISSINGMONEY)
                msg = module.npcHandler:parseMessage(msg, parseInfo)
                module.npcHandler:say(msg, cid)
            end
        end

        module.npcHandler:resetNpc()
        return true
    end

    -- onDecliune keyword callback function. Generally called when the player sais 'no' after wanting to buy an item.
    function ShopModule.onDecline(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        local parentParameters = node:getParent():getParameters()
        local parseInfo = {
            [TAG_PLAYERNAME] = getPlayerName(cid),
            [TAG_ITEMCOUNT] = module.amount,
            [TAG_TOTALCOST] = parentParameters.cost * module.amount,
            [TAG_ITEMNAME] = parentParameters.realName
        }

        local msg = module.npcHandler:parseMessage(module.noText, parseInfo)
        module.npcHandler:say(msg, cid)
        module.npcHandler:resetNpc()
        return true
    end

    -- tradeItem callback function. Makes the npc say the message defined by MESSAGE_BUY or MESSAGE_SELL
    function ShopModule.tradeItem(cid, message, keywords, parameters, node)
        local module = parameters.module
        if(not module.npcHandler:isFocused(cid)) then
            return false
        end

        local count = module:getCount(message)
        module.amount = count
        local parseInfo = {
            [TAG_PLAYERNAME] = getPlayerName(cid),
            [TAG_ITEMCOUNT] = module.amount,
            [TAG_TOTALCOST] = parameters.cost * module.amount,
            [TAG_ITEMNAME] = parameters.realName
        }

        if(parameters.eventType == SHOPMODULE_SELL_ITEM) then
            local msg = module.npcHandler:getMessage(MESSAGE_SELL)
            msg = module.npcHandler:parseMessage(msg, parseInfo)
            module.npcHandler:say(msg, cid)
        elseif(parameters.eventType == SHOPMODULE_BUY_ITEM) then
            local msg = module.npcHandler:getMessage(MESSAGE_BUY)
            msg = module.npcHandler:parseMessage(msg, parseInfo)
            module.npcHandler:say(msg, cid)
        elseif(parameters.eventType == SHOPMODULE_BUY_ITEM_CONTAINER) then
            local msg = module.npcHandler:getMessage(MESSAGE_BUY)
            msg = module.npcHandler:parseMessage(msg, parseInfo)
            module.npcHandler:say(msg, cid)
        end

        return true
    end
end

 

data\npc\scripts\default.lua

Spoiler

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

npcHandler:addModule(FocusModule:new())

 

Se precisarem de mais alguma informação ou arquivo é só pedir. Sou novato nisso, mas adquiri algum conhecimento durante minhas tentativas agradeço de antemão a ajuda de vocês!

MUITO OBRIGADO!

Editado por Pissolato (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • Solução

Cara, vc usa o 'NotePad C++' para abrir arquivos?

 

Se sim, abra-o, aperte 'CTRL + SHIFT + F' e irá aparecer esta tela. No lugar de Localizar coloque ' keyword_reply1', depois aperte no lugar da seta verde:

5.thumb.png.4fd7bbb4b98546b634be6d1ff209

 

Irá aparecer esta tela. Selecione a pasta do seu 'server':

7.thumb.png.5b6a5ecef65ee3b685c647a557c0

 

Depois aperte no lugar indicado pela seta 'vermelha'.

5.thumb.png.4fd7bbb4b98546b634be6d1ff209

 

Aguarde alguns instantes. O resultado aparecerá desta forma:

9.thumb.png.d7ebe803564c847c8f3fa456a31d

 

Veja nas linhas indicadas em verde se, em algum lugar, está escrito 'keyword_reply1'. Se houver, dê um clique duplo na linha que o 'script' irá abrir. Mude onde houve tal frase para 'keyword_reply' (somente). Salve e teste o server.

 

Se não funcionar volte.

 

Ajudei ou esclareci? Rep+ =D

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites

Opa! Muito obrigado pela explicação meu caro! Vou executar aqui e te falo, porque deu somente 232 resultados uahuahhuahua...

Tentei a opção do link abaixo também:
https://otland.net/threads/npcs.22192/

 

Porém outros muitos erros aconteceram kkkkkkkk já já posto aqui com o resultado! :) Valeu!!

 

EDIT: como uso o Notepad++ eu vi lá a função de substituir em todos os arquivos, realmente esse notepad é uma ferramente simples e fantástica kkkk ja posto o resultado

 

EDIT2: Este foi o output agora... =,(

Spoiler

[22/01/2016 19:30:35] The Forgotten Server - Edited By Cyko V8, version 0.3.6 - Edited By Cyko V8 (Crying Damson - Edited By Cyko V8)
[22/01/2016 19:30:35] Compiled with GNU C++ version 3.4.5 (mingw special) at Apr  6 2013, 11:07:44.
[22/01/2016 19:30:35] A server developed by Elf, slawkens, Talaturen, KaczooH, Lithium, Kiper, Kornholijo.
[22/01/2016 19:30:35] Visit our forum for updates, support and resources: http://otland.net.

[22/01/2016 19:30:35] >> Loading config (config.lua)
[22/01/2016 19:30:35] > Using plaintext encryption
[22/01/2016 19:30:35] >> Checking software version... failed checking - malformed file.
[22/01/2016 19:30:35] >> Fetching blacklist
[22/01/2016 19:30:36] >> Loading RSA key
[22/01/2016 19:30:36] >> Starting SQL connection
[22/01/2016 19:30:36] >> Running Database Manager
[22/01/2016 19:30:36] > No tables were optimized.
[22/01/2016 19:30:36] >> Loading items
[22/01/2016 19:30:37] >> Loading groups
[22/01/2016 19:30:37] >> Loading vocations
[22/01/2016 19:30:37] >> Loading script systems
[22/01/2016 19:30:38] >> Loading chat channels
[22/01/2016 19:30:38] >> Loading outfits
[22/01/2016 19:30:38] >> Loading experience stages
[22/01/2016 19:30:38] >> Loading monsters
[22/01/2016 19:30:39] >> Loading mods...
[22/01/2016 19:30:39] > Loading buypremium_command.xml... done.
[22/01/2016 19:30:39] > Loading changender_command.xml... done.
[22/01/2016 19:30:39] > Loading custommonsters.xml... done.
[22/01/2016 19:30:39] > Loading customspells.xml... done.
[22/01/2016 19:30:39] > Loading firstitems.xml... done.
[22/01/2016 19:30:39] > Loading highscorebook.xml... done.
[22/01/2016 19:30:39] > Loading Military Ranks.xml... done.
[22/01/2016 19:30:39] > 7 mods were loaded.
[22/01/2016 19:30:39] >> Loading map and spawns...
[22/01/2016 19:30:44] > Map size: 33407x33023.
[22/01/2016 19:30:44] > Map descriptions: 
[22/01/2016 19:30:44] "Saved with Remere's Map Editor 2.1"
[22/01/2016 19:30:44] "No map description available."
[22/01/2016 19:31:41] > Map loading time: 62.013 seconds.
[22/01/2016 19:31:42] [Warning] NpcSystem:
[22/01/2016 19:31:42] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:42] [Error - Npc interface] 
[22/01/2016 19:31:42] data/npc/scripts/Edala.lua
[22/01/2016 19:31:42] Description: 
[22/01/2016 19:31:42] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:42] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Edala.lua

[22/01/2016 19:31:42] [Warning] NpcSystem:
[22/01/2016 19:31:42] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:42] [Error - Npc interface] 
[22/01/2016 19:31:42] data/npc/scripts/Haroun.lua
[22/01/2016 19:31:42] Description: 
[22/01/2016 19:31:42] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:42] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Haroun.lua

[22/01/2016 19:31:42] [Warning] NpcSystem:
[22/01/2016 19:31:42] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:42] [Error - Npc interface] 
[22/01/2016 19:31:42] data/npc/scripts/Alexander.lua
[22/01/2016 19:31:42] Description: 
[22/01/2016 19:31:42] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:42] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Alexander.lua

[22/01/2016 19:31:42] [Warning] NpcSystem:
[22/01/2016 19:31:42] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:42] [Error - Npc interface] 
[22/01/2016 19:31:42] data/npc/scripts/Haroun.lua
[22/01/2016 19:31:42] Description: 
[22/01/2016 19:31:42] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:42] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Haroun.lua

[22/01/2016 19:31:42] [Warning] NpcSystem:
[22/01/2016 19:31:42] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:42] [Error - Npc interface] 
[22/01/2016 19:31:42] data/npc/scripts/Xodet.lua
[22/01/2016 19:31:42] Description: 
[22/01/2016 19:31:42] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:42] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Xodet.lua

[22/01/2016 19:31:42] [Warning] NpcSystem:
[22/01/2016 19:31:42] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:42] [Error - Npc interface] 
[22/01/2016 19:31:42] data/npc/scripts/Luna.lua
[22/01/2016 19:31:42] Description: 
[22/01/2016 19:31:42] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:42] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Luna.lua

[22/01/2016 19:31:42] [Warning] NpcSystem:
[22/01/2016 19:31:42] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:42] [Error - Npc interface] 
[22/01/2016 19:31:42] data/npc/scripts/Fiona.lua
[22/01/2016 19:31:42] Description: 
[22/01/2016 19:31:42] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:42] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Fiona.lua

[22/01/2016 19:31:42] [Warning] NpcSystem:
[22/01/2016 19:31:42] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:42] [Error - Npc interface] 
[22/01/2016 19:31:42] data/npc/scripts/Talesia.lua
[22/01/2016 19:31:42] Description: 
[22/01/2016 19:31:42] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:42] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Talesia.lua

[22/01/2016 19:31:43] [Warning] NpcSystem:
[22/01/2016 19:31:43] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:43] [Error - Npc interface] 
[22/01/2016 19:31:43] data/npc/scripts/Vladruc.lua
[22/01/2016 19:31:43] Description: 
[22/01/2016 19:31:43] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Vladruc.lua

[22/01/2016 19:31:43] [Warning] NpcSystem:
[22/01/2016 19:31:43] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:43] [Error - Npc interface] 
[22/01/2016 19:31:43] data/npc/scripts/Irmana.lua
[22/01/2016 19:31:43] Description: 
[22/01/2016 19:31:43] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Irmana.lua

[22/01/2016 19:31:43] [Warning] NpcSystem:
[22/01/2016 19:31:43] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:43] [Error - Npc interface] 
[22/01/2016 19:31:43] data/npc/scripts/miles.lua
[22/01/2016 19:31:43] Description: 
[22/01/2016 19:31:43] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/miles.lua

[22/01/2016 19:31:43] [Warning] NpcSystem:
[22/01/2016 19:31:43] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:43] [Error - Npc interface] 
[22/01/2016 19:31:43] data/npc/scripts/Xodet.lua
[22/01/2016 19:31:43] Description: 
[22/01/2016 19:31:43] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Xodet.lua

[22/01/2016 19:31:43] [Warning] NpcSystem:
[22/01/2016 19:31:43] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:43] [Error - Npc interface] 
[22/01/2016 19:31:43] data/npc/scripts/Zaidal.lua
[22/01/2016 19:31:43] Description: 
[22/01/2016 19:31:43] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Zaidal.lua

[22/01/2016 19:31:43] [Warning] NpcSystem:
[22/01/2016 19:31:43] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:43] [Error - Npc interface] 
[22/01/2016 19:31:43] data/npc/scripts/Mehkesh.lua
[22/01/2016 19:31:43] Description: 
[22/01/2016 19:31:43] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Mehkesh.lua

[22/01/2016 19:31:43] [Warning] NpcSystem:
[22/01/2016 19:31:43] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:43] [Error - Npc interface] 
[22/01/2016 19:31:43] data/npc/scripts/Xodet.lua
[22/01/2016 19:31:43] Description: 
[22/01/2016 19:31:43] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Xodet.lua

[22/01/2016 19:31:43] [Warning] NpcSystem:
[22/01/2016 19:31:43] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:43] [Error - Npc interface] 
[22/01/2016 19:31:43] data/npc/scripts/Humphrey.lua
[22/01/2016 19:31:43] Description: 
[22/01/2016 19:31:43] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:43] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Humphrey.lua

[22/01/2016 19:31:44] [Warning] NpcSystem:
[22/01/2016 19:31:44] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:44] [Error - Npc interface] 
[22/01/2016 19:31:44] data/npc/scripts/Pemaret.lua
[22/01/2016 19:31:44] Description: 
[22/01/2016 19:31:44] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:44] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Pemaret.lua

[22/01/2016 19:31:44] [Warning] NpcSystem:
[22/01/2016 19:31:44] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:44] [Error - Npc interface] 
[22/01/2016 19:31:44] data/npc/scripts/Guide Elena.lua
[22/01/2016 19:31:44] Description: 
[22/01/2016 19:31:44] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:44] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Guide Elena.lua

[22/01/2016 19:31:44] [Warning] NpcSystem:
[22/01/2016 19:31:44] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:44] [Error - Npc interface] 
[22/01/2016 19:31:44] data/npc/scripts/Rose.lua
[22/01/2016 19:31:44] Description: 
[22/01/2016 19:31:44] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:44] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Rose.lua

[22/01/2016 19:31:44] [Warning] NpcSystem:
[22/01/2016 19:31:44] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:44] [Error - Npc interface] 
[22/01/2016 19:31:44] data/npc/scripts/Livielle.lua
[22/01/2016 19:31:44] Description: 
[22/01/2016 19:31:44] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:44] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Livielle.lua

[22/01/2016 19:31:44] [Warning] NpcSystem:
[22/01/2016 19:31:44] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:44] [Error - Npc interface] 
[22/01/2016 19:31:44] data/npc/scripts/Rodney.lua
[22/01/2016 19:31:44] Description: 
[22/01/2016 19:31:44] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:44] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Rodney.lua

[22/01/2016 19:31:44] [Warning] NpcSystem:
[22/01/2016 19:31:44] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:44] [Error - Npc interface] 
[22/01/2016 19:31:44] data/npc/scripts/Rokyn.lua
[22/01/2016 19:31:44] Description: 
[22/01/2016 19:31:44] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:44] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Rokyn.lua

[22/01/2016 19:31:44] [Warning] NpcSystem:
[22/01/2016 19:31:44] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:44] [Error - Npc interface] 
[22/01/2016 19:31:44] data/npc/scripts/Allen.lua
[22/01/2016 19:31:44] Description: 
[22/01/2016 19:31:44] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:45] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Allen.lua

[22/01/2016 19:31:45] [Warning] NpcSystem:
[22/01/2016 19:31:45] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:45] [Error - Npc interface] 
[22/01/2016 19:31:45] data/npc/scripts/Julian.lua
[22/01/2016 19:31:45] Description: 
[22/01/2016 19:31:45] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:45] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Julian.lua

[22/01/2016 19:31:45] [Warning] NpcSystem:
[22/01/2016 19:31:45] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:45] [Error - Npc interface] 
[22/01/2016 19:31:45] data/npc/scripts/Chephan.lua
[22/01/2016 19:31:45] Description: 
[22/01/2016 19:31:45] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:45] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Chephan.lua

[22/01/2016 19:31:45] [Warning] NpcSystem:
[22/01/2016 19:31:45] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:45] [Error - Npc interface] 
[22/01/2016 19:31:45] data/npc/scripts/Xodet.lua
[22/01/2016 19:31:45] Description: 
[22/01/2016 19:31:45] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:45] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Xodet.lua

[22/01/2016 19:31:45] [Warning] NpcSystem:
[22/01/2016 19:31:45] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:45] [Error - Npc interface] 
[22/01/2016 19:31:45] data/npc/scripts/Digger.lua
[22/01/2016 19:31:45] Description: 
[22/01/2016 19:31:45] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:45] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Digger.lua

[22/01/2016 19:31:45] [Warning] NpcSystem:
[22/01/2016 19:31:45] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:45] [Error - Npc interface] 
[22/01/2016 19:31:45] data/npc/scripts/King Tibianus.lua
[22/01/2016 19:31:45] Description: 
[22/01/2016 19:31:45] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:45] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/King Tibianus.lua

[22/01/2016 19:31:45] [Warning] NpcSystem:
[22/01/2016 19:31:45] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:45] [Error - Npc interface] 
[22/01/2016 19:31:45] data/npc/scripts/default.lua
[22/01/2016 19:31:45] Description: 
[22/01/2016 19:31:45] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:45] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/default.lua

[22/01/2016 19:31:45] [Warning] NpcSystem:
[22/01/2016 19:31:45] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:46] [Error - Npc interface] 
[22/01/2016 19:31:46] data/npc/scripts/Exchanger.lua
[22/01/2016 19:31:46] Description: 
[22/01/2016 19:31:46] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:46] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Exchanger.lua

[22/01/2016 19:31:46] [Warning] NpcSystem:
[22/01/2016 19:31:46] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:46] [Error - Npc interface] 
[22/01/2016 19:31:46] data/npc/scripts/tim.lua
[22/01/2016 19:31:46] Description: 
[22/01/2016 19:31:46] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:46] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/tim.lua

[22/01/2016 19:31:46] [Warning] NpcSystem:
[22/01/2016 19:31:46] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:46] [Error - Npc interface] 
[22/01/2016 19:31:46] data/npc/scripts/Sell/Distance.lua
[22/01/2016 19:31:46] Description: 
[22/01/2016 19:31:46] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:46] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Sell/Distance.lua

[22/01/2016 19:31:46] [Warning] NpcSystem:
[22/01/2016 19:31:46] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:46] [Error - Npc interface] 
[22/01/2016 19:31:46] data/npc/scripts/Norf.lua
[22/01/2016 19:31:46] Description: 
[22/01/2016 19:31:46] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:46] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Norf.lua

[22/01/2016 19:31:46] [Warning] NpcSystem:
[22/01/2016 19:31:46] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:46] [Error - Npc interface] 
[22/01/2016 19:31:46] data/npc/scripts/Chemar.lua
[22/01/2016 19:31:46] Description: 
[22/01/2016 19:31:46] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:46] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Chemar.lua

[22/01/2016 19:31:46] [Warning] NpcSystem:
[22/01/2016 19:31:46] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:46] [Error - Npc interface] 
[22/01/2016 19:31:46] data/npc/scripts/Captain Max Calassa.lua
[22/01/2016 19:31:46] Description: 
[22/01/2016 19:31:46] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:46] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Captain Max Calassa.lua

[22/01/2016 19:31:46] [Warning] NpcSystem:
[22/01/2016 19:31:46] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:46] [Error - Npc interface] 
[22/01/2016 19:31:46] data/npc/scripts/bank.lua
[22/01/2016 19:31:46] Description: 
[22/01/2016 19:31:47] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:47] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:47] [Warning] NpcSystem:
[22/01/2016 19:31:47] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:47] [Error - Npc interface] 
[22/01/2016 19:31:47] data/npc/scripts/Jezzara.lua
[22/01/2016 19:31:47] Description: 
[22/01/2016 19:31:47] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:47] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Jezzara.lua

[22/01/2016 19:31:47] [Warning] NpcSystem:
[22/01/2016 19:31:47] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:47] [Error - Npc interface] 
[22/01/2016 19:31:47] data/npc/scripts/bank.lua
[22/01/2016 19:31:47] Description: 
[22/01/2016 19:31:47] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:47] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:47] [Warning] NpcSystem:
[22/01/2016 19:31:47] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:47] [Error - Npc interface] 
[22/01/2016 19:31:47] data/npc/scripts/Captain Max.lua
[22/01/2016 19:31:47] Description: 
[22/01/2016 19:31:47] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:47] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Captain Max.lua

[22/01/2016 19:31:47] [Warning] NpcSystem:
[22/01/2016 19:31:47] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:47] [Error - Npc interface] 
[22/01/2016 19:31:47] data/npc/scripts/Reed.lua
[22/01/2016 19:31:47] Description: 
[22/01/2016 19:31:47] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:47] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Reed.lua

[22/01/2016 19:31:47] [Warning] NpcSystem:
[22/01/2016 19:31:47] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:47] [Error - Npc interface] 
[22/01/2016 19:31:47] data/npc/scripts/Bertha.lua
[22/01/2016 19:31:47] Description: 
[22/01/2016 19:31:47] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:47] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Bertha.lua

[22/01/2016 19:31:48] [Warning] NpcSystem:
[22/01/2016 19:31:48] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:48] [Error - Npc interface] 
[22/01/2016 19:31:48] data/npc/scripts/Bruce.lua
[22/01/2016 19:31:48] Description: 
[22/01/2016 19:31:48] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:48] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Bruce.lua

[22/01/2016 19:31:48] [Warning] NpcSystem:
[22/01/2016 19:31:48] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:48] [Error - Npc interface] 
[22/01/2016 19:31:48] data/npc/scripts/Janz.lua
[22/01/2016 19:31:48] Description: 
[22/01/2016 19:31:48] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:48] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Janz.lua

[22/01/2016 19:31:48] [Warning] NpcSystem:
[22/01/2016 19:31:48] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:48] [Error - Npc interface] 
[22/01/2016 19:31:48] data/npc/scripts/bank.lua
[22/01/2016 19:31:48] Description: 
[22/01/2016 19:31:48] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:48] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:48] [Warning] NpcSystem:
[22/01/2016 19:31:48] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:48] [Error - Npc interface] 
[22/01/2016 19:31:48] data/npc/scripts/Haroun.lua
[22/01/2016 19:31:48] Description: 
[22/01/2016 19:31:48] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:48] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Haroun.lua

[22/01/2016 19:31:48] [Warning] NpcSystem:
[22/01/2016 19:31:48] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:48] [Error - Npc interface] 
[22/01/2016 19:31:48] data/npc/scripts/Hal.lua
[22/01/2016 19:31:48] Description: 
[22/01/2016 19:31:48] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:48] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Hal.lua

[22/01/2016 19:31:49] [Warning] NpcSystem:
[22/01/2016 19:31:49] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:49] [Error - Npc interface] 
[22/01/2016 19:31:49] data/npc/scripts/Oliver.lua
[22/01/2016 19:31:49] Description: 
[22/01/2016 19:31:49] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:49] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Oliver.lua

[22/01/2016 19:31:49] [Warning] NpcSystem:
[22/01/2016 19:31:49] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:49] [Error - Npc interface] 
[22/01/2016 19:31:49] data/npc/scripts/Dorbin.lua
[22/01/2016 19:31:49] Description: 
[22/01/2016 19:31:49] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:49] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Dorbin.lua

[22/01/2016 19:31:49] [Warning] NpcSystem:
[22/01/2016 19:31:49] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:49] [Error - Npc interface] 
[22/01/2016 19:31:49] data/npc/scripts/bank.lua
[22/01/2016 19:31:49] Description: 
[22/01/2016 19:31:49] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:49] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:49] [Warning] NpcSystem:
[22/01/2016 19:31:49] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:49] [Error - Npc interface] 
[22/01/2016 19:31:49] data/npc/scripts/Tony.lua
[22/01/2016 19:31:49] Description: 
[22/01/2016 19:31:49] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:49] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Tony.lua

[22/01/2016 19:31:49] [Warning] NpcSystem:
[22/01/2016 19:31:49] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:49] [Error - Npc interface] 
[22/01/2016 19:31:49] data/npc/scripts/Peter.lua
[22/01/2016 19:31:49] Description: 
[22/01/2016 19:31:49] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:49] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Peter.lua

[22/01/2016 19:31:50] [Warning] NpcSystem:
[22/01/2016 19:31:50] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:50] [Error - Npc interface] 
[22/01/2016 19:31:50] data/npc/scripts/Brasith.lua
[22/01/2016 19:31:50] Description: 
[22/01/2016 19:31:50] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:50] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Brasith.lua

[22/01/2016 19:31:50] [Warning] NpcSystem:
[22/01/2016 19:31:50] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:50] [Error - Npc interface] 
[22/01/2016 19:31:50] data/npc/scripts/Queen Eloise.lua
[22/01/2016 19:31:50] Description: 
[22/01/2016 19:31:50] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:50] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Queen Eloise.lua

[22/01/2016 19:31:50] [Warning] NpcSystem:
[22/01/2016 19:31:50] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:50] [Error - Npc interface] 
[22/01/2016 19:31:50] data/npc/scripts/bank.lua
[22/01/2016 19:31:50] Description: 
[22/01/2016 19:31:50] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:50] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:50] [Warning] NpcSystem:
[22/01/2016 19:31:50] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:50] [Error - Npc interface] 
[22/01/2016 19:31:50] data/npc/scripts/Lector.lua
[22/01/2016 19:31:50] Description: 
[22/01/2016 19:31:50] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:50] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Lector.lua

[22/01/2016 19:31:50] [Warning] NpcSystem:
[22/01/2016 19:31:50] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:50] [Error - Npc interface] 
[22/01/2016 19:31:51] data/npc/scripts/Cornelia.lua
[22/01/2016 19:31:51] Description: 
[22/01/2016 19:31:51] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:51] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Cornelia.lua

[22/01/2016 19:31:51] [Warning] NpcSystem:
[22/01/2016 19:31:51] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:51] [Error - Npc interface] 
[22/01/2016 19:31:51] data/npc/scripts/Daniel Steelsoul.lua
[22/01/2016 19:31:51] Description: 
[22/01/2016 19:31:51] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:51] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Daniel Steelsoul.lua

[22/01/2016 19:31:51] [Warning] NpcSystem:
[22/01/2016 19:31:51] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:51] [Error - Npc interface] 
[22/01/2016 19:31:51] data/npc/scripts/Imalas.lua
[22/01/2016 19:31:51] Description: 
[22/01/2016 19:31:51] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:51] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Imalas.lua

[22/01/2016 19:31:51] [Warning] NpcSystem:
[22/01/2016 19:31:51] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:51] [Error - Npc interface] 
[22/01/2016 19:31:51] data/npc/scripts/bank.lua
[22/01/2016 19:31:51] Description: 
[22/01/2016 19:31:51] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:51] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:51] [Warning] NpcSystem:
[22/01/2016 19:31:51] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:51] [Error - Npc interface] 
[22/01/2016 19:31:51] data/npc/scripts/default.lua
[22/01/2016 19:31:51] Description: 
[22/01/2016 19:31:51] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:51] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/default.lua

[22/01/2016 19:31:51] [Warning] NpcSystem:
[22/01/2016 19:31:52] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:52] [Error - Npc interface] 
[22/01/2016 19:31:52] data/npc/scripts/Nydala.lua
[22/01/2016 19:31:52] Description: 
[22/01/2016 19:31:52] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:52] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Nydala.lua

[22/01/2016 19:31:52] [Warning] NpcSystem:
[22/01/2016 19:31:52] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:52] [Error - Npc interface] 
[22/01/2016 19:31:52] data/npc/scripts/Xodet.lua
[22/01/2016 19:31:52] Description: 
[22/01/2016 19:31:52] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:52] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Xodet.lua

[22/01/2016 19:31:52] [Warning] NpcSystem:
[22/01/2016 19:31:52] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:52] [Error - Npc interface] 
[22/01/2016 19:31:52] data/npc/scripts/Edvard.lua
[22/01/2016 19:31:52] Description: 
[22/01/2016 19:31:52] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:52] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Edvard.lua

[22/01/2016 19:31:52] [Warning] NpcSystem:
[22/01/2016 19:31:52] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:52] [Error - Npc interface] 
[22/01/2016 19:31:52] data/npc/scripts/Yoem.lua
[22/01/2016 19:31:52] Description: 
[22/01/2016 19:31:52] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:52] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Yoem.lua

[22/01/2016 19:31:52] [Warning] NpcSystem:
[22/01/2016 19:31:53] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:53] [Error - Npc interface] 
[22/01/2016 19:31:53] data/npc/scripts/Lubo.lua
[22/01/2016 19:31:53] Description: 
[22/01/2016 19:31:53] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:53] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Lubo.lua

[22/01/2016 19:31:53] [Warning] NpcSystem:
[22/01/2016 19:31:53] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:53] [Error - Npc interface] 
[22/01/2016 19:31:53] data/npc/scripts/Grof, the guard.lua
[22/01/2016 19:31:53] Description: 
[22/01/2016 19:31:53] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:53] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Grof, the guard.lua

[22/01/2016 19:31:53] [Warning] NpcSystem:
[22/01/2016 19:31:53] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:53] [Error - Npc interface] 
[22/01/2016 19:31:53] data/npc/scripts/Baxter.lua
[22/01/2016 19:31:53] Description: 
[22/01/2016 19:31:53] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:53] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Baxter.lua

[22/01/2016 19:31:53] [Warning] NpcSystem:
[22/01/2016 19:31:53] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:53] [Error - Npc interface] 
[22/01/2016 19:31:53] data/npc/scripts/Gorn.lua
[22/01/2016 19:31:53] Description: 
[22/01/2016 19:31:53] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:53] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Gorn.lua

[22/01/2016 19:31:54] [Warning] NpcSystem:
[22/01/2016 19:31:54] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:54] [Error - Npc interface] 
[22/01/2016 19:31:54] data/npc/scripts/Aruda.lua
[22/01/2016 19:31:54] Description: 
[22/01/2016 19:31:54] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:54] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Aruda.lua

[22/01/2016 19:31:54] [Warning] NpcSystem:
[22/01/2016 19:31:54] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:54] [Error - Npc interface] 
[22/01/2016 19:31:54] data/npc/scripts/Sell/runes.lua
[22/01/2016 19:31:54] Description: 
[22/01/2016 19:31:54] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:54] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Sell/runes.lua

[22/01/2016 19:31:54] [Warning] NpcSystem:
[22/01/2016 19:31:54] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:54] [Error - Npc interface] 
[22/01/2016 19:31:54] data/npc/scripts/bank.lua
[22/01/2016 19:31:54] Description: 
[22/01/2016 19:31:54] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:54] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:54] [Warning] NpcSystem:
[22/01/2016 19:31:54] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:54] [Error - Npc interface] 
[22/01/2016 19:31:54] data/npc/scripts/Elane.lua
[22/01/2016 19:31:54] Description: 
[22/01/2016 19:31:54] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:54] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Elane.lua

[22/01/2016 19:31:55] [Warning] NpcSystem:
[22/01/2016 19:31:55] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:55] [Error - Npc interface] 
[22/01/2016 19:31:55] data/npc/scripts/bank.lua
[22/01/2016 19:31:55] Description: 
[22/01/2016 19:31:55] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:55] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:55] [Warning] NpcSystem:
[22/01/2016 19:31:55] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:55] [Error - Npc interface] 
[22/01/2016 19:31:55] data/npc/scripts/kulag.lua
[22/01/2016 19:31:55] Description: 
[22/01/2016 19:31:55] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:55] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/kulag.lua

[22/01/2016 19:31:55] [Warning] NpcSystem:
[22/01/2016 19:31:55] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:55] [Error - Npc interface] 
[22/01/2016 19:31:55] data/npc/scripts/Wyat.lua
[22/01/2016 19:31:55] Description: 
[22/01/2016 19:31:55] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:55] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Wyat.lua

[22/01/2016 19:31:55] [Warning] NpcSystem:
[22/01/2016 19:31:55] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:55] [Error - Npc interface] 
[22/01/2016 19:31:55] data/npc/scripts/walter.lua
[22/01/2016 19:31:55] Description: 
[22/01/2016 19:31:55] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:55] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/walter.lua

[22/01/2016 19:31:55] [Warning] NpcSystem:
[22/01/2016 19:31:55] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:56] [Error - Npc interface] 
[22/01/2016 19:31:56] data/npc/scripts/Hardek.lua
[22/01/2016 19:31:56] Description: 
[22/01/2016 19:31:56] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:56] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Hardek.lua

[22/01/2016 19:31:56] [Warning] NpcSystem:
[22/01/2016 19:31:56] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:56] [Error - Npc interface] 
[22/01/2016 19:31:56] data/npc/scripts/bank.lua
[22/01/2016 19:31:56] Description: 
[22/01/2016 19:31:56] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:56] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:56] [Warning] NpcSystem:
[22/01/2016 19:31:56] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:56] [Error - Npc interface] 
[22/01/2016 19:31:56] data/npc/scripts/Eddy.lua
[22/01/2016 19:31:56] Description: 
[22/01/2016 19:31:56] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:56] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Eddy.lua

[22/01/2016 19:31:56] [Warning] NpcSystem:
[22/01/2016 19:31:56] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:56] [Error - Npc interface] 
[22/01/2016 19:31:56] data/npc/scripts/Marina.lua
[22/01/2016 19:31:56] Description: 
[22/01/2016 19:31:56] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:57] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Marina.lua

[22/01/2016 19:31:57] [Warning] NpcSystem:
[22/01/2016 19:31:57] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:57] [Error - Npc interface] 
[22/01/2016 19:31:57] data/npc/scripts/Chondur.lua
[22/01/2016 19:31:57] Description: 
[22/01/2016 19:31:57] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:57] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Chondur.lua

[22/01/2016 19:31:57] [Warning] NpcSystem:
[22/01/2016 19:31:57] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:57] [Error - Npc interface] 
[22/01/2016 19:31:57] data/npc/scripts/Duncan.lua
[22/01/2016 19:31:57] Description: 
[22/01/2016 19:31:57] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:57] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Duncan.lua

[22/01/2016 19:31:57] [Warning] NpcSystem:
[22/01/2016 19:31:57] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:57] [Error - Npc interface] 
[22/01/2016 19:31:57] data/npc/scripts/Cedrik.lua
[22/01/2016 19:31:57] Description: 
[22/01/2016 19:31:57] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:57] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Cedrik.lua

[22/01/2016 19:31:58] [Warning] NpcSystem:
[22/01/2016 19:31:58] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:58] [Error - Npc interface] 
[22/01/2016 19:31:58] data/npc/scripts/Red Lilly.lua
[22/01/2016 19:31:58] Description: 
[22/01/2016 19:31:58] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:58] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Red Lilly.lua

[22/01/2016 19:31:58] [Warning] NpcSystem:
[22/01/2016 19:31:58] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:58] [Error - Npc interface] 
[22/01/2016 19:31:58] data/npc/scripts/Lyonel.lua
[22/01/2016 19:31:58] Description: 
[22/01/2016 19:31:58] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:58] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Lyonel.lua

[22/01/2016 19:31:58] [Warning] NpcSystem:
[22/01/2016 19:31:58] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:58] [Error - Npc interface] 
[22/01/2016 19:31:58] data/npc/scripts/bank.lua
[22/01/2016 19:31:58] Description: 
[22/01/2016 19:31:58] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:58] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:58] [Warning] NpcSystem:
[22/01/2016 19:31:58] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:58] [Error - Npc interface] 
[22/01/2016 19:31:58] data/npc/scripts/Feizuhl.lua
[22/01/2016 19:31:59] Description: 
[22/01/2016 19:31:59] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:59] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Feizuhl.lua

[22/01/2016 19:31:59] [Warning] NpcSystem:
[22/01/2016 19:31:59] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:59] [Error - Npc interface] 
[22/01/2016 19:31:59] data/npc/scripts/bank.lua
[22/01/2016 19:31:59] Description: 
[22/01/2016 19:31:59] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:59] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/bank.lua

[22/01/2016 19:31:59] [Warning] NpcSystem:
[22/01/2016 19:31:59] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:59] [Error - Npc interface] 
[22/01/2016 19:31:59] data/npc/scripts/Iwar.lua
[22/01/2016 19:31:59] Description: 
[22/01/2016 19:31:59] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:31:59] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Iwar.lua

[22/01/2016 19:31:59] [Warning] NpcSystem:
[22/01/2016 19:31:59] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:31:59] [Error - Npc interface] 
[22/01/2016 19:31:59] data/npc/scripts/Gamel.lua
[22/01/2016 19:31:59] Description: 
[22/01/2016 19:31:59] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:32:00] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Gamel.lua

[22/01/2016 19:32:00] [Warning] NpcSystem:
[22/01/2016 19:32:00] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:32:00] [Error - Npc interface] 
[22/01/2016 19:32:00] data/npc/scripts/Henricus.lua
[22/01/2016 19:32:00] Description: 
[22/01/2016 19:32:00] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:32:00] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Henricus.lua

[22/01/2016 19:32:00] [Warning] NpcSystem:
[22/01/2016 19:32:00] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:32:00] [Error - Npc interface] 
[22/01/2016 19:32:00] data/npc/scripts/The Orc King.lua
[22/01/2016 19:32:00] Description: 
[22/01/2016 19:32:00] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:32:00] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/The Orc King.lua

[22/01/2016 19:32:00] [Warning] NpcSystem:
[22/01/2016 19:32:00] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:32:00] [Error - Npc interface] 
[22/01/2016 19:32:00] data/npc/scripts/Bezil.lua
[22/01/2016 19:32:00] Description: 
[22/01/2016 19:32:00] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:32:01] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Bezil.lua

[22/01/2016 19:32:01] [Warning] NpcSystem:
[22/01/2016 19:32:01] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:32:01] [Error - Npc interface] 
[22/01/2016 19:32:01] data/npc/scripts/Cael.lua
[22/01/2016 19:32:01] Description: 
[22/01/2016 19:32:01] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:32:01] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Cael.lua

[22/01/2016 19:32:01] [Warning] NpcSystem:
[22/01/2016 19:32:01] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:32:01] [Error - Npc interface] 
[22/01/2016 19:32:01] data/npc/scripts/Pompan.lua
[22/01/2016 19:32:01] Description: 
[22/01/2016 19:32:01] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:32:01] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Pompan.lua

[22/01/2016 19:32:01] [Warning] NpcSystem:
[22/01/2016 19:32:01] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:32:01] [Error - Npc interface] 
[22/01/2016 19:32:01] data/npc/scripts/Thorgrinfarmine.lua
[22/01/2016 19:32:01] Description: 
[22/01/2016 19:32:01] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:32:01] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Thorgrinfarmine.lua

[22/01/2016 19:32:02] [Warning] NpcSystem:
[22/01/2016 19:32:02] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:32:02] [Error - Npc interface] 
[22/01/2016 19:32:02] data/npc/scripts/Pydar.lua
[22/01/2016 19:32:02] Description: 
[22/01/2016 19:32:02] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:32:02] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Pydar.lua

[22/01/2016 19:32:02] [Warning] NpcSystem:
[22/01/2016 19:32:02] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:32:02] [Error - Npc interface] 
[22/01/2016 19:32:02] data/npc/scripts/The Crone.lua
[22/01/2016 19:32:02] Description: 
[22/01/2016 19:32:02] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:32:02] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/The Crone.lua

[22/01/2016 19:32:02] [Warning] NpcSystem:
[22/01/2016 19:32:02] Parameter 'keyword_reply1' missing. Skipping...

[22/01/2016 19:32:02] [Error - Npc interface] 
[22/01/2016 19:32:03] data/npc/scripts/Brodrosch.lua
[22/01/2016 19:32:03] Description: 
[22/01/2016 19:32:03] data/npc/lib/npcsystem/modules.lua:302: attempt to call global 'Npc' (a nil value)
[22/01/2016 19:32:03] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Brodrosch.lua

[22/01/2016 19:32:04] > Data parsing time: 23.295 seconds.
[22/01/2016 19:32:09] > Houses synchronization time: 4.978 seconds.
[22/01/2016 19:32:16] > Content unserialization time: 6.135 seconds.
[22/01/2016 19:32:16] >> Checking world type... PvP
[22/01/2016 19:32:16] >> Initializing game state modules and registering services...
[22/01/2016 19:32:16] > Global address: 127.0.0.1
[22/01/2016 19:32:16] > Local ports: 7171    7172    
[22/01/2016 19:32:16] >> All modules were loaded, server is starting up...
[22/01/2016 19:32:17] >> Forgotten 8.60 server Online!

 

Voltei as configurações e agora tenho o erro original :(

Editado por Pissolato (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Este erro é referente às respostas dentro de cada NPC para cada tipo de 'resposta'.

 

Ter substituído em todos de fato estendeu o erro para os outros 'NPC´s'.

 

O que precisa ser feito (agora entendi) é encontrar o NPC que está sem esta 'keyword_reply1'.

 

Entende?

 

 

5YkRF3w.gif

 

 

 

 

 

 

CzysZUR.gifytaam6k.png

 

 

Link para o post
Compartilhar em outros sites

Sim. Tentarei mais aqui e posto se conseguir resolver, obrigado!

No momento eu arrumei uma outra distro sem erros, e acho que vou ficar com ela, estou em fase de testes! Muito obrigado pela ajuda! De qualquer forma, um abraço!!!

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por ambrozii0
      Gostaria de fazer um pedido de um NPC de Task progressiva,

      Ele iniciaria dando missões para level 8 para caçar Troll, Rotworm e Ghoul.
       
      No level 30 liberaria: Cyclops, Dragon e Wyrm... e assim em diante se puder deixar comentado eu faço as criaturas na sequencia dos leveis seguintes.
       
      O jogador pode fazer as tasks dos leveis anteriores mesmo que já tenha ultrapassado o level do próximo nível de task.
       
      E o jogador ao terminar a missão poderia escolher a recompensa em gold ou experiência. As tasks podem se repetir sem problema, mas apenas pode pegar uma de cada vez.
       
      Ao finalizar todas as tasks o jogador ganha uma montaria.
       
      Minha versão de cliente é 12.91
      Versão da Canary 2.6.1
      Não sei qual o TFS do meu servidor.
    • Por ILex WilL
      Olá, Alguém poderia me ajudar com uns Scripts? nem que seja cobrando, dependendo eu pago para me ajudar...
    • Por Garou
      QUIZ







      Fala, grande reino! Tudo beleza?

      Eu estava aqui a deriva, sem nada para fazer, quando um colega me chamou no msn e pediu para eu revisar um código que ele havia feito para um NPC. A função era bem simples, o tal NPC iria fazer perguntas ao jogador que devia responder-las corretamente, caso errasse, duas criaturas configuráveis iriam aparecer.

      Quando eu dei uma olhada no código, tomei um grande susto, era algo caótico, tudo embaralhado. Se você quer dar uma olhada, tenha certeza de ter um coração forte.



      --[[ NPC de Perguntas e Respostas Criado por Bruno Lopes / Lpz &#169; 2011 TibiaKing ]]-- local focuses = {} local talk_start = 0 local topic = {} local var = 0 local quiz = { [1] = {"What is the ring of mana?", "energy ring"}, [2] = {"Who sells addons?", "raphael"} } local monster = {"Orc", 2} local prize = { question = 100, all = 10000 } function onCreatureSay(cid, type, msg) local msg = msg:lower() or "" if getNpcDistanceTo(cid) > 3 then return false end if doMessageCheck(msg, {"hi", "hello"}) and not(isFocused(cid, focuses)) then selfSay("Hello, ".. getCreatureName(cid) ..". Can you answer my questions? heh...", cid) addFocus(cid, focuses) selfFocus(cid) topic[cid] = 100 talk_start = os.clock() elseif doMessageCheck(msg, {"hi", "hello"}) and #focuses ~= 0 then selfSay("Sorry, ".. getCreatureName(cid) ..". I am talking with another person, wait!", cid) end if doMessageCheck(msg, {"bye", "farewell", "goodbye"}) and isFocused(cid, focuses) then selfSay("Bye-bye, hehe!", cid) removeFocus(cid, focuses) end if topic[cid] == 100 then if doMessageCheck(msg, "yes") then selfSay("To start my challenge, just say {ready}. I will ask you some questions.", cid) topic[cid] = 1 elseif doMessageCheck(msg, "no") then selfSay("Huh? Why are you here then?", cid) removeFocus(cid, focuses) topic[cid] = 0 end elseif topic[cid] == 1 then if var == 0 then if doMessageCheck(msg, "ready") then var = 1 selfSay(quiz[var][1], cid) end elseif var >= 1 then if var <= #quiz then if doMessageCheck(msg, quiz[var][2]) then selfSay("CORRECT!", cid) doPlayerAddMoney(cid, prize.question) var = var+1 if var > #quiz then selfSay("CONGRATULATIONS! YOU HAVE FINISHED ALL QUESTIONS!", cid) doPlayerAddMoney(cid, prize.all) else selfSay(quiz[var][1], cid) end else selfSay("YOU HAVE WRONG MY QUESTION! GUARDS, COME HERE!", cid) var = 0 topic[cid] = 0 removeFocus(cid, focuses) for i = 1, monster[2] do doCreateMonster(monster[1], getNpcPos()) end end end end end return true end function onThink() for _, cid in ipairs(focuses) do if isPlayer(cid) and isFocused(cid, focuses) then if os.clock() > (talk_start + 180) then talk_start = 0 selfSay("Hmph!") closeShopWindow(cid) removeFocus(cid, focuses) elseif getNpcDistanceTo(cid) > 3 then talk_start = 0 selfSay("How Rude!") closeShopWindow(cid) removeFocus(cid, focuses) end end end lookAtFocus(focuses) end Bom, eu fiz o arquivo .lua que você iria associar a algum npc de seu servidor, deixo o arquivo .xml por sua conta. Como é um NPC que faz perguntas, você pode configurar o seu NPC do jeito que você quiser, com as perguntas que você quiser. Veja abaixo como proceder: local quiz = { [1] = {"What is the ring of mana?", "energy ring"}, [2] = {"Who sells addons?", "raphael"} } Para adicionar novas perguntas, basta você colocar uma vírgula na última linha e criar uma nova linha conforme o modelo: local quiz = { [1] = {"What is the ring of mana?", "energy ring"}, [2] = {"Who sells addons?", "raphael"}, [3] = {"PERGUNTA", "RESPOSTA"}, [4] = {"PERGUNTA", "RESPOSTA"} } Há também algumas outras configurações básicas para você fazer, as criaturas que irão aparecer caso o jogador erre a pergunta e a quantidade. Também você pode configurar a quantidade de dinheiro que o jogador ganha quando acerta uma pergunta e a quantidade de dinheiro do prêmio final. local monster = {"Orc", 2} local prize = { question = 100, all = 10000 } OBSERVAÇÕES Para evitar quaisquer erros no script, substitua o conteúdo de npc.lua em data/npc/lib por este que estou passando abaixo:



      É isso aê, galerinha do tibiaKing!

      Até o próximo tópico.
    • Por Codex NG
      Sorry I don't speak spanish so you will have to bare with me.
       
      This is a new way for people to create npc's which use different types of currency, rather than a coming up with different items to trade with the npc or trying to edit the npc modules this method simplifies everything by providing the npc with a npc currency id.
       
      All this npc currency id is, is a storage value.. pretty simple eh?
      If the npc doesn't have a currency id then it will use the normal currency e.g. gold, plat, cc etc..
       
      I originally posted this on otland, but fuck them xD
       
      Using Lailene here you can see she has a currency attribute with id of 123456
      <?xml version="1.0" encoding="UTF-8"?> <npc name="Lailene" currency="123456" script="lailene.lua" walkinterval="2000" floorchange="0" speechbubble="2"> <health now="100" max="100"/> <look type="279" head="114" body="94" legs="113" feet="114" addons="0"/> </npc>  
      Now any player who has a storage value of 123456 can purchase things from her shop provided they have enough value stored within the storage, similar to having money in the bank.
      The money or in this case the storage value is added and removed from the player in real time.
       
      Lets get to the code
       
      game.cpp
      Find this
      bool Game::removeMoney(Cylinder* cylinder, uint64_t money, uint32_t flags /*= 0*/) Replace the whole function with this.
      bool Game::removeMoney(Cylinder* cylinder, uint64_t money, uint32_t flags /*= 0*/) { if (cylinder == nullptr) { return false; } if (money == 0) { return true; } uint32_t currencyId = 0; Player* player; if (Creature* creature = cylinder->getCreature()) { if (Player* p = creature->getPlayer()) { currencyId = p->getNpcCurrencyId(); player = p; } } if (!currencyId) { std::vector<Container*> containers; std::multimap<uint32_t, Item*> moneyMap; uint64_t moneyCount = 0; for (size_t i = cylinder->getFirstIndex(), j = cylinder->getLastIndex(); i < j; ++i) { Thing* thing = cylinder->getThing(i); if (!thing) { continue; } Item* item = thing->getItem(); if (!item) { continue; } Container* container = item->getContainer(); if (container) { containers.push_back(container); } else { const uint32_t worth = item->getWorth(); if (worth != 0) { moneyCount += worth; moneyMap.emplace(worth, item); } } } size_t i = 0; while (i < containers.size()) { Container* container = containers[i++]; for (Item* item : container->getItemList()) { Container* tmpContainer = item->getContainer(); if (tmpContainer) { containers.push_back(tmpContainer); } else { const uint32_t worth = item->getWorth(); if (worth != 0) { moneyCount += worth; moneyMap.emplace(worth, item); } } } } if (moneyCount < money) { return false; } for (const auto& moneyEntry : moneyMap) { Item* item = moneyEntry.second; if (moneyEntry.first < money) { internalRemoveItem(item); money -= moneyEntry.first; } else if (moneyEntry.first > money) { const uint32_t worth = moneyEntry.first / item->getItemCount(); const uint32_t removeCount = (money / worth) + 1; addMoney(cylinder, (worth * removeCount) - money, flags); internalRemoveItem(item, removeCount); break; } else { internalRemoveItem(item); break; } } } else { int32_t value; player->getStorageValue(currencyId, value); if (value < money) { return false; } player->addStorageValue(currencyId, value - money); } return true; } Next find this
      void Game::addMoney(Cylinder* cylinder, uint64_t money, uint32_t flags /*= 0*/) Replace the whole function with this
      void Game::addMoney(Cylinder* cylinder, uint64_t money, uint32_t flags /*= 0*/) { if (money == 0) { return; } if (Creature* creature = cylinder->getCreature()) { if (Player* player = creature->getPlayer()) { if(uint32_t currencyId = player->getNpcCurrencyId()){ int32_t value; player->getStorageValue(currencyId, value); player->addStorageValue(currencyId, value + money); return; } } } uint32_t crystalCoins = money / 10000; money -= crystalCoins * 10000; while (crystalCoins > 0) { const uint16_t count = std::min<uint32_t>(100, crystalCoins); Item* remaindItem = Item::CreateItem(ITEM_CRYSTAL_COIN, count); ReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags); if (ret != RETURNVALUE_NOERROR) { internalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT); } crystalCoins -= count; } uint16_t platinumCoins = money / 100; if (platinumCoins != 0) { Item* remaindItem = Item::CreateItem(ITEM_PLATINUM_COIN, platinumCoins); ReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags); if (ret != RETURNVALUE_NOERROR) { internalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT); } money -= platinumCoins * 100; } if (money != 0) { Item* remaindItem = Item::CreateItem(ITEM_GOLD_COIN, money); ReturnValue ret = internalAddItem(cylinder, remaindItem, INDEX_WHEREEVER, flags); if (ret != RETURNVALUE_NOERROR) { internalAddItem(cylinder->getTile(), remaindItem, INDEX_WHEREEVER, FLAG_NOLIMIT); } } }  
      npc.cpp
      Look for this
      pugi::xml_attribute attr; if ((attr = npcNode.attribute("speed"))) { baseSpeed = pugi::cast<uint32_t>(attr.value()); } else { baseSpeed = 100; } Right underneath that you are going to place this.
      if ((attr = npcNode.attribute("currency"))) { currency = pugi::cast<uint32_t>(attr.value()); }  
      npc.h
      Look for this
      bool isPushable() const final { return walkTicks > 0; } Place this right underneath
      uint32_t getCurrencyId() const { return currency; } Look for this
      uint32_t walkTicks; Place this right underneath
      uint32_t currency;  
      player.cpp
      Find this
      void Player::openShopWindow(Npc* npc, const std::list<ShopInfo>& shop) Replace that function with this
      void Player::openShopWindow(Npc* npc, const std::list<ShopInfo>& shop) { shopItemList = shop; sendShop(npc); sendSaleItemList(npc); } Next find this
      bool Player::updateSaleShopList(const Item* item) Replace that function with this
      bool Player::updateSaleShopList(const Item* item) { uint16_t itemId = item->getID(); if (itemId != ITEM_GOLD_COIN && itemId != ITEM_PLATINUM_COIN && itemId != ITEM_CRYSTAL_COIN) { auto it = std::find_if(shopItemList.begin(), shopItemList.end(), [itemId](const ShopInfo& shopInfo) { return shopInfo.itemId == itemId && shopInfo.sellPrice != 0; }); if (it == shopItemList.end()) { const Container* container = item->getContainer(); if (!container) { return false; } const auto& items = container->getItemList(); return std::any_of(items.begin(), items.end(), [this](const Item* containerItem) { return updateSaleShopList(containerItem); }); } } if (client) { client->sendSaleItemList(shopOwner, shopItemList); } return true; } Next you are going to look for
      uint64_t Player::getMoney() const Now right underneath that function you are going to place these.
      uint64_t Player::getMoney(Npc* npc) const { uint64_t cash; setNpcCurrencyId(npc); uint32_t currencyId = getNpcCurrencyId(); if (currencyId) { int32_t value; getStorageValue(currencyId, value); cash = (uint64_t)value; } else { cash = getMoney(); } return cash; } void Player::setNpcCurrencyId(Npc* npc) const{ currencyId = npc->getCurrencyId(); } uint32_t Player::getNpcCurrencyId() const { return currencyId; }  
      player.h
      Look for this
      uint64_t getMoney() const; Place this right underneath
      uint64_t getMoney(Npc*) const; void setNpcCurrencyId(Npc*) const; uint32_t getNpcCurrencyId() const; Find this
      void sendShop(Npc* npc) const { if (client) { client->sendShop(npc, shopItemList); } } Place this right underneath
      void sendSaleItemList(Npc* npc) const { if (client) { client->sendSaleItemList(npc, shopItemList); } } Find this
      uint32_t manaMax; Place this right underneath
      mutable uint32_t currencyId;  
      protocolgame.cpp
      Now find this function
      void ProtocolGame::sendSaleItemList(const std::list<ShopInfo>& shop) Place this right underneath
      void ProtocolGame::sendSaleItemList(Npc* npc, const std::list<ShopInfo>& shop) { NetworkMessage msg; msg.addByte(0x7B); msg.add<uint64_t>(player->getMoney(npc)); std::map<uint16_t, uint32_t> saleMap; if (shop.size() <= 5) { // For very small shops it's not worth it to create the complete map for (const ShopInfo& shopInfo : shop) { if (shopInfo.sellPrice == 0) { continue; } int8_t subtype = -1; const ItemType& itemType = Item::items[shopInfo.itemId]; if (itemType.hasSubType() && !itemType.stackable) { subtype = (shopInfo.subType == 0 ? -1 : shopInfo.subType); } uint32_t count = player->getItemTypeCount(shopInfo.itemId, subtype); if (count > 0) { saleMap[shopInfo.itemId] = count; } } } else { // Large shop, it's better to get a cached map of all item counts and use it // We need a temporary map since the finished map should only contain items // available in the shop std::map<uint32_t, uint32_t> tempSaleMap; player->getAllItemTypeCount(tempSaleMap); // We must still check manually for the special items that require subtype matches // (That is, fluids such as potions etc., actually these items are very few since // health potions now use their own ID) for (const ShopInfo& shopInfo : shop) { if (shopInfo.sellPrice == 0) { continue; } int8_t subtype = -1; const ItemType& itemType = Item::items[shopInfo.itemId]; if (itemType.hasSubType() && !itemType.stackable) { subtype = (shopInfo.subType == 0 ? -1 : shopInfo.subType); } if (subtype != -1) { uint32_t count; if (!itemType.isFluidContainer() && !itemType.isSplash()) { count = player->getItemTypeCount(shopInfo.itemId, subtype); // This shop item requires extra checks } else { count = subtype; } if (count > 0) { saleMap[shopInfo.itemId] = count; } } else { std::map<uint32_t, uint32_t>::const_iterator findIt = tempSaleMap.find(shopInfo.itemId); if (findIt != tempSaleMap.end() && findIt->second > 0) { saleMap[shopInfo.itemId] = findIt->second; } } } } uint8_t itemsToSend = std::min<size_t>(saleMap.size(), std::numeric_limits<uint8_t>::max()); msg.addByte(itemsToSend); uint8_t i = 0; for (std::map<uint16_t, uint32_t>::const_iterator it = saleMap.begin(); i < itemsToSend; ++it, ++i) { msg.addItemId(it->first); msg.addByte(std::min<uint32_t>(it->second, std::numeric_limits<uint8_t>::max())); } writeToOutputBuffer(msg); }  
      protocolgame.h
      Find this
      void sendSaleItemList(const std::list<ShopInfo>& shop); Place this right underneath
      void sendSaleItemList(Npc* npc, const std::list<ShopInfo>& shop);  
      luascript.cpp
      Find
      int LuaScriptInterface::luaPlayerAddMoney(lua_State* L) Replace that whole function with this
      int LuaScriptInterface::luaPlayerAddMoney(lua_State* L) { // player:addMoney(money[, currencyId]) uint64_t money = getNumber<uint64_t>(L, 2); uint32_t currencyId = getNumber<uint32_t>(L, 3); Player* player = getUserdata<Player>(L, 1); if (player) { if (currencyId) { int32_t value; player->getStorageValue(currencyId, value); player->addStorageValue(currencyId, value + money); } else { g_game.addMoney(player, money); } pushBoolean(L, true); } else { lua_pushnil(L); } return 1; } Next find this function which should be right below it.
      int LuaScriptInterface::luaPlayerRemoveMoney(lua_State* L) Replace that whole function with this
      int LuaScriptInterface::luaPlayerRemoveMoney(lua_State* L) { // player:removeMoney(money[, currencyId]) Player* player = getUserdata<Player>(L, 1); if (player) { uint64_t money = getNumber<uint64_t>(L, 2); uint32_t currencyId = getNumber<uint32_t>(L, 3); if (currencyId) { int32_t value; player->getStorageValue(currencyId, value); if (value < money) { pushBoolean(L, false); return 1; } player->addStorageValue(currencyId, value - money); pushBoolean(L, true); } else { pushBoolean(L, g_game.removeMoney(player, money)); } } else { lua_pushnil(L); } return 1; }  
    • Por Ayron5
      Antes de tudo quero deixar claro que pesquisei no fórum, Não encontrei. Resolvi fazer o meu  
      Este NPC faz oq o titulo diz  vende Stone ou Item por Diamond. Npc simples e configurável  Testado em Poketibia 8.54  tfs 0.3.6 
       
      Em data/npc, coloque um novo arquivo com o nome Ditem.xml e cole isso dentro:
       
      Na pasta data/npc/script, crie um arquivo chamado "Ditem.lua" e cole isso:
       
      Para adicionar mais itens:
       
      1º -  adiciona o nome do item para o player falar o nome dele, caso queira comprar - 
      selfSay('Eu vendo Fire stone, Water stone, Leaf stone. Diga qual voce quer adquirir.', cid) 2º - Após o ultimo 
      talkState[talkUser] = 3 Vc adiciona isso - 
      elseif(msgcontains(msg, '----NOME DO ITEM----') or msgcontains(msg, '---nome do item---')) then selfSay('O item Custa 3 Diamonds, Voce vai querer?', cid) talkState[talkUser] = 4 ----- Aqui coloca 4 pq ja tem a 3 3º - Na parte de  -- Confirmação da Compra -- Depois de  um      
      talkState[talkUser] = 0 end Adicione --  elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 4) then ---Coloque 4 por causa da ---talkState[talkUser] = 4--- if(doPlayerRemoveItem(cid, 2145, 3) == true) then ----Item q sera removido no caso 2145 Diamonds e 3 é a quantidade. selfSay('Thanks!', cid) doPlayerAddItem(cid, 11447, 1) ----- 11447 é o item q será entregue no caso é a fire stone, o 1 é a quantidade de itens. talkState[talkUser] = 0 else selfSay('Voce nao tem diamonds suficiente.', cid) talkState[talkUser] = 0 end Bom é isso espero ajudar alguém rsrsrs  
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo