Ir para conteúdo

[Encerrado] Porta pra clan


waata

Posts Recomendados

Olá Xtibianos, estou precisando de uma ajudinha.

 

Essa eh a porta que eu uso pra outland, onde o player precisa de level 499 pra passar.

Quero fazer uma porta pra cada clan level minimo 300(ex: uma porta só seavell rank5 lv300 pode entrar, outra só raibolt rank5 lv300, etc)

 

 

--
function onUse(cid, item, frompos, item2, topos)


tele = {x=915, y=627, z=8}
if item.uid ==2721 then
vocation = getPlayerVocation(cid)
if vocation == 1 and getPlayerLevel(cid) > 499 then
doTeleportThing(cid,tele)
doPlayerSendTextMessage(cid,22,"Bem-vindo a Outland.")
elseif vocation == 1 and getPlayerLevel(cid) > 499 then
doTeleportThing(cid,tele)
doPlayerSendTextMessage(cid,22,"Bem-vindo a Outland.")
elseif vocation == 1 and getPlayerLevel(cid) > 499 then
doTeleportThing(cid,tele)
doPlayerSendTextMessage(cid,22,"Bem-vindo a Outland.")
elseif vocation == 1 and getPlayerLevel(cid) > 499 then
doTeleportThing(cid,tele)
doPlayerSendTextMessage(cid,22,"Bem-vindo a Outland.")


else
doPlayerSendTextMessage(cid,22,"Você Precisa estar level 500+ para entrar")
end
return 0
end
return 1
end

 

 

 

valew!

Editado por waata
Link para o comentário
Compartilhar em outros sites

Eu n manjo mto desse sist de clan então vou postar pra vc ver:

naturia

 

 

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


