Ir para conteúdo

Featured Replies

Postado

Salve rapaziada! 

 

Alguém tem um script de um NPC que da um task para o player matar X quantidade de monstros?

 

Já procurei aqui no fórum e em outros lugares mas não achei. Até achei alguns, mas ou não funcionou no meu server ou não era o que eu queria.

 

Eu gostaria de um script simples, não quero um systema de party complexo com titulos ou npc que da varias tasks.

 

Gostaria de um NPC que dê apenas UMA task. O player chega, o NPC manda ele matar x monstros. O player vai matar, volta no NPC e recebe a recompensa, e então acabou, o NPC fala que não precisa mais de ajuda.

 

Alguém tem um NPC assim? Queria um simples assim pq minha ideia é espalhar vários desses pelo mapa, então, não quero um npc só com varias tasks.

 

PS1: se possível gostaria que aparecesse um contador toda vez q o player matasse um monstro da task  e uma mensagem quando acabar a task.

Falta derrotar "quantidade" "monstro".

Você finalizou a task, volta a npc para receber sua recompensa.

 

PS2: estou usando como base pokemon DxP. TFS 0.3.6

 

  • Respostas 5
  • Visualizações 1.9k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • WhiteBubble
    WhiteBubble

    Boa noite, segue abaixo o script: OBS: é o mais simples possivel kk   em Data/NPC e cria um arquivo xml chamado Billie.xml e adicione o código dentro: Agora em Data/NPC/Scripts crie u

Postado

Boa noite, segue abaixo o script: OBS: é o mais simples possivel kk

 

em Data/NPC e cria um arquivo xml chamado Billie.xml e adicione o código dentro:

Spoiler

<?xml version="1.0" encoding="UTF-8"?>

<npc name="Billie" script="Billie.lua" walkinterval="10000" floorchange="0" speed="100">
<health now="150" max="150"/>
<look type="141" head="114" body="119" legs="114" feet="114" corpse="2212"/>

<parameters>
	<parameter key="message_greet" value="Hello |PLAYERNAME|, I need a service... Say {help} or {task} to more informations."/>
</parameters>
</npc>

 

Agora em Data/NPC/Scripts crie um arquivo chamado Billie.lua e insira o código dentro:

Spoiler

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


-- VARIÁVEIS --
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
msg = string.lower(msg)

local id_item = 2160 -- ITEM QUE VAI GANHAR AO CONCLUIR A TASK
local quantidade_item = 1 -- QUANTIDADE DE ITENS QUE VAI GANHAR
local exp = 500000 -- EXPERIÊNCIA QUE VAI GANHAR 

local monstro = "Demon" -- NOME DO MONSTRO
local quantidade_monstro = 50 -- QUANTIDADE DE MONSTROS

local storage = 32500 -- STORAGE DO NPC
local storage_npc = 34900 -- STORAGE QUE O NPC DA PARA O PLAYER PARA COMEÇAR A TASK
local storage_quantidade = 32510 -- STORAGE QUE CONTÉM A QUANTIDADE DE MONSTROS DERROTADOS PELO PLAYER
local storage_task = 32600 -- STORAGE DE CONCLUSÃO DA TASK
local storage_mensagem = 32505 -- STORAGE PARA DEIXAR O DIALOGO MAIS BONITO
local restante = (quantidade_monstro - getPlayerStorageValue(cid, storage_quantidade)) + 1  

----------------------------------- [ DIALOGO COM NPC] -----------------------------------
  
if msgcontains(msg, 'task') then
 	
   if getPlayerStorageValue(cid, storage) == 1 then
      selfSay("You have already done my task.", cid)
      talkState[talkUser] = 0
   return true 
  
   else
      if getPlayerStorageValue(cid, storage_npc) < 1 then
         selfSay("I need you kill " ..quantidade_monstro.. " " ..monstro.. ". Do you accept my task?", cid) 
      else
         selfSay("Have you already finished my task?", cid) 
     end
   talkState[talkUser] = 1
   return true
   end
  

elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'sim')) and talkState[talkUser] == 1 then

  if getPlayerStorageValue(cid, storage_mensagem) < 1 and getPlayerStorageValue(cid, storage_npc) < 1 then
    selfSay("Ok, go to complete my task.", cid)
    talkState[talkUser] = 0
    setPlayerStorageValue(cid, storage_mensagem, 1)
    setPlayerStorageValue(cid, storage_npc, 1)
    setPlayerStorageValue(cid, storage_quantidade, 1)
  return true
  end

  if getPlayerStorageValue(cid, storage_task) < 1 then
       selfSay("You don't finish my task yet. You need to kill " ..restante.. " " ..monstro.. " yet." , cid)
    talkState[talkUser] = 0
  return true
  
  else
    selfSay("Congratulations! You finished my task! Receive your reward.", cid)
    doSendMagicEffect(getThingPos(cid), 27)
    doPlayerAddExp(cid, exp)
    doPlayerAddItem(cid, id_item, quantidade_item)
    setPlayerStorageValue(cid, storage, 1)
    talkState[talkUser] = 0
  return true
  end

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

 

Agora vai em Data/Creaturescripts/Scripts e crie um arquivo chamado task_billie e adicione o código dentro:

Spoiler

local monstro = "Demon" -- NOME DO MONSTRO
local quantidade = 50 -- QUANTIDADE DO MONSTRO QUE COLOCOU NO NPC
local storage_npc = 34900 -- STORAGE_NPC USADA NO SCRIPT DO NPC
local storage_quantidade = 32510 -- STORAGE_QUANTIDADE USADA NO SCRIPT DO NPC
local storage_task = 32600 -- STORAGE_TASK USADA NO NPC

function onKill(cid, target, lasthit)

if getPlayerStorageValue(cid, storage_npc) > 0 then
   if getPlayerStorageValue(cid, storage_task) < 1 then 
      if getPlayerStorageValue(cid, storage_quantidade) < quantidade then 
         if isPlayer(cid) and getCreatureName(target) == monstro then                  
            local restantes = quantidade - getPlayerStorageValue(cid, storage_quantidade)
            doPlayerSendTextMessage(cid, 27, "Billie: " ..restantes.. " " ..monstro.. " restantes para derrotar." ) 	
	setPlayerStorageValue(cid, storage_quantidade, getPlayerStorageValue(cid, storage_quantidade) + 1)    
         return true
         end
         
      elseif getPlayerStorageValue(cid, storage_quantidade) == quantidade then
         doPlayerSendTextMessage(cid, 27, "Billie: You don't have more " ..monstro.. " to defeat. Come back to get your reward.")
         setPlayerStorageValue(cid, storage_quantidade, -1)
         setPlayerStorageValue(cid, storage_task, 1)
      return true 
      end

   else
     return true
   end

else
  return true
end

end

 

Ainda em Data/Creaturescripts/Scripts abra o arquivo login.lua e vá procure pela parte onde fica os registros de eventos no código, e adicione a seguinte linha embaixo do último evento:

Spoiler

registerCreatureEvent(cid, "task_billie")

 

E por último, em Data/Creaturescripts abra o creaturescripts.xml e adicione a tag:

Spoiler

<event type="kill" name="task_billie" script="task_billie.lua"/>

 

Postado
  • Autor
30 minutos atrás, WhiteBubble disse:

Boa noite, segue abaixo o script: OBS: é o mais simples possivel kk

 

em Data/NPC e cria um arquivo xml chamado Billie.xml e adicione o código dentro:

  Mostrar conteúdo oculto


<?xml version="1.0" encoding="UTF-8"?>

<npc name="Billie" script="Billie.lua" walkinterval="10000" floorchange="0" speed="100">
<health now="150" max="150"/>
<look type="141" head="114" body="119" legs="114" feet="114" corpse="2212"/>

<parameters>
	<parameter key="message_greet" value="Hello |PLAYERNAME|, I need a service... Say {help} or {task} to more informations."/>
</parameters>
</npc>

 

Agora em Data/NPC/Scripts crie um arquivo chamado Billie.lua e insira o código dentro:

  Mostrar conteúdo oculto


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


-- VARIÁVEIS --
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
msg = string.lower(msg)

local id_item = 2160 -- ITEM QUE VAI GANHAR AO CONCLUIR A TASK
local quantidade_item = 1 -- QUANTIDADE DE ITENS QUE VAI GANHAR
local exp = 500000 -- EXPERIÊNCIA QUE VAI GANHAR 

local monstro = "Demon" -- NOME DO MONSTRO
local quantidade_monstro = 50 -- QUANTIDADE DE MONSTROS

