Ir para conteúdo

Featured Replies

Postado

Então Meu Sistema De Daily Ele Não Esta Funcionando, Eu Não Sei O Pq O Primeiro Dia Funciona Numa Boa As Pessoas Fazem Recebem O Item E Recebem O Storage De 1 Dia Ai No Segundo Dia Os Bixos Não Contam, Os Players Matam Os Bixos E É Como Se Não Tivesse Aceitado Daily Não Conta Bixo Alguem E Eles Não Conseguem Fazer

 

>Script<

Spoiler

-- Edited Thony -- 

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

local storage = 5019

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

     if msgcontains(msg, "sim") then
         if exhaustion.check(cid, storage) then
             local time = exhaustion.get(cid, storage)
             local hours, minutes, seconds = math.floor (time / 3600), math.floor ((time - ((math.floor (time / 3600)) * 3600))/ 60), time - ((math.floor (time/60)) * 60)
             if time >= 3600 then
                 text = hours.." "..(hours > 1 and "horas" or "hora")..", "..minutes.." "..(minutes > 1 and "minutos" or "minuto").." e "..seconds.." "..(seconds > 1 and "segundos" or "segundo")
             elseif time >= 120 then
                 text = minutes.." "..(minutes > 1 and "minutos" or "minuto").." and "..seconds.." "..(seconds > 1 and "segundos" or "segundo")
             else
                 text = seconds.." "..(seconds > 1 and "segundos" or "segundo")
             end
             selfSay("Voce Ja Fez A Missao De Hoje Espere "..text.." Completa Denovo.", cid)    
         elseif getPlayerStorageValue(cid, storage) ~= 1 then
             selfSay("Voce Tem Um Missao Diaria De Matar 35x Bowser, voce aceita?", cid)
             talkState[talkUser] = 1
         elseif getPlayerStorageValue(cid, storage) == 1 then
             selfSay("Voce matou os 35x o Bowser?", cid)
             talkState[talkUser] = 1
         end
     elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then
         if getPlayerStorageValue(cid, storage) == -1 then
             selfSay("Otimo, so volte quando voce matar o Bowser 35x.", cid)
             setPlayerStorageValue(cid, storage, 1)
         else
             if getPlayerStorageValue(cid, 19019) == 35 then
                 selfSay("Obrigado, aqui esta sua recompensa.", cid)
                 doPlayerAddItem(cid, 13539, 300)
                 doPlayerAddExp(cid, 200000000)
                 setPlayerStorageValue(cid, 19019, -1)
                 setPlayerStorageValue(cid, 5019, -1)
                 exhaustion.set(cid, storage, 86402)
             else
                 selfSay("Voce ainda nao matou os Bowsers.", cid)
             end
         end
         talkState[talkUser] = 0
     elseif msgcontains(msg, "no") and talkState[talkUser] == 1 then
         selfSay("Ok then.", cid)
         talkState[talkUser] = 0
     end
     return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

Postado

Eu acho que o erro não tá nessa parte do npc, deve estar em algo do creaturescript, posta ai que a gente vê, mas, se preferir, postei ontem um sistema de daily task, as vezes fica até melhor que esse ?

link > [NPC] Daily Task ~~ Daily Task com 4 opções diarias

Editado por Mor3nao (veja o histórico de edições)

MEUS POSTS:

 

SE AJUDEI, DÁ O REP+, ESQUECE NÃO, VLW BB <3

Postado
  • Autor

Então amigo até tem sim um no creaturescript porem essas linhas aqui do meu script

 

                 setPlayerStorageValue(cid, 19019, -1)
                 setPlayerStorageValue(cid, 5019, -1)
                 exhaustion.set(cid, storage, 86402)
             else

 

foi eu mesmo quem adicionei e acho que elas estão fazendo o sistema meio que bugar porem vou deixar aqui em baixo o creaturescript para vc da uma olhada

 

Spoiler

 

Editado por Thony D. Serv (veja o histórico de edições)

Postado

Bom, vi pelo que eu vi, o problema tá aqui

setPlayerStorageValue(cid, 5019, -1)
exhaustion.set(cid, storage, 86402)

Tipo, pra vc dar outra task, a storage 5019 tem q valer exatamente -1, aqui:

if getPlayerStorageValue(cid, storage) == -1 then
selfSay("Otimo, so volte quando voce matar o Bowser 35x.", cid)

Aí se vc seta ele com um "temporizador" ele n vai parar em -1 entao vai ter q declarar uma storage difente pra ser o timer xD

Vou tentar editar esse negocio do Exahustion, mas nao sei se vai dar certo, pq nao entendo de 0.4 kk mas pelo menos o problema eu ja te contei ?

-- Edited Thony -- 

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

local storage = 5019
local exauststorage = 49382472

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

     if msgcontains(msg, "sim") then
         if exhaustion.check(cid, exauststorage) > 0 then
             local time = exhaustion.get(cid, exauststorage)
             local hours, minutes, seconds = math.floor (time / 3600), math.floor ((time - ((math.floor (time / 3600)) * 3600))/ 60), time - ((math.floor (time/60)) * 60)
             if time >= 3600 then
                 text = hours.." "..(hours > 1 and "horas" or "hora")..", "..minutes.." "..(minutes > 1 and "minutos" or "minuto").." e "..seconds.." "..(seconds > 1 and "segundos" or "segundo")
             elseif time >= 120 then
                 text = minutes.." "..(minutes > 1 and "minutos" or "minuto").." and "..seconds.." "..(seconds > 1 and "segundos" or "segundo")
             else
                 text = seconds.." "..(seconds > 1 and "segundos" or "segundo")
             end
             selfSay("Voce Ja Fez A Missao De Hoje Espere "..text.." Completa Denovo.", cid)    
         elseif getPlayerStorageValue(cid, storage) ~= 1 then
             selfSay("Voce Tem Um Missao Diaria De Matar 35x Bowser, voce aceita?", cid)
             talkState[talkUser] = 1
         elseif getPlayerStorageValue(cid, storage) == 1 then
             selfSay("Voce matou os 35x o Bowser?", cid)
             talkState[talkUser] = 1
         end
     elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then
         if getPlayerStorageValue(cid, storage) == -1 then
             selfSay("Otimo, so volte quando voce matar o Bowser 35x.", cid)
             setPlayerStorageValue(cid, storage, 1)
         else
             if getPlayerStorageValue(cid, 19019) == 35 then
                 selfSay("Obrigado, aqui esta sua recompensa.", cid)
                 doPlayerAddItem(cid, 13539, 300)
                 doPlayerAddExp(cid, 200000000)
                 setPlayerStorageValue(cid, 19019, -1)
                 setPlayerStorageValue(cid, 5019, -1)
                 exhaustion.set(cid, exauststorage, 86402)
             else
                 selfSay("Voce ainda nao matou os Bowsers.", cid)
             end
         end
         talkState[talkUser] = 0
     elseif msgcontains(msg, "no") and talkState[talkUser] == 1 then
         selfSay("Ok then.", cid)
         talkState[talkUser] = 0
     end
     return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

E só me conta, vc tem um PokeMario? pra ter o Bowser? ahahha

MEUS POSTS:

 

SE AJUDEI, DÁ O REP+, ESQUECE NÃO, VLW BB <3

Postado
  • Autor

 

vou testar aqui se funcionar eu edito e ponho melhor resposta e dou rep++

 

(eu tenho um ndbo com varios animes e jogos é literalmente um tibia crossover kakakak)

 

--- EDIT

 

@Mor3nao

 

nao funcionou na hora que vou aceitar a missão o npc nao responde

Editado por Thony D. Serv (veja o histórico de edições)

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo