• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    Error en la Consola Task System.

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1Resuelto Error en la Consola Task System. el Lun Jun 02, 2014 2:10 pm

    hola, Tengo un error con el Task System.
    cuando le digo al Npc "Task Man" para recibir recompensa . "Demon" me Lanza el Siguiente Error en la consola

    Ver perfil de usuario http://www.mainmoney.com

    2Resuelto Re: Error en la Consola Task System. el Lun Jun 02, 2014 2:32 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    hmm es un error de version del npc



    Código:
              local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
    local talkState = {}

    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

    function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
    return false
    end
             
             
             
                local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid

                for varm, tasks in pairs(amoebaTask) do
                    local msg = string.lower(msg)
                    if isInArray(tasks.nome, msg) then
                        if getPlayerStorageValue(cid, tasks.storage) == -1 then
                        if getPlayerStorageValue(cid, tasks.storagecount) == tasks.count then
                            local esperiencia = tasks.exp > 0 and "" ..tasks.exp.. " exp e " or ""
                            local dineiro = tasks.money > 0 and "" .. tasks.money .. " gold coins e " or ""
                            selfSay("Voce conseguiu completar a task de ".. tasks.nome .. ", parabens! Eu vou te dar " .. esperiencia .. "" .. dineiro .."alguns itens como recompensa.", cid)
                            doPlayerAddExperience(cid, tasks.exp)
                            doPlayerAddMoney(cid, tasks.money)
                            doPlayerSetStorageValue(cid, tasks.storage, 1)
                            for juba, prize in pairs(tasks.premios) do
                                doPlayerAddItem(cid, prize[1], prize[2])
                        end
                        else
                            selfSay("Desculpe, mas voce ainda nao matou todos os " .. tasks.nome .. "s. Voce so matou " .. taskKills(cid, tasks.storagecount) .. " de " .. tasks.count .. " " .. tasks.nome .. "s.", cid)
                            break
                        end
                    else
                        selfSay("Voce so pode recber uma vez o premio de cada task.", cid)
                    end
                end
                end
                return true
                end
                npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    npcHandler:addModule(FocusModule:new())


    intenta con este npc



    Ver perfil de usuario http://www.tibiaface.com

    3Resuelto Re: Error en la Consola Task System. el Lun Jun 02, 2014 2:44 pm

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    dale actualisar a tu tema F5 y ve que modifique mi respuesta




    Revisando otra cosa en tu error dice que no encuentra el archivo en data/lib

    amoebaTask si no añadiste eso en data/lib o lo añadiste mal eso deve ser el error



    Ver perfil de usuario http://www.tibiaface.com

    4Resuelto Solucionado el Lun Jun 02, 2014 2:58 pm

    Solucionado! ...
    Para Solucionarlo ir a data/lib Buscar el Archivo " amoebaTask.lua y reemplazarlo por Esto
    Código:
    -- Script feito por amoeba13 --

    amoebaTask = {
        {nomes = "Queen Rotworm", nome= {("Queen Rotworm")}, creatures = {"Queen Rotworw"}, storage = 2312108, storagecount = 890108, count = 50, exp = 10000, money = 0, premios = {{6527, 1},{2160, 2}}},
        {nomes = "Dragon", nome= {("Dragon")}, creatures = {"Dragon"}, storage = 2312109, storagecount = 890109, count = 250, exp = 1070100, money = 0, premios = {{6527, 2},{2160, 15}}},
        {nomes = "Dragon Lord", nome= {("Dragon Lord")}, creatures = {"Dragon Lord"}, storage = 2312110, storagecount = 890110, count = 400, exp = 3605100, money = 0, premios = {{6527, 4},{2160, 20}}},
        {nomes = "Black Knight", nome= {("Black Knight")}, creatures = {"Black Knight"}, storage = 2312111, storagecount = 890111, count = 300, exp = 0, money = 0, premios = {{6527, 3},{2160, 10}}},
        {nomes = "Behemoth", nome= {("Behemoth")}, creatures = {"Behemotho"}, storage = 2312112, storagecount = 890112, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Enlightened Of The Cult", nome= {("Enlightened Of The Cult")}, creatures = {"Enlightened Of The Cult"}, storage = 2312113, storagecount = 890113, count = 150, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "Bog Raider", nome= {("Bog Raider")}, creatures = {"Bog Raider"}, storage = 2312114, storagecount = 890114, count = 5, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "Cyclops Smith", nome= {("cyclops smith")}, creatures = {"cyclops smith"}, storage = 2312115, storagecount = 890115, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Destroyer", nome= {("Destroyer")}, creatures = {"Destroyer"}, storage = 2312116, storagecount = 890116, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Diabolic Imp", nome= {("Diabolic Imp")}, creatures = {"Diabolic Imp"}, storage = 2312117, storagecount = 890117, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Fury", nome= {("Fury")}, creatures = {"Fury"}, storage = 2312118, storagecount = 890118, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Ghastly Dragon", nome= {("Ghastly Dragon")}, creatures = {"Ghastly Dragon"}, storage = 2312119, storagecount = 890119, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Grim Reaper", nome= {("Grim Reapder")}, creatures = {"Grim Reaper"}, storage = 2312120, storagecount = 890120, count = 150, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "Giant Spider", nome= {("Giant Spider")}, creatures = {"Giant Spider"}, storage = 2312121, storagecount = 890121, count = 5, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "hand of cursed Fate", nome= {("Hand of Cursed Fate")}, creatures = {"Hand of Cursed Fate"}, storage = 2312122, storagecount = 890122, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Hellfire Fighter", nome= {("Hellfire Fighter")}, creatures = {"Hellfire Fighter"}, storage = 2312123, storagecount = 890123, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Hellspawn", nome= {("Hellspawn")}, creatures = {"Hellspawn"}, storage = 2312124, storagecount = 890124, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Hydra", nome= {("Hydra")}, creatures = {"Hydra"}, storage = 2312125, storagecount = 890125, count = 150, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "Infernalist", nome= {("Infernalist")}, creatures = {"Infernalist"}, storage = 2312126, storagecount = 890126, count = 5, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "Medusa", nome= {("Medusa")}, creatures = {"Medusa"}, storage = 2312127, storagecount = 890127, count = 5, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "Hellhound", nome= {("Hellhound")}, creatures = {"Hellhound"}, storage = 2312128, storagecount = 890128, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Plaguesmith", nome= {("Plaguesmith")}, creatures = {"Plaguesmith"}, storage = 2312129, storagecount = 890129, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Serpent Spawn", nome= {("Serpent Spawn")}, creatures = {"Serpent Spawn"}, storage = 2312130, storagecount = 890130, count = 150, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "Undead Dragon", nome= {("Undead Dragon")}, creatures = {"Undead Dragon"}, storage = 2312131, storagecount = 890131, count = 5, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "Warlock", nome= {("Warlock")}, creatures = {"Warlock"}, storage = 2312132, storagecount = 890132, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Demon", nome= {("Demon")}, creatures = {"Demon"}, storage = 2312133, storagecount = 890133, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Yeti", nome= {("Yeti")}, creatures = {"Yeti"}, storage = 2312134, storagecount = 890134, count = 300, exp = 0, money = 0, premios = {{6527, 10},{2160, 1}}},
        {nomes = "Wyrm", nome= {("Wyrm")}, creatures = {"Wyrm"}, storage = 2312135, storagecount = 890135, count = 150, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "Defiler", nome= {("Defiler")}, creatures = {"Defiler"}, storage = 2312136, storagecount = 890136, count = 5, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}},
        {nomes = "Nightmare", nome= {("Nightmare")}, creatures = {"Nightmare"}, storage = 2312137, storagecount = 890137, count = 5, exp = 0, money = 0, premios = {{6527, 4},{10134, 1}}}
    }

    function taskKills(cid, storage)
        kills = getPlayerStorageValue(cid, storage)
        if kills < 0 then
            kills = 0
        end
        return kills
    end

    Ahora ir a data/npc/scripts Buscar el Archivo amoebaTask.lua y  reemplazar esto
    Código:
                                  local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
    local talkState = {}

    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

    function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
    return false
    end
              
              
              
                local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid

                for varm, tasks in pairs(amoebaTask) do
                    local msg = string.lower(msg)
                    if isInArray(tasks.nome, msg) then
                        if getPlayerStorageValue(cid, tasks.storage) == -1 then
                        if getPlayerStorageValue(cid, tasks.storagecount) == tasks.count then
                            local esperiencia = tasks.exp > 0 and "" ..tasks.exp.. " exp e " or ""
                            local dineiro = tasks.money > 0 and "" .. tasks.money .. " gold coins e " or ""
                            selfSay("Has Conseguido Completar La Task".. esperiencia .. "" .. dineiro .."algunos items como recompensa.", cid)
                            doPlayerAddExperience(cid, tasks.exp)
                            doPlayerAddMoney(cid, tasks.money)
                            doPlayerSetStorageValue(cid, tasks.storage, 1)
                            for juba, prize in pairs(tasks.premios) do
                                doPlayerAddItem(cid, prize[1], prize[2])
                        end
                        else
                            selfSay("Disculpe usted No a matado Todos Las Creaturas llevas  ".. taskKills(cid, tasks.storagecount) .. " de " .. tasks.count .. " Sigua Cazando", cid)
                            break
                        end
                    else
                        selfSay("Usted Solo Puede recibir Un premio Por Task, Gracias.", cid)
                    end
                end
                end
                return true
                end
                npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    npcHandler:addModule(FocusModule:new())
    Por Ultimo Ir a data/talkactions/scripts/amoebaTask abrir y reemplazarlo por este
    Código:
    -- Script por amoeba13 --

    function onSay(cid, words, param, channel)
        local stt = ""
       
        for pika, tasks in pairs(amoebaTask) do

        for i = 1, (#amoebaTask) do
            nomes = amoebaTask[i].nomes
            storages = amoebaTask[i].storagecount
            counts = amoebaTask[i].count
            stt = stt.. nomes .. " [" .. taskKills(cid, storages) .. "/" .. counts .. "]\n"
        end       
          doPlayerPopupFYI(cid, "Task Disponibles en Winner: \n" .. stt .. "")
                break
        end
      return true
    end

    y Asi Tendrás Solucionado el Task System

    Ver perfil de usuario http://www.mainmoney.com

    Contenido patrocinado


    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).