local storage = 32500 -- STORAGE DO NPC
local storage_npc = 34900 -- STORAGE QUE O NPC DA PARA O PLAYER PARA COMEÇAR A TASK
local storage_quantidade = 32510 -- STORAGE QUE CONTÉM A QUANTIDADE DE MONSTROS DERROTADOS PELO PLAYER
local storage_task = 32600 -- STORAGE DE CONCLUSÃO DA TASK
local storage_mensagem = 32505 -- STORAGE PARA DEIXAR O DIALOGO MAIS BONITO
local restante = (quantidade_monstro - getPlayerStorageValue(cid, storage_quantidade)) + 1  

----------------------------------- [ DIALOGO COM NPC] -----------------------------------
  
if msgcontains(msg, 'task') then
 	
   if getPlayerStorageValue(cid, storage) == 1 then
      selfSay("You have already done my task.", cid)
      talkState[talkUser] = 0
   return true 
  
   else
      if getPlayerStorageValue(cid, storage_npc) < 1 then
         selfSay("I need you kill " ..quantidade_monstro.. " " ..monstro.. ". Do you accept my task?", cid) 
      else
         selfSay("Have you already finished my task?", cid) 
     end
   talkState[talkUser] = 1
   return true
   end
  

elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'sim')) and talkState[talkUser] == 1 then

  if getPlayerStorageValue(cid, storage_mensagem) < 1 and getPlayerStorageValue(cid, storage_npc) < 1 then
    selfSay("Ok, go to complete my task.", cid)
    talkState[talkUser] = 0
    setPlayerStorageValue(cid, storage_mensagem, 1)
    setPlayerStorageValue(cid, storage_npc, 1)
    setPlayerStorageValue(cid, storage_quantidade, 1)
  return true
  end

  if getPlayerStorageValue(cid, storage_task) < 1 then
       selfSay("You don't finish my task yet. You need to kill " ..restante.. " " ..monstro.. " yet." , cid)
    talkState[talkUser] = 0
  return true
  
  else
    selfSay("Congratulations! You finished my task! Receive your reward.", cid)
    doSendMagicEffect(getThingPos(cid), 27)
    doPlayerAddExp(cid, exp)
    doPlayerAddItem(cid, id_item, quantidade_item)
    setPlayerStorageValue(cid, storage, 1)
    talkState[talkUser] = 0
  return true
  end

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

 

Agora vai em Data/Creaturescripts/Scripts e crie um arquivo chamado task_billie e adicione o código dentro:

  Mostrar conteúdo oculto


local monstro = "Demon" -- NOME DO MONSTRO
local quantidade = 50 -- QUANTIDADE DO MONSTRO QUE COLOCOU NO NPC
local storage_npc = 34900 -- STORAGE_NPC USADA NO SCRIPT DO NPC
local storage_quantidade = 32510 -- STORAGE_QUANTIDADE USADA NO SCRIPT DO NPC
local storage_task = 32600 -- STORAGE_TASK USADA NO NPC

function onKill(cid, target, lasthit)

if getPlayerStorageValue(cid, storage_npc) > 0 then
   if getPlayerStorageValue(cid, storage_task) < 1 then 
      if getPlayerStorageValue(cid, storage_quantidade) < quantidade then 
         if isPlayer(cid) and getCreatureName(target) == monstro then                  
            local restantes = quantidade - getPlayerStorageValue(cid, storage_quantidade)
            doPlayerSendTextMessage(cid, 27, "Billie: " ..restantes.. " " ..monstro.. " restantes para derrotar." ) 	
	setPlayerStorageValue(cid, storage_quantidade, getPlayerStorageValue(cid, storage_quantidade) + 1)    
         return true
         end
         
      elseif getPlayerStorageValue(cid, storage_quantidade) == quantidade then
         doPlayerSendTextMessage(cid, 27, "Billie: You don't have more " ..monstro.. " to defeat. Come back to get your reward.")
         setPlayerStorageValue(cid, storage_quantidade, -1)
         setPlayerStorageValue(cid, storage_task, 1)
      return true 
      end

   else
     return true
   end

else
  return true
end

end

 

Ainda em Data/Creaturescripts/Scripts abra o arquivo login.lua e vá procure pela parte onde fica os registros de eventos no código, e adicione a seguinte linha embaixo do último evento:

  Mostrar conteúdo oculto


registerCreatureEvent(cid, "task_billie")

 

E por último, em Data/Creaturescripts abra o creaturescripts.xml e adicione a tag:

  Ocultar conteúdo

<event type="kill" name="task_billie" script="task_billie.lua"/>

 

Então, aconteceu o que eu já esperava kkkk 
Não tá contando as kills :c

