To com problema nos meus npc de addon tanto o Addoner quanto os que dão nightmare e brotherhood addons, o player vai lá fala hi, first hunter addon, yes e o npc não da o addon fala que o player já tem, ou seja, os player tao conseguindo ter só o first ou o second, ñ consegue ter os 2, o npc fala q ele ja possui 1 dos addons sendo que ele n tem, ai meu npc de addon
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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
npcHandler:setMessage(MESSAGE_GREET, "Greetings |PLAYERNAME|. Will you help me? If you do, I'll reward you with nice addons! Just say {addons} or {help} if you don't know what to do.")
function playerBuyAddonNPC(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if (parameters.confirm ~= true) and (parameters.decline ~= true) then
if(getPlayerPremiumDays(cid) == 1) and (parameters.premium == true) then
npcHandler:say('Sorry, but this addon is only for vip players!', cid)
npcHandler:resetNpc()
return true
end
if (getPlayerStorageValue(cid, parameters.storageID) ~= -1) then
npcHandler:say('You already have this addon!', cid)
keywordHandler:addKeyword({'addons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can give you citizen, hunter, knight, mage, nobleman, summoner, warrior, barbarian, druid, wizard, oriental, pirate, assassin, beggar, shaman, norseman, nighmare, jester, yalaharian, brotherhood, warmaster and wayfarer addons.'})
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To buy the first addon say \'first NAME addon\', for the second addon say \'second NAME addon\'.'})
info
Grupo: Campones
Registrado: 04/12/11
Posts: 5
Reputação: 0
To com problema nos meus npc de addon tanto o Addoner quanto os que dão nightmare e brotherhood addons, o player vai lá fala hi, first hunter addon, yes e o npc não da o addon fala que o player já tem, ou seja, os player tao conseguindo ter só o first ou o second, ñ consegue ter os 2, o npc fala q ele ja possui 1 dos addons sendo que ele n tem, ai meu npc de addon