GO
npc

BUG no npc professor carvalho

Por Gokussj5, 11 de jul. de 2016 em NPCs, monsters e raids

12345678910
4
1.5k
Gokussj5G
11 de julho de 2016 às 14:39

Olá galera bom meu npc aqui esta com um bug tipo ele entra os pokemon as pokebola e os potions só que o player fica pegando toda hora, o npc era pra ser o seguinte dps que o player pega o seu pokemon escolhido ele não pegue de novo só pode pega outro char criando ajuda pfv

 

 

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
if(msgcontains(msg, 'Bulbasaur')) then
doPlayerAddItem(cid, 2155, 1)
doPlayerAddItem(cid, 2394, 50)
doPlayerAddItem(cid, 12347, 50)
end
if(msgcontains(msg, 'Charmander')) then
doPlayerAddItem(cid, 2156, 1)
doPlayerAddItem(cid, 2394, 50)
doPlayerAddItem(cid, 12347, 50)
end
if(msgcontains(msg, 'Squirtle')) then
doPlayerAddItem(cid, 2158, 1)
doPlayerAddItem(cid, 2394, 50)
doPlayerAddItem(cid, 12347, 50)
end
--------------------------------------------------------- 
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Gokussj5G
12 de julho de 2016 às 10:24

@Up 

@Up

@Up

PoccnnP
12 de julho de 2016 às 10:34

Use setstore para verificar se ja foi obtido o pokemon

Gokussj5G
12 de julho de 2016 às 12:11

Como seria então não manjo muito de lua pode passa pfv