Eu mato os bixos e não aparece o contador falando quantos faltam, não ta contando nenhum.
Mesmo nao contando eu matei todos que precisavam, quando vou falar com o npc ele diz q ainda nao matei nenhum.

Postado
  • Autor
Agora, WhiteBubble disse:

Colocou o nome correto do monstro no script no  creaturescript ?

Sim. 
Acho q o problema não é o seu script, é o meu server mesmo. Os outros scripts que eu testei acontece a mesma coisa. Acho que meu server funciona de forma diferente.
Eu tentei colocar um print para ver se tava entrando no task_billie e não printou, não ta chegando nesse script. Mas como disse acho que o problema é o server.

Tem um script de task diaria no meu server que funciona perfeitamente, mata os bixos e conta, e não tem nada dele no login.lua. É em outro arquivo chamado pokedeath.

Tentei adaptar pra fazer um NPC igual esse que vc fez mas n consegui.

Acho que se eu te mandar fica mais facil de entender. Posso mandar aqui?

esse aqui é um script de uma das missoes diarias 
 

Spoiler

function onCreatureTurn(creature)
end

function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end

local talkState = {}
local focus = 0
local talk_start = 0
local lookNpcDir = getNPCXMLLOOKDIR(getNPCXMLNAME(getThis()))
local tchau = false
local opcoesDiarias = {}
local hora = os.date("%d") -- mudar para dias
local dia = os.date("%d")
local strinSay1 = ""
local stringSay2 = ""
local expToGive1 = 186
local expToGive2 = 186
local strinSay1, strinSay2 = "", ""

function onCreatureSay(cid, type, msg)
local msg = string.lower(msg)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if not (getDistanceToCreature(cid) <= 3) then
    return true
end

if msgcontains(string.lower(msg), 'hi') then
    if focus ~= 0 then
       selfSay(getCreatureName(cid) .. ' aguarde...')
       return true
    else
        focus = cid
        talk_start = os.clock()
    end
end


local getNpcTaskName = getPlayerStorageValue(cid, storages.miniQuests.storNpcTaskName3)
local pokeTask1 = getPlayerStorageValue(cid, storages.miniQuests.storPokeNameTask3)
local pokeCountTask1 = tonumber(getPlayerStorageValue(cid, storages.miniQuests.storPokeCountTask3))
local minhaHora = getPlayerStorageValue(cid, storages.miniQuests.storDayTask3)
    
if tonumber(minhaHora) ~= tonumber(hora) then 
    setPlayerStorageValue(cid, storages.miniQuests.storNpcTaskName3, -1)
    setPlayerStorageValue(cid, storages.miniQuests.storPokeNameTask3, -1)
    setPlayerStorageValue(cid, storages.miniQuests.storPokeCountTask3, -1)
    setPlayerStorageValue(cid, storages.miniQuests.storDayTask3, -1)
end

local getNpcTaskName = getPlayerStorageValue(cid, storages.miniQuests.storNpcTaskName3)
local pokeTask1 = getPlayerStorageValue(cid, storages.miniQuests.storPokeNameTask3)
local pokeCountTask1 = tonumber(getPlayerStorageValue(cid, storages.miniQuests.storPokeCountTask3))
local minhaHora = getPlayerStorageValue(cid, storages.miniQuests.storDayTask3)

if pokeTask1 == "amanha" and msgcontains(string.lower(msg), 'hi') then
   selfSay("You have already done a daily task today.")
   talkState[talkUser] = 0
   tchau = true
   focus = 0
   return true    
end   

if ((pokeTask1 == strinSay1 or pokeTask1 == strinSay2) and getNpcTaskName == getCreatureName(getThis())) and msgcontains(string.lower(msg), 'hi') then    
   
   local expToGive = expToGive1
       if pokeTask1 == strinSay2 then    
          expToGive = expToGive2
       end    
   if pokeCountTask1 <= 0 then
       selfSay('Here is your reward.')    
       doPlayerAddExp(cid, expToGive)
       doSendAnimatedText(getThingPos(cid), expToGive, 215)
       setPlayerStorageValue(cid, storages.miniQuests.storPokeNameTask3, "amanha")
   elseif pokeCountTask1 > 0 then
       selfSay('Need to defeat ' .. pokeCountTask1 .. ' ' .. pokeTask1 .. (pokeCountTask1 > 1 and "s" or '') .. '.') 
   end       
   
   talkState[talkUser] = 0
   tchau = true
   focus = 0
   return true    