---------------------- Configs --------------------------- 
local clanNpcs = {
["Seed Trainer"] = {
                       task1 = {
                             ["Seed Trainer"] = {{"Graveler", 1}, {"Starmie", 1}, {"Onix", 1}},
                       },                     
                       task2 = {
                             ["Seed Trainer"] = {{"Marowak", 1}, {"Blastoise", 1}, {"Golem", 1}},
                       },
                       itens = {{12163, 1}, {12202, 1}, {12183, 1}},
                       poke = "Tangela",
                       level = 90,
                       prevRank = 1,
                       nextRank = 2,
},
["Sprout Trainer"] = {
                       task1 = {
                             ["Sprout Trainer"] = {{"Graveler", 1}, {"Starmie", 1}, {"Onix", 1}},
                       },                     
                       task2 = {
                             ["Sprout Trainer"] = {{"Marowak", 1}, {"Blastoise", 1}, {"Golem", 1}},
                       },
                       itens = {{12163, 1}, {12202, 1}, {12183, 1}},
                       poke = "Pinsir",
                       level = 100,
                       prevRank = 2,
                       nextRank = 3,
},
["Webhead Trainer"] = {
                       task1 = {
                             ["Webhead Trainer"] = {{"Graveler", 1}, {"Starmie", 1}, {"Onix", 1}},
                       },                     
                       task2 = {
                             ["Webhead Trainer"] = {{"Marowak", 1}, {"Blastoise", 1}, {"Golem", 1}},
                       },
                       itens = {{12163, 1}, {12202, 1}, {12183, 1}},
                       poke = "Scyther",
                       level = 110,
                       prevRank = 3,
                       nextRank = 4,
},
["Woodtrunk Trainer"] = {
                       task1 = {
                             ["Woodtrunk Trainer"] = {{"Graveler", 1}, {"Starmie", 1}, {"Onix", 1}},
                       },                     
                       task2 = {
                             ["Woodtrunk Trainer"] = {{"Marowak", 1}, {"Blastoise", 1}, {"Golem", 1}},
                       },
                       itens = {{12163, 1}, {12202, 1}, {12183, 1}},
                       poke = "venusaur",
                       level = 120,
                       prevRank = 4,
                       nextRank = 5,
},
}
------------------------------------------------------------------------------
local npc = clanNpcs[getNpcName()]
       
         if msgcontains(msg, 'help') or msgcontains(msg, 'Help') then
            if getPlayerLevel(cid) < npc.level or getPlayerClanName(cid) ~= 'Naturia' or getPlayerClanRank(cid) ~= npc.prevRank then
               selfSay("I don't need your help!", cid)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) <= -1 then
               selfSay("So you want to move up of rank on our clan... So, you need to bring some items to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               selfSay("So you brought to me the items what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("The next step is you caught a pokemon to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then
               selfSay("So you caught the pokemon what i asked for?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 4 then
               selfSay("Now you need to do some tasks for me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 5 then
               selfSay("So you finished the first task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 6 then
               selfSay("And now comes the last task... Do you wanna to begin it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               selfSay("So you finished the last task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            end      
         elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then 
            if getPlayerStorageValue(cid, 854789) <= -1 then
               local str = "Ok then, you need bring to me: "
               for a = 1, #npc.itens do
                   str = str..(a == #npc.itens and " and " or a ~= 1 and ", " or "{")..(npc.itens[a][2]).." "..(getItemNameById(npc.itens[a][1]))
               end 
               str = str.."}, come back when you join those items!"   
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 1)
               talkState[talkUser] = 0 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               local check = checkItensForTask(cid, npc.itens)
               if check == 0 then
                  selfSay("Ok then, you completed the mission, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 2)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay(check, cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("Ok then, you need to caught a {"..(npc.poke).."}, and bring it to me... Come back when you do that!", cid)
               setPlayerStorageValue(cid, 854789, 3)
               setPlayerStorageValue(cid, 854788, npc.poke)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then 
               if getPlayerStorageValue(cid, 854788) == 'done' then
                  selfSay("Very well, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 4)
                  setPlayerStorageValue(cid, 854788, -1)
                  setPlayerStorageValue(cid, 854787, npc.poke)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay("You didn't caught the pokemon what i asked for! Go do it!", cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 4 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't get more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now you need to kill: {"
               for e, f in pairs(npc.task1) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 5)
               setStorageArray(cid, sto, npc.task1)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 5 then 
               if isMyTaskComplete(cid, getNpcCid()) then
                  selfSay("Very well, you have done my first task... Talk to me again when you want to continue!", cid) 
                  local sto = getMyTaskSto(cid, getNpcCid())
                  setPlayerStorageValue(cid, sto, -1)
                  setPlayerStorageValue(cid, 854789, 6)
                  talkState[talkUser] = 0
                  return true
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 6 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't catch more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now for your last task you need to kill: {"
               for e, f in pairs(npc.task2) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 7)
               setStorageArray(cid, sto, npc.task2)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               if isMyTaskComplete(cid, getNpcCid()) then
                  ---
                  local storages = {17000, 63215, 17001, 13008, 5700}     --alterado v1.8
                  for s = 1, #storages do
                      if getPlayerStorageValue(cid, storages[s]) >= 1 then
                         selfSay("You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!", cid) 
                         talkState[talkUser] = 0
                         return true
                      end
                  end
                  if #getCreatureSummons(cid) >= 1 then     --alterado v1.8
                     selfSay("Return your pokemon!", cid) 
                     talkState[talkUser] = 0
                     return true
                  end  
                  ---
                  if checkPokemonForTask(cid, npc.poke) then
                     setPlayerClanRank(cid, npc.nextRank)
                     selfSay("So you complete my last task! Congradulations! Now you move up of rank and become {"..lookClans[getPlayerClanNum(cid)][getPlayerClanRank(cid)].."}!", cid)
                     setPlayerStorageValue(cid, 854789, -1)
                     setPlayerStorageValue(cid, 854787, -1)
                     local sto = getMyTaskSto(cid, getNpcCid())
                     setPlayerStorageValue(cid, sto, -1)
                     talkState[talkUser] = 0
                     return true
                  else
                     selfSay("You aren't with the "..(npc.poke).." which you caught before in your pokebag! Go get it!", cid)
                     talkState[talkUser] = 0
                     return true
                  end   
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end        
            end
         end
              
return true
end


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

 

 

Gardestrike:

 

 

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


---------------------- Configs --------------------------- 
local clanNpcs = {
["Fist Trainer"] = {
                       task1 = {
                             ["Fist Trainer"] = {{"Graveler", 1}, {"Onix", 1}, {"Clefable", 1}},
                       },                     
                       task2 = {
                             ["Fist Trainer"] = {{"Golem", 1}, {"Jynx", 1}, {"Kangaskhan", 1}},
                       },
                       itens = {{12173, 1}, {12179, 1}, {12192, 1}},
                       poke = "Primeape",
                       level = 90,
                       prevRank = 1,
                       nextRank = 2,
},
["Tamer Trainer"] = {
                       task1 = {
                             ["Tamer Trainer"] = {{"Graveler", 1}, {"Onix", 1}, {"Clefable", 1}},
                       },                     
                       task2 = {
                             ["Tamer Trainer"] = {{"Golem", 1}, {"Jynx", 1}, {"Kangaskhan", 1}},
                       },
                       itens = {{12173, 1}, {12179, 1}, {12192, 1}},
                       poke = "Clefable",
                       level = 100,
                       prevRank = 2,
                       nextRank = 3,
},
["Fighter Trainer"] = {
                       task1 = {
                             ["Fighter Trainer"] = {{"Graveler", 1}, {"Onix", 1}, {"Clefable", 1}},
                       },                     
                       task2 = {
                             ["Fighter Trainer"] = {{"Golem", 1}, {"Jynx", 1}, {"Kangaskhan", 1}},
                       },
                       itens = {{12173, 1}, {12179, 1}, {12192, 1}},
                       poke = "Machamp",
                       level = 110,
                       prevRank = 3,
                       nextRank = 4,
},
["DeathHand Trainer"] = {
                       task1 = {
                             ["DeathHand Trainer"] = {{"Graveler", 1}, {"Onix", 1}, {"Clefable", 1}},
                       },                     
                       task2 = {
                             ["DeathHand Trainer"] = {{"Golem", 1}, {"Jynx", 1}, {"Kangaskhan", 1}},
                       },
                       itens = {{12173, 1}, {12179, 1}, {12192, 1}},
                       poke = "Snorlax",
                       level = 120,
                       prevRank = 4,
                       nextRank = 5,
},
}
------------------------------------------------------------------------------
local npc = clanNpcs[getNpcName()]
       
         if msgcontains(msg, 'help') or msgcontains(msg, 'Help') then
            if getPlayerLevel(cid) < npc.level or getPlayerClanName(cid) ~= 'Gardestrike' or getPlayerClanRank(cid) ~= npc.prevRank then
               selfSay("I don't need your help!", cid)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) <= -1 then
               selfSay("So you want to move up of rank on our clan... So, you need to bring some items to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               selfSay("So you brought to me the items what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("The next step is you caught a pokemon to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then
               selfSay("So you caught the pokemon what i asked for?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 4 then
               selfSay("Now you need to do some tasks for me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 5 then
               selfSay("So you finished the first task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 6 then
               selfSay("And now comes the last task... Do you wanna to begin it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               selfSay("So you finished the last task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            end      
         elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then 
            if getPlayerStorageValue(cid, 854789) <= -1 then
               local str = "Ok then, you need bring to me: "
               for a = 1, #npc.itens do
                   str = str..(a == #npc.itens and " and " or a ~= 1 and ", " or "{")..(npc.itens[a][2]).." "..(getItemNameById(npc.itens[a][1]))
               end 
               str = str.."}, come back when you join those items!"   
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 1)
               talkState[talkUser] = 0 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               local check = checkItensForTask(cid, npc.itens)
               if check == 0 then
                  selfSay("Ok then, you completed the mission, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 2)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay(check, cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("Ok then, you need to caught a {"..(npc.poke).."}, and bring it to me... Come back when you do that!", cid)
               setPlayerStorageValue(cid, 854789, 3)
               setPlayerStorageValue(cid, 854788, npc.poke)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then 
               if getPlayerStorageValue(cid, 854788) == 'done' then
                  selfSay("Very well, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 4)
                  setPlayerStorageValue(cid, 854788, -1)
                  setPlayerStorageValue(cid, 854787, npc.poke)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay("You didn't caught the pokemon what i asked for! Go do it!", cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 4 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't get more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now you need to kill: {"
               for e, f in pairs(npc.task1) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 5)
               setStorageArray(cid, sto, npc.task1)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 5 then 
               if isMyTaskComplete(cid, getNpcCid()) then
                  selfSay("Very well, you have done my first task... Talk to me again when you want to continue!", cid) 
                  local sto = getMyTaskSto(cid, getNpcCid())
                  setPlayerStorageValue(cid, sto, -1)
                  setPlayerStorageValue(cid, 854789, 6)
                  talkState[talkUser] = 0
                  return true
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 6 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't catch more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now for your last task you need to kill: {"
               for e, f in pairs(npc.task2) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 7)
               setStorageArray(cid, sto, npc.task2)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               if isMyTaskComplete(cid, getNpcCid()) then
                  ---
                  local storages = {17000, 63215, 17001, 13008, 5700}  --alterado v1.8
                  for s = 1, #storages do
                      if getPlayerStorageValue(cid, storages[s]) >= 1 then
                         selfSay("You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!", cid) 
                         talkState[talkUser] = 0
                         return true
                      end
                  end
                  if #getCreatureSummons(cid) >= 1 then     --alterado v1.8
                     selfSay("Return your pokemon!", cid) 
                     talkState[talkUser] = 0
                     return true
                  end   
                  ---
                  if checkPokemonForTask(cid, npc.poke) then
                     setPlayerClanRank(cid, npc.nextRank)
                     selfSay("So you complete my last task! Congradulations! Now you move up of rank and become {"..lookClans[getPlayerClanNum(cid)][getPlayerClanRank(cid)].."}!", cid)
                     setPlayerStorageValue(cid, 854789, -1)
                     setPlayerStorageValue(cid, 854787, -1)
                     local sto = getMyTaskSto(cid, getNpcCid())
                     setPlayerStorageValue(cid, sto, -1)
                     talkState[talkUser] = 0
                     return true
                  else
                     selfSay("You aren't with the "..(npc.poke).." which you caught before in your pokebag! Go get it!", cid)
                     talkState[talkUser] = 0
                     return true
                  end   
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end        
            end
         end
              
return true
end


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

 

 

Malefic:

 

 

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


---------------------- Configs --------------------------- 
local clanNpcs = {
["Troublemaker Trainer"] = {
                       task1 = {
                             ["Troublemaker Trainer"] = {{"Haunter", 1}, {"Kadabra", 1}, {"Drowzee", 1}},
                       },                     
                       task2 = {
                             ["Troublemaker Trainer"] = {{"Gengar", 1}, {"Alakazam", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12165, 1}, {12202, 1}, {12204, 1}},
                       poke = "Weezing",
                       level = 90,
                       prevRank = 1,
                       nextRank = 2,
},
["Venomancer Trainer"] = {
                       task1 = {
                             ["Venomancer Trainer"] = {{"Haunter", 1}, {"Kadabra", 1}, {"Drowzee", 1}},
                       },                     
                       task2 = {
                             ["Venomancer Trainer"] = {{"Gengar", 1}, {"Alakazam", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12165, 1}, {12202, 1}, {12204, 1}},
                       poke = "Haunter",
                       level = 100,
                       prevRank = 2,
                       nextRank = 3,
},
["Spectre Trainer"] = {
                       task1 = {
                             ["Spectre Trainer"] = {{"Haunter", 1}, {"Kadabra", 1}, {"Drowzee", 1}},
                       },                     
                       task2 = {
                             ["Spectre Trainer"] = {{"Gengar", 1}, {"Alakazam", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12165, 1}, {12202, 1}, {12204, 1}},
                       poke = "Nidoking",
                       level = 110,
                       prevRank = 3,
                       nextRank = 4,
},
["Nightwalker Trainer"] = {
                       task1 = {
                             ["Nightwalker Trainer"] = {{"Haunter", 1}, {"Kadabra", 1}, {"Drowzee", 1}},
                       },                     
                       task2 = {
                             ["Nightwalker Trainer"] = {{"Gengar", 1}, {"Alakazam", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12165, 1}, {12202, 1}, {12204, 1}},
                       poke = "Gengar",
                       level = 120,
                       prevRank = 4,
                       nextRank = 5,
},
}
------------------------------------------------------------------------------
local npc = clanNpcs[getNpcName()]
       
         if msgcontains(msg, 'help') or msgcontains(msg, 'Help') then
            if getPlayerLevel(cid) < npc.level or getPlayerClanName(cid) ~= 'Malefic' or getPlayerClanRank(cid) ~= npc.prevRank then
               selfSay("I don't need your help!", cid)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) <= -1 then
               selfSay("So you want to move up of rank on our clan... So, you need to bring some items to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               selfSay("So you brought to me the items what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("The next step is you caught a pokemon to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then
               selfSay("So you caught the pokemon what i asked for?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 4 then
               selfSay("Now you need to do some tasks for me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 5 then
               selfSay("So you finished the first task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 6 then
               selfSay("And now comes the last task... Do you wanna to begin it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               selfSay("So you finished the last task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            end      
         elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then 
            if getPlayerStorageValue(cid, 854789) <= -1 then
               local str = "Ok then, you need bring to me: "
               for a = 1, #npc.itens do
                   str = str..(a == #npc.itens and " and " or a ~= 1 and ", " or "{")..(npc.itens[a][2]).." "..(getItemNameById(npc.itens[a][1]))
               end 
               str = str.."}, come back when you join those items!"   
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 1)
               talkState[talkUser] = 0 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               local check = checkItensForTask(cid, npc.itens)
               if check == 0 then
                  selfSay("Ok then, you completed the mission, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 2)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay(check, cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("Ok then, you need to caught a {"..(npc.poke).."}, and bring it to me... Come back when you do that!", cid)
               setPlayerStorageValue(cid, 854789, 3)
               setPlayerStorageValue(cid, 854788, npc.poke)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then 
               if getPlayerStorageValue(cid, 854788) == 'done' then
                  selfSay("Very well, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 4)
                  setPlayerStorageValue(cid, 854788, -1)
                  setPlayerStorageValue(cid, 854787, npc.poke)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay("You didn't caught the pokemon what i asked for! Go do it!", cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 4 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't get more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now you need to kill: {"
               for e, f in pairs(npc.task1) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 5)
               setStorageArray(cid, sto, npc.task1)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 5 then 
               if isMyTaskComplete(cid, getNpcCid()) then
                  selfSay("Very well, you have done my first task... Talk to me again when you want to continue!", cid) 
                  local sto = getMyTaskSto(cid, getNpcCid())
                  setPlayerStorageValue(cid, sto, -1)
                  setPlayerStorageValue(cid, 854789, 6)
                  talkState[talkUser] = 0
                  return true
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 6 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't catch more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now for your last task you need to kill: {"
               for e, f in pairs(npc.task2) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 7)
               setStorageArray(cid, sto, npc.task2)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               if isMyTaskComplete(cid, getNpcCid()) then
                  ---
                  local storages = {17000, 63215, 17001, 13008, 5700}   --alterado v1.8
                  for s = 1, #storages do
                      if getPlayerStorageValue(cid, storages[s]) >= 1 then
                         selfSay("You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!", cid) 
                         talkState[talkUser] = 0
                         return true
                      end
                  end
                  if #getCreatureSummons(cid) >= 1 then     --alterado v1.8
                     selfSay("Return your pokemon!", cid) 
                     talkState[talkUser] = 0
                     return true
                  end  
                  ---
                  if checkPokemonForTask(cid, npc.poke) then
                     setPlayerClanRank(cid, npc.nextRank)
                     selfSay("So you complete my last task! Congradulations! Now you move up of rank and become {"..lookClans[getPlayerClanNum(cid)][getPlayerClanRank(cid)].."}!", cid)
                     setPlayerStorageValue(cid, 854789, -1)
                     setPlayerStorageValue(cid, 854787, -1)
                     local sto = getMyTaskSto(cid, getNpcCid())
                     setPlayerStorageValue(cid, sto, -1)
                     talkState[talkUser] = 0
                     return true
                  else
                     selfSay("You aren't with the "..(npc.poke).." which you caught before in your pokebag! Go get it!", cid)
                     talkState[talkUser] = 0
                     return true
                  end   
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end        
            end
         end
              
return true
end


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

 

 

Orebound:

 

 

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


---------------------- Configs --------------------------- 
local clanNpcs = {
["Sand Trainer"] = {
                       task1 = {
                             ["Sand Trainer"] = {{"Magneton", 1}, {"Charmeleon", 1}, {"Graveler", 1}},
                       },                     
                       task2 = {
                             ["Sand Trainer"] = {{"Nidoqueen", 1}, {"Onix", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12337, 1}, {12208, 1}, {12177, 1}},
                       poke = "Marowak",
                       level = 90,
                       prevRank = 1,
                       nextRank = 2,
},
["Rock Trainer"] = {
                       task1 = {
                             ["Rock Trainer"] = {{"Graveler", 1}, {"Venomoth", 1}, {"Kadabra", 1}, {"Electrode", 1}},
                       },                     
                       task2 = {
                             ["Rock Trainer"] = {{"Golem", 1}, {"Alakazam", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12337, 1}, {12208, 1}, {12177, 1}},
                       poke = "Onix",
                       level = 100,
                       prevRank = 2,
                       nextRank = 3,
},
["Solid Trainer"] = {
                       task1 = {
                             ["Solid Trainer"] = {{"Graveler", 1}, {"Venomoth", 1}, {"Kadabra", 1}, {"Electrode", 1}},
                       },                     
                       task2 = {
                             ["Solid Trainer"] = {{"Golem", 1}, {"Alakazam", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12337, 1}, {12208, 1}, {12177, 1}},
                       poke = "Sandslash",
                       level = 110,
                       prevRank = 3,
                       nextRank = 4,
},
["Hardskin Trainer"] = {
                       task1 = {
                             ["Hardskin Trainer"] = {{"Graveler", 1}, {"Venomoth", 1}, {"Kadabra", 1}, {"Electrode", 1}},
                       },                     
                       task2 = {
                             ["Hardskin Trainer"] = {{"Golem", 1}, {"Alakazam", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12337, 1}, {12208, 1}, {12177, 1}},
                       poke = "Rhydon",
                       level = 120,
                       prevRank = 4,
                       nextRank = 5,
},
}
------------------------------------------------------------------------------
local npc = clanNpcs[getNpcName()]
       
         if msgcontains(msg, 'help') or msgcontains(msg, 'Help') then
            if getPlayerLevel(cid) < npc.level or getPlayerClanName(cid) ~= 'Orebound' or getPlayerClanRank(cid) ~= npc.prevRank then
               selfSay("I don't need your help!", cid)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) <= -1 then
               selfSay("So you want to move up of rank on our clan... So, you need to bring some items to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               selfSay("So you brought to me the items what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("The next step is you caught a pokemon to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then
               selfSay("So you caught the pokemon what i asked for?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 4 then
               selfSay("Now you need to do some tasks for me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 5 then
               selfSay("So you finished the first task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 6 then
               selfSay("And now comes the last task... Do you wanna to begin it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               selfSay("So you finished the last task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            end      
         elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then 
            if getPlayerStorageValue(cid, 854789) <= -1 then
               local str = "Ok then, you need bring to me: "
               for a = 1, #npc.itens do
                   str = str..(a == #npc.itens and " and " or a ~= 1 and ", " or "{")..(npc.itens[a][2]).." "..(getItemNameById(npc.itens[a][1]))
               end 
               str = str.."}, come back when you join those items!"   
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 1)
               talkState[talkUser] = 0 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               local check = checkItensForTask(cid, npc.itens)
               if check == 0 then
                  selfSay("Ok then, you completed the mission, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 2)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay(check, cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("Ok then, you need to caught a {"..(npc.poke).."}, and bring it to me... Come back when you do that!", cid)
               setPlayerStorageValue(cid, 854789, 3)
               setPlayerStorageValue(cid, 854788, npc.poke)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then 
               if getPlayerStorageValue(cid, 854788) == 'done' then
                  selfSay("Very well, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 4)
                  setPlayerStorageValue(cid, 854788, -1)
                  setPlayerStorageValue(cid, 854787, npc.poke)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay("You didn't caught the pokemon what i asked for! Go do it!", cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 4 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't get more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now you need to kill: {"
               for e, f in pairs(npc.task1) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 5)
               setStorageArray(cid, sto, npc.task1)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 5 then 
               if isMyTaskComplete(cid, getNpcCid()) then
                  selfSay("Very well, you have done my first task... Talk to me again when you want to continue!", cid) 
                  local sto = getMyTaskSto(cid, getNpcCid())
                  setPlayerStorageValue(cid, sto, -1)
                  setPlayerStorageValue(cid, 854789, 6)
                  talkState[talkUser] = 0
                  return true
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 6 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't catch more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now for your last task you need to kill: {"
               for e, f in pairs(npc.task2) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 7)
               setStorageArray(cid, sto, npc.task2)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               if isMyTaskComplete(cid, getNpcCid()) then
                  ---
                  local storages = {17000, 63215, 17001, 13008, 5700}     --alterado v1.8
                  for s = 1, #storages do
                      if getPlayerStorageValue(cid, storages[s]) >= 1 then
                         selfSay("You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!", cid) 
                         talkState[talkUser] = 0
                         return true 
                      end
                  end
                  if #getCreatureSummons(cid) >= 1 then     --alterado v1.8
                     selfSay("Return your pokemon!", cid) 
                     talkState[talkUser] = 0
                     return true
                  end  
                  ---
                  if checkPokemonForTask(cid, npc.poke) then
                     setPlayerClanRank(cid, npc.nextRank)
                     selfSay("So you complete my last task! Congradulations! Now you move up of rank and become {"..lookClans[getPlayerClanNum(cid)][getPlayerClanRank(cid)].."}!", cid)
                     setPlayerStorageValue(cid, 854789, -1)
                     setPlayerStorageValue(cid, 854787, -1)
                     local sto = getMyTaskSto(cid, getNpcCid())
                     setPlayerStorageValue(cid, sto, -1)
                     talkState[talkUser] = 0
                     return true
                  else
                     selfSay("You aren't with the "..(npc.poke).." which you caught before in your pokebag! Go get it!", cid)
                     talkState[talkUser] = 0
                     return true
                  end   
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end        
            end
         end
              
return true
end


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

 

 

Psycraft:

 

 

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


---------------------- Configs --------------------------- 
local clanNpcs = {
["Mind Trainer"] = {
                       task1 = {
                             ["Mind Trainer"] = {{"Primeape", 1}, {"Machoke", 1}, {"Arbok", 1}},
                       },                     
                       task2 = {
                             ["Mind Trainer"] = {{"Machamp", 1}, {"Venomoth", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12194, 1}, {12193, 1}, {12166, 1}},
                       poke = "Kadabra",
                       level = 90,
                       prevRank = 1,
                       nextRank = 2,
},
["Brain Trainer"] = {
                       task1 = {
                             ["Brain Trainer"] = {{"Primeape", 1}, {"Machoke", 1}, {"Arbok", 1}},
                       },                     
                       task2 = {
                             ["Brain Trainer"] = {{"Machamp", 1}, {"Venomoth", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12194, 1}, {12193, 1}, {12166, 1}},
                       poke = "Hypno",
                       level = 100,
                       prevRank = 2,
                       nextRank = 3,
},
["Scholar Trainer"] = {
                       task1 = {
                             ["Scholar Trainer"] = {{"Primeape", 1}, {"Machoke", 1}, {"Arbok", 1}},
                       },                     
                       task2 = {
                             ["Scholar Trainer"] = {{"Machamp", 1}, {"Venomoth", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12194, 1}, {12193, 1}, {12166, 1}},
                       poke = "Mr. Mime",
                       level = 110,
                       prevRank = 3,
                       nextRank = 4,
},
["Telepath Trainer"] = {
                       task1 = {
                             ["Telepath Trainer"] = {{"Primeape", 1}, {"Machoke", 1}, {"Arbok", 1}},
                       },                     
                       task2 = {
                             ["Telepath Trainer"] = {{"Machamp", 1}, {"Venomoth", 1}, {"Nidoking", 1}},
                       },
                       itens = {{12194, 1}, {12193, 1}, {12166, 1}},
                       poke = "Alakazam",
                       level = 120,
                       prevRank = 4,
                       nextRank = 5,
},
}
------------------------------------------------------------------------------
local npc = clanNpcs[getNpcName()]
       
         if msgcontains(msg, 'help') or msgcontains(msg, 'Help') then
            if getPlayerLevel(cid) < npc.level or getPlayerClanName(cid) ~= 'Psycraft' or getPlayerClanRank(cid) ~= npc.prevRank then
               selfSay("I don't need your help!", cid)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) <= -1 then
               selfSay("So you want to move up of rank on our clan... So, you need to bring some items to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               selfSay("So you brought to me the items what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("The next step is you caught a pokemon to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then
               selfSay("So you caught the pokemon what i asked for?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 4 then
               selfSay("Now you need to do some tasks for me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 5 then
               selfSay("So you finished the first task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 6 then
               selfSay("And now comes the last task... Do you wanna to begin it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               selfSay("So you finished the last task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            end      
         elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then 
            if getPlayerStorageValue(cid, 854789) <= -1 then
               local str = "Ok then, you need bring to me: "
               for a = 1, #npc.itens do
                   str = str..(a == #npc.itens and " and " or a ~= 1 and ", " or "{")..(npc.itens[a][2]).." "..(getItemNameById(npc.itens[a][1]))
               end 
               str = str.."}, come back when you join those items!"   
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 1)
               talkState[talkUser] = 0 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               local check = checkItensForTask(cid, npc.itens)
               if check == 0 then
                  selfSay("Ok then, you completed the mission, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 2)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay(check, cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("Ok then, you need to caught a {"..(npc.poke).."}, and bring it to me... Come back when you do that!", cid)
               setPlayerStorageValue(cid, 854789, 3)
               setPlayerStorageValue(cid, 854788, npc.poke)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then 
               if getPlayerStorageValue(cid, 854788) == 'done' then
                  selfSay("Very well, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 4)
                  setPlayerStorageValue(cid, 854788, -1)
                  setPlayerStorageValue(cid, 854787, npc.poke)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay("You didn't caught the pokemon what i asked for! Go do it!", cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 4 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't get more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now you need to kill: {"
               for e, f in pairs(npc.task1) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 5)
               setStorageArray(cid, sto, npc.task1)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 5 then 
               if isMyTaskComplete(cid, getNpcCid()) then
                  selfSay("Very well, you have done my first task... Talk to me again when you want to continue!", cid) 
                  local sto = getMyTaskSto(cid, getNpcCid())
                  setPlayerStorageValue(cid, sto, -1)
                  setPlayerStorageValue(cid, 854789, 6)
                  talkState[talkUser] = 0
                  return true
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 6 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't catch more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now for your last task you need to kill: {"
               for e, f in pairs(npc.task2) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 7)
               setStorageArray(cid, sto, npc.task2)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               if isMyTaskComplete(cid, getNpcCid()) then
                  ---
                  local storages = {17000, 63215, 17001, 13008, 5700}     --alterado v1.8
                  for s = 1, #storages do
                      if getPlayerStorageValue(cid, storages[s]) >= 1 then
                         selfSay("You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!", cid) 
                         talkState[talkUser] = 0
                         return true
                      end
                  end
                  if #getCreatureSummons(cid) >= 1 then     --alterado v1.8
                     selfSay("Return your pokemon!", cid) 
                     talkState[talkUser] = 0
                     return true
                  end  
                  ---
                  if checkPokemonForTask(cid, npc.poke) then
                     setPlayerClanRank(cid, npc.nextRank)
                     selfSay("So you complete my last task! Congradulations! Now you move up of rank and become {"..lookClans[getPlayerClanNum(cid)][getPlayerClanRank(cid)].."}!", cid)
                     setPlayerStorageValue(cid, 854789, -1)
                     setPlayerStorageValue(cid, 854787, -1)
                     local sto = getMyTaskSto(cid, getNpcCid())
                     setPlayerStorageValue(cid, sto, -1)
                     talkState[talkUser] = 0
                     return true
                  else
                     selfSay("You aren't with the "..(npc.poke).." which you caught before in your pokebag! Go get it!", cid)
                     talkState[talkUser] = 0
                     return true
                  end   
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end        
            end
         end
              
return true
end


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

 

 

Raibolt:

 

 

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


---------------------- Configs --------------------------- 
local clanNpcs = {
["Shock Trainer"] = {
                       task1 = {
                             ["Shock Trainer"] = {{"Wartortle", 1}, {"Starmie", 1}, {"Kingler", 1}},
                       },                     
                       task2 = {
                             ["Shock Trainer"] = {{"Blastoise", 1}, {"Pidgeot", 1}, {"Fearow", 1}},
                       },
                       itens = {{12164, 1}, {12198, 1}, {12176, 1}},
                       poke = "Electrode",
                       level = 90,
                       prevRank = 1,
                       nextRank = 2,
},
["Watt Trainer"] = {
                       task1 = {
                             ["Watt Trainer"] = {{"Wartortle", 1}, {"Starmie", 1}, {"Kingler", 1}},
                       },                     
                       task2 = {
                             ["Watt Trainer"] = {{"Blastoise", 1}, {"Pidgeot", 1}, {"Fearow", 1}},
                       },
                       itens = {{12164, 1}, {12198, 1}, {12176, 1}},
                       poke = "Magneton",
                       level = 100,
                       prevRank = 2,
                       nextRank = 3,
},
["Electrician Trainer"] = {
                       task1 = {
                             ["Electrician Trainer"] = {{"Wartortle", 1}, {"Starmie", 1}, {"Kingler", 1}},
                       },                     
                       task2 = {
                             ["Electrician Trainer"] = {{"Blastoise", 1}, {"Pidgeot", 1}, {"Fearow", 1}},
                       },
                       itens = {{12164, 1}, {12198, 1}, {12176, 1}},
                       poke = "Raichu",
                       level = 110,
                       prevRank = 3,
                       nextRank = 4,
},
["Overcharged Trainer"] = {
                       task1 = {
                             ["Overcharged Trainer"] = {{"Wartortle", 1}, {"Starmie", 1}, {"Kingler", 1}},
                       },                     
                       task2 = {
                             ["Overcharged Trainer"] = {{"Blastoise", 1}, {"Pidgeot", 1}, {"Fearow", 1}},
                       },
                       itens = {{12164, 1}, {12198, 1}, {12176, 1}},
                       poke = "Electabuzz",
                       level = 120,
                       prevRank = 4,
                       nextRank = 5,
},
}
------------------------------------------------------------------------------
local npc = clanNpcs[getNpcName()]
       
         if msgcontains(msg, 'help') or msgcontains(msg, 'Help') then
            if getPlayerLevel(cid) < npc.level or getPlayerClanName(cid) ~= 'Raibolt' or getPlayerClanRank(cid) ~= npc.prevRank then
               selfSay("I don't need your help!", cid)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) <= -1 then
               selfSay("So you want to move up of rank on our clan... So, you need to bring some items to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               selfSay("So you brought to me the items what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("The next step is you caught a pokemon to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then
               selfSay("So you caught the pokemon what i asked for?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 4 then
               selfSay("Now you need to do some tasks for me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 5 then
               selfSay("So you finished the first task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 6 then
               selfSay("And now comes the last task... Do you wanna to begin it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               selfSay("So you finished the last task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            end      
         elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then 
            if getPlayerStorageValue(cid, 854789) <= -1 then
               local str = "Ok then, you need bring to me: "
               for a = 1, #npc.itens do
                   str = str..(a == #npc.itens and " and " or a ~= 1 and ", " or "{")..(npc.itens[a][2]).." "..(getItemNameById(npc.itens[a][1]))
               end 
               str = str.."}, come back when you join those items!"   
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 1)
               talkState[talkUser] = 0 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               local check = checkItensForTask(cid, npc.itens)
               if check == 0 then
                  selfSay("Ok then, you completed the mission, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 2)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay(check, cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("Ok then, you need to caught a {"..(npc.poke).."}, and bring it to me... Come back when you do that!", cid)
               setPlayerStorageValue(cid, 854789, 3)
               setPlayerStorageValue(cid, 854788, npc.poke)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then 
               if getPlayerStorageValue(cid, 854788) == 'done' then
                  selfSay("Very well, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 4)
                  setPlayerStorageValue(cid, 854788, -1)
                  setPlayerStorageValue(cid, 854787, npc.poke)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay("You didn't caught the pokemon what i asked for! Go do it!", cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 4 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't get more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now you need to kill: {"
               for e, f in pairs(npc.task1) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 5)
               setStorageArray(cid, sto, npc.task1)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 5 then 
               if isMyTaskComplete(cid, getNpcCid()) then
                  selfSay("Very well, you have done my first task... Talk to me again when you want to continue!", cid) 
                  local sto = getMyTaskSto(cid, getNpcCid())
                  setPlayerStorageValue(cid, sto, -1)
                  setPlayerStorageValue(cid, 854789, 6)
                  talkState[talkUser] = 0
                  return true
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 6 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't catch more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now for your last task you need to kill: {"
               for e, f in pairs(npc.task2) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 7)
               setStorageArray(cid, sto, npc.task2)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               if isMyTaskComplete(cid, getNpcCid()) then
                  ---
                  local storages = {17000, 63215, 17001, 13008, 5700}     --alterado v1.8
                  for s = 1, #storages do
                      if getPlayerStorageValue(cid, storages[s]) >= 1 then
                         selfSay("You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!", cid) 
                         talkState[talkUser] = 0
                         return true
                      end
                  end
                  if #getCreatureSummons(cid) >= 1 then     --alterado v1.8
                     selfSay("Return your pokemon!", cid) 
                     talkState[talkUser] = 0
                     return true
                  end  
                  ---
                  if checkPokemonForTask(cid, npc.poke) then
                     setPlayerClanRank(cid, npc.nextRank)
                     selfSay("So you complete my last task! Congradulations! Now you move up of rank and become {"..lookClans[getPlayerClanNum(cid)][getPlayerClanRank(cid)].."}!", cid)
                     setPlayerStorageValue(cid, 854789, -1)
                     setPlayerStorageValue(cid, 854787, -1)
                     local sto = getMyTaskSto(cid, getNpcCid())
                     setPlayerStorageValue(cid, sto, -1)
                     talkState[talkUser] = 0
                     return true
                  else
                     selfSay("You aren't with the "..(npc.poke).." which you caught before in your pokebag! Go get it!", cid)
                     talkState[talkUser] = 0
                     return true
                  end   
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end        
            end
         end
              
return true
end


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

 

 

Seavell:

 

 

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


---------------------- Configs --------------------------- 
local clanNpcs = {
["Drop Trainer"] = {
                       task1 = {
                             ["Drop Trainer"] = {{"Pidgeot", 1}, {"Sandslash", 20}, {"Dratini", 25}},
                       },                     
                       task2 = {
                             ["Drop Trainer"] = {{"Venusaur", 1}, {"Exeggutor", 1}, {"Dragonair", 1}},
                       },
                       itens = {{12161, 1}, {12170, 1}, {12201, 1}},
                       poke = "Dewgong",
                       level = 90,
                       prevRank = 1,
                       nextRank = 2,
},
["Icelake Trainer"] = {
                       task1 = {
                             ["Icelake Trainer"] = {{"Pidgeot", 1}, {"Sandslash", 1}, {"Dratini", 1}},
                       },                     
                       task2 = {
                             ["Icelake Trainer"] = {{"Venusaur", 1}, {"Exeggutor", 1}, {"Dragonair", 1}},
                       },
                       itens = {{12161, 1}, {12170, 1}, {12201, 1}},
                       poke = "Jynx",
                       level = 100,
                       prevRank = 2,
                       nextRank = 3,
},
["Waterfall Trainer"] = {
                       task1 = {
                             ["Waterfall Trainer"] = {{"Pidgeot", 1}, {"Sandslash", 1}, {"Dratini", 1}},
                       },                     
                       task2 = {
                             ["Waterfall Trainer"] = {{"Venusaur", 1}, {"Exeggutor", 1}, {"Dragonair", 1}},
                       },
                       itens = {{12161, 1}, {12170, 1}, {12201, 1}},
                       poke = "Lapras",
                       level = 110,
                       prevRank = 3,
                       nextRank = 4,
},
["Frost Trainer"] = {
                       task1 = {
                             ["Frost Trainer"] = {{"Charmeleon", 1}, {"Arcanine", 1}, {"Charizard", 1}},
                       },                     
                       task2 = {
                             ["Frost Trainer"] = {{"Venusaur", 1}, {"Exeggutor", 1}, {"Dragonair", 1}},
                       },
                       itens = {{12161, 1}, {12170, 1}, {12201, 1}},
                       poke = "Blastoise",
                       level = 120,
                       prevRank = 4,
                       nextRank = 5,
},
}
------------------------------------------------------------------------------
local npc = clanNpcs[getNpcName()]
       
         if msgcontains(msg, 'help') or msgcontains(msg, 'Help') then
            if getPlayerLevel(cid) < npc.level or getPlayerClanName(cid) ~= 'Seavell' or getPlayerClanRank(cid) ~= npc.prevRank then
               selfSay("I don't need your help!", cid)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) <= -1 then
               selfSay("So you want to move up of rank on our clan... So, you need to bring some items to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               selfSay("So you brought to me the items what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("The next step is you caught a pokemon to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then
               selfSay("So you caught the pokemon what i asked for?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 4 then
               selfSay("Now you need to do some tasks for me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 5 then
               selfSay("So you finished the first task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 6 then
               selfSay("And now comes the last task... Do you wanna to begin it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               selfSay("So you finished the last task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            end      
         elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then 
            if getPlayerStorageValue(cid, 854789) <= -1 then
               local str = "Ok then, you need bring to me: "
               for a = 1, #npc.itens do
                   str = str..(a == #npc.itens and " and " or a ~= 1 and ", " or "{")..(npc.itens[a][2]).." "..(getItemNameById(npc.itens[a][1]))
               end 
               str = str.."}, come back when you join those items!"   
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 1)
               talkState[talkUser] = 0 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               local check = checkItensForTask(cid, npc.itens)
               if check == 0 then
                  selfSay("Ok then, you completed the mission, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 2)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay(check, cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("Ok then, you need to caught a {"..(npc.poke).."}, and bring it to me... Come back when you do that!", cid)
               setPlayerStorageValue(cid, 854789, 3)
               setPlayerStorageValue(cid, 854788, npc.poke)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then 
               if getPlayerStorageValue(cid, 854788) == 'done' then
                  selfSay("Very well, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 4)
                  setPlayerStorageValue(cid, 854788, -1)
                  setPlayerStorageValue(cid, 854787, npc.poke)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay("You didn't caught the pokemon what i asked for! Go do it!", cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 4 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't get more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now you need to kill: {"
               for e, f in pairs(npc.task1) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 5)
               setStorageArray(cid, sto, npc.task1)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 5 then 
               if isMyTaskComplete(cid, getNpcCid()) then
                  selfSay("Very well, you have done my first task... Talk to me again when you want to continue!", cid) 
                  local sto = getMyTaskSto(cid, getNpcCid())
                  setPlayerStorageValue(cid, sto, -1)
                  setPlayerStorageValue(cid, 854789, 6)
                  talkState[talkUser] = 0
                  return true
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 6 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't catch more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now for your last task you need to kill: {"
               for e, f in pairs(npc.task2) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 7)
               setStorageArray(cid, sto, npc.task2)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               if isMyTaskComplete(cid, getNpcCid()) then
                  ---
                  local storages = {17000, 63215, 17001, 13008, 5700}     --alterado v1.8
                  for s = 1, #storages do
                      if getPlayerStorageValue(cid, storages[s]) >= 1 then
                         selfSay("You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!", cid) 
                         talkState[talkUser] = 0
                         return true
                      end
                  end
                  if #getCreatureSummons(cid) >= 1 then     --alterado v1.8
                     selfSay("Return your pokemon!", cid) 
                     talkState[talkUser] = 0
                     return true
                  end  
                  ---
                  if checkPokemonForTask(cid, npc.poke) then
                     setPlayerClanRank(cid, npc.nextRank)
                     selfSay("So you complete my last task! Congradulations! Now you move up of rank and become {"..lookClans[getPlayerClanNum(cid)][getPlayerClanRank(cid)].."}!", cid)
                     setPlayerStorageValue(cid, 854789, -1)
                     setPlayerStorageValue(cid, 854787, -1)
                     local sto = getMyTaskSto(cid, getNpcCid())
                     setPlayerStorageValue(cid, sto, -1)
                     talkState[talkUser] = 0
                     return true
                  else
                     selfSay("You aren't with the "..(npc.poke).." which you caught before in your pokebag! Go get it!", cid)
                     talkState[talkUser] = 0
                     return true
                  end   
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end        
            end
         end
              
return true
end


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

 

 

Volcanic:

 

 

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


---------------------- Configs --------------------------- 
local clanNpcs = {
["Spark Trainer"] = {
                       task1 = {
                             ["Spark Trainer"] = {{"Ivysaur", 1}, {"Butterfree", 1}, {"Tangela", 1}},
                       },                     
                       task2 = {
                             ["Spark Trainer"] = {{"Jynx", 1}, {"Venusaur", 1}, {"Pinsir", 1}},
                       },
                       itens = {{12162, 1}, {12152, 1}, {12157, 1}},
                       poke = "Ninetales",
                       level = 90,
                       prevRank = 1,
                       nextRank = 2,
},
["Flame Trainer"] = {
                       task1 = {
                             ["Flame Trainer"] = {{"Ivysaur", 1}, {"Butterfree", 1}, {"Tangela", 1}},
                       },                     
                       task2 = {
                             ["Flame Trainer"] = {{"Jynx", 1}, {"Venusaur", 1}, {"Pinsir", 1}},
                       },
                       itens = {{12162, 1}, {12152, 1}, {12157, 1}},
                       poke = "Arcanine",
                       level = 100,
                       prevRank = 2,
                       nextRank = 3,
},
["Firetamer Trainer"] = {
                       task1 = {
                             ["Firetamer Trainer"] = {{"Ivysaur", 1}, {"Butterfree", 1}, {"Tangela", 1}},
                       },                     
                       task2 = {
                             ["Firetamer Trainer"] = {{"Jynx", 1}, {"Venusaur", 1}, {"Pinsir", 1}},
                       },
                       itens = {{12162, 1}, {12152, 1}, {12157, 1}},
                       poke = "Charizard",
                       level = 110,
                       prevRank = 3,
                       nextRank = 4,
},
["Pyromancer Trainer"] = {
                       task1 = {
                             ["Pyromancer Trainer"] = {{"Ivysaur", 1}, {"Butterfree", 1}, {"Tangela", 1}},
                       },                     
                       task2 = {
                             ["Pyromancer Trainer"] = {{"Jynx", 1}, {"Venusaur", 1}, {"Pinsir", 1}},
                       },
                       itens = {{12162, 1}, {12152, 1}, {12157, 1}},
                       poke = "Magmar",
                       level = 120,
                       prevRank = 4,
                       nextRank = 5,
},
}
------------------------------------------------------------------------------
local npc = clanNpcs[getNpcName()]
       
         if msgcontains(msg, 'help') or msgcontains(msg, 'Help') then
            if getPlayerLevel(cid) < npc.level or getPlayerClanName(cid) ~= 'Volcanic' or getPlayerClanRank(cid) ~= npc.prevRank then
               selfSay("I don't need your help!", cid)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) <= -1 then
               selfSay("So you want to move up of rank on our clan... So, you need to bring some items to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               selfSay("So you brought to me the items what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("The next step is you caught a pokemon to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then
               selfSay("So you caught the pokemon what i asked for?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 4 then
               selfSay("Now you need to do some tasks for me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 5 then
               selfSay("So you finished the first task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 6 then
               selfSay("And now comes the last task... Do you wanna to begin it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               selfSay("So you finished the last task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            end      
         elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then 
            if getPlayerStorageValue(cid, 854789) <= -1 then
               local str = "Ok then, you need bring to me: "
               for a = 1, #npc.itens do
                   str = str..(a == #npc.itens and " and " or a ~= 1 and ", " or "{")..(npc.itens[a][2]).." "..(getItemNameById(npc.itens[a][1]))
               end 
               str = str.."}, come back when you join those items!"   
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 1)
               talkState[talkUser] = 0 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               local check = checkItensForTask(cid, npc.itens)
               if check == 0 then
                  selfSay("Ok then, you completed the mission, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 2)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay(check, cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("Ok then, you need to caught a {"..(npc.poke).."}, and bring it to me... Come back when you do that!", cid)
               setPlayerStorageValue(cid, 854789, 3)
               setPlayerStorageValue(cid, 854788, npc.poke)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then 
               if getPlayerStorageValue(cid, 854788) == 'done' then
                  selfSay("Very well, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 4)
                  setPlayerStorageValue(cid, 854788, -1)
                  setPlayerStorageValue(cid, 854787, npc.poke)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay("You didn't caught the pokemon what i asked for! Go do it!", cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 4 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't get more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now you need to kill: {"
               for e, f in pairs(npc.task1) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 5)
               setStorageArray(cid, sto, npc.task1)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 5 then 
               if isMyTaskComplete(cid, getNpcCid()) then
                  selfSay("Very well, you have done my first task... Talk to me again when you want to continue!", cid) 
                  local sto = getMyTaskSto(cid, getNpcCid())
                  setPlayerStorageValue(cid, sto, -1)
                  setPlayerStorageValue(cid, 854789, 6)
                  talkState[talkUser] = 0
                  return true
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 6 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't catch more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now for your last task you need to kill: {"
               for e, f in pairs(npc.task2) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 7)
               setStorageArray(cid, sto, npc.task2)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               if isMyTaskComplete(cid, getNpcCid()) then
                  ---
                  local storages = {17000, 63215, 17001, 13008, 5700}     --alterado v1.8
                  for s = 1, #storages do
                      if getPlayerStorageValue(cid, storages[s]) >= 1 then
                         selfSay("You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!", cid) 
                         talkState[talkUser] = 0
                         return true
                      end
                  end
                  if #getCreatureSummons(cid) >= 1 then     --alterado v1.8
                     selfSay("Return your pokemon!", cid) 
                     talkState[talkUser] = 0
                     return true
                  end  
                  ---
                  if checkPokemonForTask(cid, npc.poke) then
                     setPlayerClanRank(cid, npc.nextRank)
                     selfSay("So you complete my last task! Congradulations! Now you move up of rank and become {"..lookClans[getPlayerClanNum(cid)][getPlayerClanRank(cid)].."}!", cid)
                     setPlayerStorageValue(cid, 854789, -1)
                     setPlayerStorageValue(cid, 854787, -1)
                     local sto = getMyTaskSto(cid, getNpcCid())
                     setPlayerStorageValue(cid, sto, -1)
                     talkState[talkUser] = 0
                     return true
                  else
                     selfSay("You aren't with the "..(npc.poke).." which you caught before in your pokebag! Go get it!", cid)
                     talkState[talkUser] = 0
                     return true
                  end   
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end        
            end
         end
              
return true
end


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

 

 

Wingeon:

 

 

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


---------------------- Configs --------------------------- 
local clanNpcs = {
["Cloud Trainer"] = {
                       task1 = {
                             ["Cloud Trainer"] = {{"Ivysaur", 1}, {"Tangela", 1}, {"Parasect", 1}},
                       },                     
                       task2 = {
                             ["Cloud Trainer"] = {{"Pinsir", 1}, {"Venusaur", 1}, {"Farfetch'd", 1}},
                       },
                       itens = {{12172, 1}, {12199, 1}, {12200, 1}},  --n achei o id do straw 
                       poke = "Farfetch'd",
                       level = 90,
                       prevRank = 1,
                       nextRank = 2,
},
["Wind Trainer"] = {
                       task1 = {
                             ["Wind Trainer"] = {{"Ivysaur", 1}, {"Tangela", 1}, {"Parasect", 1}},
                       },                     
                       task2 = {
                             ["Wind Trainer"] = {{"Pinsir", 1}, {"Venusaur", 1}, {"Farfetch'd", 1}},
                       },
                       itens = {{12172, 1}, {12199, 1}, {12200, 1}},  --n achei o id do straw 
                       poke = "Fearow",
                       level = 100,
                       prevRank = 2,
                       nextRank = 3,
},
["Sky Trainer"] = {
                       task1 = {
                             ["Sky Trainer"] = {{"Ivysaur", 1}, {"Tangela", 1}, {"Parasect", 1}},
                       },                     
                       task2 = {
                             ["Sky Trainer"] = {{"Pinsir", 1}, {"Venusaur", 1}, {"Farfetch'd", 1}},
                       },
                       itens = {{12172, 1}, {12199, 1}, {12200, 1}},  --n achei o id do straw 
                       poke = "Dragonair",
                       level = 110,
                       prevRank = 3,
                       nextRank = 4,
},
["Falcon Trainer"] = {
                       task1 = {
                             ["Falcon Trainer"] = {{"Ivysaur", 1}, {"Tangela", 1}, {"Parasect", 1}},
                       },                     
                       task2 = {
                             ["Falcon Trainer"] = {{"Dragonair", 1}, {"Venusaur", 1}, {"Dragonite", 1}},
                       },
                       itens = {{12172, 1}, {12199, 1}, {12200, 1}},  --n achei o id do straw 
                       poke = "Dragonite",
                       level = 120,
                       prevRank = 4,
                       nextRank = 5,
},
}
------------------------------------------------------------------------------
local npc = clanNpcs[getNpcName()]
       
         if msgcontains(msg, 'help') or msgcontains(msg, 'Help') then
            if getPlayerLevel(cid) < npc.level or getPlayerClanName(cid) ~= 'Wingeon' or getPlayerClanRank(cid) ~= npc.prevRank then
               selfSay("I don't need your help!", cid)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) <= -1 then
               selfSay("So you want to move up of rank on our clan... So, you need to bring some items to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               selfSay("So you brought to me the items what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("The next step is you caught a pokemon to me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then
               selfSay("So you caught the pokemon what i asked for?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 4 then
               selfSay("Now you need to do some tasks for me... Do you wanna do it?", cid)
               talkState[talkUser] = 1 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 5 then
               selfSay("So you finished the first task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 6 then
               selfSay("And now comes the last task... Do you wanna to begin it?", cid)
               talkState[talkUser] = 1 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               selfSay("So you finished the last task what i asked for?", cid)
               talkState[talkUser] = 1 
               return true
            end      
         elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then 
            if getPlayerStorageValue(cid, 854789) <= -1 then
               local str = "Ok then, you need bring to me: "
               for a = 1, #npc.itens do
                   str = str..(a == #npc.itens and " and " or a ~= 1 and ", " or "{")..(npc.itens[a][2]).." "..(getItemNameById(npc.itens[a][1]))
               end 
               str = str.."}, come back when you join those items!"   
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 1)
               talkState[talkUser] = 0 
               return true 
            elseif getPlayerStorageValue(cid, 854789) == 1 then
               local check = checkItensForTask(cid, npc.itens)
               if check == 0 then
                  selfSay("Ok then, you completed the mission, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 2)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay(check, cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 2 then
               selfSay("Ok then, you need to caught a {"..(npc.poke).."}, and bring it to me... Come back when you do that!", cid)
               setPlayerStorageValue(cid, 854789, 3)
               setPlayerStorageValue(cid, 854788, npc.poke)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 3 then 
               if getPlayerStorageValue(cid, 854788) == 'done' then
                  selfSay("Very well, talk to me again when you want to continue!", cid)
                  setPlayerStorageValue(cid, 854789, 4)
                  setPlayerStorageValue(cid, 854788, -1)
                  setPlayerStorageValue(cid, 854787, npc.poke)
                  talkState[talkUser] = 0 
                  return true
               else
                  selfSay("You didn't caught the pokemon what i asked for! Go do it!", cid)
                  talkState[talkUser] = 0 
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 4 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't get more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now you need to kill: {"
               for e, f in pairs(npc.task1) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 5)
               setStorageArray(cid, sto, npc.task1)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 5 then 
               if isMyTaskComplete(cid, getNpcCid()) then
                  selfSay("Very well, you have done my first task... Talk to me again when you want to continue!", cid) 
                  local sto = getMyTaskSto(cid, getNpcCid())
                  setPlayerStorageValue(cid, sto, -1)
                  setPlayerStorageValue(cid, 854789, 6)
                  talkState[talkUser] = 0
                  return true
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end
            elseif getPlayerStorageValue(cid, 854789) == 6 then 
               local sto = getFreeTaskStorage(cid)
               local c = 0
               if sto == -1 then 
                  selfSay("You can't catch more tasks! You are already with the maximum of "..(maxTasks).." tasks!", cid)
                  talkState[talkUser] = 0
                  return true
               end
               
               local str = "Ok then, now for your last task you need to kill: {"
               for e, f in pairs(npc.task2) do
                   for a = 1, #f do
                       str = str..((a == #f and c ~= 0) and " and " or a ~= 1 and ", " or "")..f[a][2].." "..f[a][1]
                       c = c+1
                   end
               end
               str = str.."} with the {"..(npc.poke).."} which you caught!"
               selfSay(str, cid)
               setPlayerStorageValue(cid, 854789, 7)
               setStorageArray(cid, sto, npc.task2)
               talkState[talkUser] = 0 
               return true
            elseif getPlayerStorageValue(cid, 854789) == 7 then
               if isMyTaskComplete(cid, getNpcCid()) then
                  ---
                  local storages = {17000, 63215, 17001, 13008, 5700}     --alterado v1.8
                  for s = 1, #storages do
                      if getPlayerStorageValue(cid, storages[s]) >= 1 then
                         selfSay("You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!", cid) 
                         talkState[talkUser] = 0
                         return true
                      end
                  end
                  if #getCreatureSummons(cid) >= 1 then     --alterado v1.8
                     selfSay("Return your pokemon!", cid) 
                     talkState[talkUser] = 0
                     return true
                  end  
                  ---
                  if checkPokemonForTask(cid, npc.poke) then
                     setPlayerClanRank(cid, npc.nextRank)
                     selfSay("So you complete my last task! Congradulations! Now you move up of rank and become {"..lookClans[getPlayerClanNum(cid)][getPlayerClanRank(cid)].."}!", cid)
                     setPlayerStorageValue(cid, 854789, -1)
                     setPlayerStorageValue(cid, 854787, -1)
                     local sto = getMyTaskSto(cid, getNpcCid())
                     setPlayerStorageValue(cid, sto, -1)
                     talkState[talkUser] = 0
                     return true
                  else
                     selfSay("You aren't with the "..(npc.poke).." which you caught before in your pokebag! Go get it!", cid)
                     talkState[talkUser] = 0
                     return true
                  end   
               else
                  selfSay("You didn't complete my task yet... Go end it!", cid)
                  talkState[talkUser] = 0
                  return true
               end        
            end
         end
              
return true
end


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

 

 

Editado por waata
Link para o comentário
Compartilhar em outros sites

[1] = Volcanic
[2] = Seavell
[3] = Orebound
[4] = Wingeon
[5] = Malefic
[6] = Gardestrike
[7] = Psycraft
[8] = Naturia
[9] = Raibolt

Storage do clã: 86228

Storage do rank do clã: 862281

Pra rank 5, logicamente, o storage é 5

Vou deixar essa pra você zipster, kkk :p

Link para o comentário
Compartilhar em outros sites

data/actions/scripts

 

function onUse(cid, item, frompos, item2, topos)

local t = {

[1] = {x = xxx, y = yyy, z = zzz}, --[id do clan/storage value] = {{posição para onde será teleportado}},
[2] = {x = xxx, y = yyy, z = zzz},
[3] = {x = xxx, y = yyy, z = zzz},
[4] = {x = xxx, y = yyy, z = zzz},
[5] = {x = xxx, y = yyy, z = zzz},
[6] = {x = xxx, y = yyy, z = zzz},
[7] = {x = xxx, y = yyy, z = zzz},
[8] = {x = xxx, y = yyy, z = zzz},
[9] = {x = xxx, y = yyy, z = zzz},
}
local need_level = 300
if getPlayerLevel(cid) >= need_level then
if getPlayerStorageValue(cid, 86228) >= 1 then
if getPlayerStorageValue(cid, 862281) == 5 then
local where = getPlayerStorageValue(cid, 86228)
doPlayerSendTextMessage(cid, 27, "Você acessou a Clan Area.")
doTeleportThing(cid, t[getPlayerStorageValue(cid, 86228)])
else
return doPlayerSendCancel(cid, "Você precisa ser rank 5.")
end
else
return doPlayerSendCancel(cid, "Você não pertence a clan algum!")
end
else
return doPlayerSendCancel(cid, "Você precisa ser, no mínimo, level "..need_level..".")
end
return true
end

Editado por zipter98
Link para o comentário
Compartilhar em outros sites

Pensei que você soubesse fazer ;/

jaja edito com a tag.

 

 

 

<action actionid="xxx" event="script" value="arquivo.lua"/>

 

Troque xxx pelo actionid da porta.

Troque arquivo pelo nome do arquivo .lua com o conteúdo que passei acima.

Editado por zipter98
Link para o comentário
Compartilhar em outros sites

Suponho que não haja muita diferença, porém, melhor prevenir do que remediar. O script em si, pelo que vi, está funcionando direitinho. É só configurar corretamente no map editor.

Link para o comentário
Compartilhar em outros sites

Não. Só é necessário mexer nas coordenadas. Esse [1] é o valor da storage. Se quiser se orientar melhor sobre qual número é qual clan, siga a tabela que o Akumah postou logo acima.

Editado por zipter98
Link para o comentário
Compartilhar em outros sites

  • 4 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...