[Encerrado] Npc catcher

DouglasNeves
em Tópicos Sem Resposta

DouglasNeves

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 04/09/12Posts: 10Char no Tibia: Xgames: Def reaper

Preciso de um script COMPLETO do npc catcher,com 100 caughts ganha a outfit catcher e uma Box+3. OBS: Pda v.1.8 do Slicer

2cfb3pt.jpg

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

oq exatamente tu quer dizer com 'completo' ja postei varios npcs desse tpw... mas a maioria soh entregando a outfit e box 4 ...

 

tu diz q com 15 catchs ganhei algu, com 30 catchs ganhe outra coisa e assim por diante? se for, me diz quais catchs tu quer q ganhe algu q eu faço aki.. tpw..

ques q ganhe algu nos catchs.. 15, 30, 45, 60, 85 e 100? ...

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

DouglasNeves

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 04/09/12Posts: 10Char no Tibia: Xgames: Def reaper

Não apenas com caught 100,ah pode faze a box 4 ,mas quero o script "completo",no .xml e no "script"

2cfb3pt.jpg

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

blz... vai em npc/scripts e cria um arquivo .lua com o nome Catcher.lua e cola isso dentro..

 

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

function doBuyPokemonWithCasinoCoins(cid, poke) npcHandler:onSellpokemon(cid) end
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

local stoQuest = 9873242 --storage para n pegar o premio 2x
local stoOut = 181644  --storage da roupa

if (msgcontains(msg, 'mission') or msgcontains(msg, 'help')) and (not talkState[talkUser] or talkState[talkUser] == 0) then
  if getPlayerStorageValue(cid, stoQuest) >= 1 then
  selfSay("You already did this quest!", cid)
  talkState[talkUser] = 0
  return true
  end
  selfSay("You need catch atleast 100 pokemons to win the reward, can you do it?", cid)
  talkState[talkUser] = 1
elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'sim')) and talkState[talkUser] == 1 then
  if getPlayerStorageValue(cid, stoQuest) >= 1 then
  selfSay("You already did this quest!", cid)
  talkState[talkUser] = 0
  return true
  end
  local list = getCatchList(cid)
  if #list >= 100 then
  selfSay("Thank you very much, take you reward...", cid)
  setPlayerStorageValue(cid, stoOut, 1)
  setPlayerStorageValue(cid, stoQuest, 1)

  doPlayerAddItem(cid, 11638, 1) --box 4
  talkState[talkUser] = 0
  return true
  else
  selfSay("You haven't caught 100 pokemons yet, come back when you do that...", cid)
  talkState[cid] = 0
  return true
  end
elseif (msgcontains(msg, 'no') or msgcontains(msg, 'nao')) then
  selfSay("So good bye...", cid)
  talkState[cid] = 0
  return true
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

dai depois volte na pasta npc/ e crie um arquivo .xml com o nome Catcher.xml e cole isso dentro...

 

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

<npc name="Catcher" script="Catcher.lua" walkinterval="3000" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="1413" head="114" body="119" legs="114" feet="114" corpse="2212"/>

<parameters>
   <parameter key="message_greet" value="Welcome |PLAYERNAME|, what you want?"/>
</parameters>
</npc>

 

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

DouglasNeves

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 04/09/12Posts: 10Char no Tibia: Xgames: Def reaper

Testei de deu certo,vlw ae REP+

2cfb3pt.jpg

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

sanado, movido

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

AlissonFabiano10

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 19/05/13Posts: 14Char no Tibia: ReBorner
[01/10/2013 22:51:06] [Error - Npc interface]

[01/10/2013 22:51:06] data/npc/scripts/Catcher.lua:onCreatureSay

[01/10/2013 22:51:06] Description:

[01/10/2013 22:51:06] data/npc/scripts/Catcher.lua:37: attempt to get length of global 'getCatchList' (a nil value)

[01/10/2013 22:51:06] stack traceback:

[01/10/2013 22:51:06] data/npc/scripts/Catcher.lua:37: in function 'callback'

[01/10/2013 22:51:06] data/npc/lib/npcsystem/npchandler.lua:391: in function 'onCreatureSay'

[01/10/2013 22:51:06] data/npc/scripts/Catcher.lua:9: in function <data/npc/scripts/Catcher.lua:9>


me ajuda a arrumar aee vlws, meu sv é base erondino 8.54

se funfar dou REP+

nociam

avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 04/02/13Posts: 541Gênero: Masculino

Porque vc nao tem essa funcao getCatchList, e e provável que nao funcione no seu ot.

Stigal

don't ever stop...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 28/11/10Posts: 3402Gênero: Masculino
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.

VI6MDIG.png

 

"O fracasso é a oportunidade de se começar de novo inteligentemente"

Minhas Redes Sociais: Youtube | Página & Grupo | Steam  | Discord Xtibia | Skype: @mrooger

 

OTpanel