end

count = 0

    if((msgcontains(string.lower(msg), 'hi') or  msgcontains(string.lower(msg), 'help')) and (getDistanceToCreature(cid) <= 3)) then
    
        local stringToSay1 = ""
        for i = 1, #opcoesDiarias[1] do
            local pokeCount = opcoesDiarias[1][i][2]
            local pokeWord = pokeCount > 1 and "s" or ""
            stringToSay1 = stringToSay1 .. pokeCount .. " " .. opcoesDiarias[1][i][1] .. pokeWord .. (i == 1 and "" or " e ")
        end
        
        local stringToSay2 = ""
        for i = 1, #opcoesDiarias[2] do
            local pokeCount = opcoesDiarias[2][i][2]
            local pokeWord = pokeCount > 1 and "s" or ""
            stringToSay2 = stringToSay2 .. pokeCount .. " " .. opcoesDiarias[2][i][1] .. pokeWord .. (i == 1 and "" or " e ")
        end
        
        selfSay('Hello! My daily tasks are of the easy level. You can kill ' .. stringToSay1 .. " or " .. stringToSay2 .. ".")
        talkState[talkUser] = 1
        
        
    elseif msgcontains(string.lower(msg), string.lower(strinSay1)) or msgcontains(string.lower(msg), string.lower(strinSay2)) and getDistanceToCreature(cid) <= 3 and talkState[talkUser] == 1 then    
        local pokeCounts = 0
        if msgcontains(string.lower(msg), string.lower(strinSay1)) then
            setPlayerStorageValue(cid, storages.miniQuests.storNpcTaskName3, getCreatureName(getThis()))
            setPlayerStorageValue(cid, storages.miniQuests.storPokeNameTask3, opcoesDiarias[1][1][1])
            setPlayerStorageValue(cid, storages.miniQuests.storPokeCountTask3, opcoesDiarias[1][1][2])
            setPlayerStorageValue(cid, storages.miniQuests.storDayTask3, hora)
            pokeCounts = opcoesDiarias[1][1][2]
        else
            setPlayerStorageValue(cid, storages.miniQuests.storNpcTaskName3, getCreatureName(getThis()))
            setPlayerStorageValue(cid, storages.miniQuests.storPokeNameTask3, opcoesDiarias[2][1][1])
            setPlayerStorageValue(cid, storages.miniQuests.storPokeCountTask3, opcoesDiarias[2][1][2])
            setPlayerStorageValue(cid, storages.miniQuests.storDayTask3, hora)
            pokeCounts = opcoesDiarias[2][1][2]
        end

        selfSay('Okay. I will keep in touch with you. Good luck with ' .. pokeCounts.. ' ' .. msg .. (pokeCounts > 1 and 's' or '') .. '.')
        talkState[talkUser] = 0
        focus = 0
        tchau = true
        return true
    end
end


local tablePoke = diarias.Easy 
local dificult = 1
function onThink()
    -- resetar tasks
    if hora ~= os.date("%d") then
       opcoesDiarias = {}
       tablePoke = diarias.Easy 
       hora = os.date("%d")
    end
    
    if #opcoesDiarias == 0 then -- vamos iniciar as opcoesDiarias
        
        local sorteio1 = math.random(1, #tablePoke)
        local op1 = tablePoke[sorteio1]
                   table.remove(tablePoke, sorteio1)
                   strinSay1 = op1
                   
        local sorteio2 = math.random(1, #tablePoke)
        local op2 = tablePoke[sorteio2]
                   table.remove(tablePoke, sorteio2)
                   strinSay2 = op2
                       
        local pokeCount1 = math.random(30, 80)    * dificult
        local pokeCount2 = math.random(30, 80)    * dificult
        opcoesDiarias[1] = { {op1, pokeCount1} }
        opcoesDiarias[2] = { {op2, pokeCount2} }
        
        expToGive1 = 186 * pokeCount1
        expToGive2 = 186 * pokeCount2
    end

    if focus  ~= 0 then
        if getDistanceToCreature(focus) > 3 then
            tchau = true
            focus = 0
        end

        if (os.clock() - talk_start) > 15 then
            if focus > 0 then
                tchau = true
                focus = 0
            end
        end
        doNpcSetCreatureFocus(focus)
    end

        if tchau then
            tchau = false
            doCreatureSetLookDir(getThis(), lookNpcDir)
            selfSay('Goodbye.')
        end
end

e esse aqui é a parte que conta as diarias: no caso tem 4 pq são 4 diarias. Eles estão em um arquivos chamado pokeDeath.lua em \data\creaturescripts\scripts

Spoiler

function checkDirias(cid, nameDeath)

        local master = getCreatureMaster(cid)
        local getNpcTaskName = getPlayerStorageValue(master, storages.miniQuests.storNpcTaskName)
        local pokeTask1 = getPlayerStorageValue(master, storages.miniQuests.storPokeNameTask1)
        local pokeCountTask1 = tonumber(getPlayerStorageValue(master, storages.miniQuests.storPokeCountTask1))
        
       if pokeTask1 ~= -1 and pokeTask1 == nameDeath then
          setPlayerStorageValue(master, storages.miniQuests.storPokeCountTask1, pokeCountTask1 -1) 
          local getCountNow = tonumber(getPlayerStorageValue(master, storages.miniQuests.storPokeCountTask1))
          if getCountNow >= 1 then
             doSendMsg(master, getNpcTaskName .. ": Need to defeat " .. getCountNow .. " " .. nameDeath .. (getCountNow > 1 and "s" or "") .. ".")
          else
             doSendMsg(master, getNpcTaskName .. ": You have completed my task come and get your reward.")
          end
       end
       
        local getNpcTaskName2 = getPlayerStorageValue(master, storages.miniQuests.storNpcTaskName2)
        local pokeTask2 = getPlayerStorageValue(master, storages.miniQuests.storPokeNameTask2)
        local pokeCountTask2 = tonumber(getPlayerStorageValue(master, storages.miniQuests.storPokeCountTask2))
        
       if pokeTask2 ~= -1 and pokeTask2 == nameDeath then
          setPlayerStorageValue(master, storages.miniQuests.storPokeCountTask2, pokeCountTask2 -1) 
          local getCountNow2 = tonumber(getPlayerStorageValue(master, storages.miniQuests.storPokeCountTask2))
          if getCountNow2 >= 1 then
             doSendMsg(master, getNpcTaskName2 .. ": Need to defeat " .. getCountNow2 .. " " .. nameDeath .. (getCountNow2 > 1 and "s" or "") .. ".")
          else
             doSendMsg(master, getNpcTaskName2 .. ": You have completed my task come and get your reward.")
          end
       end
       
       local getNpcTaskName3 = getPlayerStorageValue(master, storages.miniQuests.storNpcTaskName3)
       local pokeTask3 = getPlayerStorageValue(master, storages.miniQuests.storPokeNameTask3)
       local pokeCountTask3 = tonumber(getPlayerStorageValue(master, storages.miniQuests.storPokeCountTask3))
        
       if pokeTask3 ~= -1 and pokeTask3 == nameDeath then
          setPlayerStorageValue(master, storages.miniQuests.storPokeCountTask3, pokeCountTask3 -1) 
          local getCountNow3 = tonumber(getPlayerStorageValue(master, storages.miniQuests.storPokeCountTask3))
          if getCountNow3 >= 1 then
             doSendMsg(master, getNpcTaskName3 .. ": Need to defeat " .. getCountNow3 .. " " .. nameDeath .. (getCountNow3 > 1 and "s" or "") .. ".")
          else
             doSendMsg(master, getNpcTaskName3 .. ": You have completed my task come and get your reward.")
          end
       end
       
       local getNpcTaskName4 = getPlayerStorageValue(master, storages.miniQuests.storNpcTaskName4)
       local pokeTask4 = getPlayerStorageValue(master, storages.miniQuests.storPokeNameTask4)
       local pokeCountTask4 = tonumber(getPlayerStorageValue(master, storages.miniQuests.storPokeCountTask4))
        
       if pokeTask4 ~= -1 and pokeTask4 == nameDeath then
          setPlayerStorageValue(master, storages.miniQuests.storPokeCountTask4, pokeCountTask4 -1) 
          local getCountNow4 = tonumber(getPlayerStorageValue(master, storages.miniQuests.storPokeCountTask4))
          if getCountNow4 >= 1 then
             doSendMsg(master, getNpcTaskName4 .. ": Need to defeat " .. getCountNow4 .. " " .. nameDeath .. (getCountNow4 > 1 and "s" or "") .. ".")
          else
             doSendMsg(master, getNpcTaskName4 .. ": You have completed my task come and get your reward.")
          end
       end
end

 

@WhiteBubble

 

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.6k

Informação Importante

Confirmação de Termo