Postado Fevereiro 14, 2015 10 anos O meu NPC que troca itens por addon só atende jogadores VIP, como fazer pra ele trocar o addon com os players que também não são VIP? Me ajudem '-' 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 -- Storage IDs -- fassassino = 22005 sassassino = 22006 newaddon = 'Ah, certo! Aqui esta o seu addon, volte sempre.' noitems = 'Voce nao tem todos os itens necessarios.' noitems2 = 'Voce nao tem todos os itens necessarios.' already = 'Parece que voce ja tem este addon, nao tente me zombar filho!' function AssassinoFirst(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if isPremium(cid) then addon = getPlayerStorageValue(cid,fassassino) if addon == -1 then if getPlayerItemCount(cid,2160) >= 1 and getPlayerItemCount(cid,2160) >= 1 then if doPlayerRemoveItem(cid,2160,1) and doPlayerRemoveItem(cid,2160,1) then npcHandler:say('Ah, certo! Aqui esta o seu addon, volte sempre.') doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid,fassassino,1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 152, 1) elseif getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 156, 2) end end else selfSay(noitems) end else selfSay(already) end end end function AssassinoSecond(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if isPremium(cid) then addon = getPlayerStorageValue(cid,sassassino) if addon == -1 then if getPlayerItemCount(cid,2160) >= 1 then if doPlayerRemoveItem(cid,2160,1) then npcHandler:say('Ah, certo! Aqui esta o seu addon, volte sempre.') doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid,sassassino,1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 152, 2) elseif getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 156, 1) end end else selfSay(noitems) end else selfSay(already) end end end node2 = keywordHandler:addKeyword({'addon1'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce pode comprar o segundo addon por. Voce tem-los com voce?'}) node2:addChildKeyword({'yes'}, AssassinoFirst, {}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem entao. Volte quando voce tem todos os itens necessarios.', reset = true}) node3 = keywordHandler:addKeyword({'addon2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce pode comprar o segundo addon por. Voce tem-los com voce?'}) node3:addChildKeyword({'yes'}, AssassinoSecond, {}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem entao. Volte quando voce tem todos os itens necessarios.', reset = true}) npcHandler:addModule(FocusModule:new())
Postado Fevereiro 15, 2015 10 anos 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 -- Storage IDs -- fassassino = 22005 sassassino = 22006 newaddon = 'Ah, certo! Aqui esta o seu addon, volte sempre.' noitems = 'Voce nao tem todos os itens necessarios.' noitems2 = 'Voce nao tem todos os itens necessarios.' already = 'Parece que voce ja tem este addon, nao tente me zombar filho!' function AssassinoFirst(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end addon = getPlayerStorageValue(cid,fassassino) if addon == -1 then if getPlayerItemCount(cid,2160) >= 1 and getPlayerItemCount(cid,2160) >= 1 then if doPlayerRemoveItem(cid,2160,1) and doPlayerRemoveItem(cid,2160,1) then npcHandler:say('Ah, certo! Aqui esta o seu addon, volte sempre.') doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid,fassassino,1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 152, 1) elseif getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 156, 2) end end else selfSay(noitems) end else selfSay(already) end end function AssassinoSecond(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end addon = getPlayerStorageValue(cid,sassassino) if addon == -1 then if getPlayerItemCount(cid,2160) >= 1 then if doPlayerRemoveItem(cid,2160,1) then npcHandler:say('Ah, certo! Aqui esta o seu addon, volte sempre.') doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid,sassassino,1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 152, 2) elseif getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 156, 1) end end else selfSay(noitems) end else selfSay(already) end end node2 = keywordHandler:addKeyword({'addon1'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce pode comprar o segundo addon por. Voce tem-los com voce?'}) node2:addChildKeyword({'yes'}, AssassinoFirst, {}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem entao. Volte quando voce tem todos os itens necessarios.', reset = true}) node3 = keywordHandler:addKeyword({'addon2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce pode comprar o segundo addon por. Voce tem-los com voce?'}) node3:addChildKeyword({'yes'}, AssassinoSecond, {}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem entao. Volte quando voce tem todos os itens necessarios.', reset = true}) npcHandler:addModule(FocusModule:new()) Editado Fevereiro 15, 2015 10 anos por Summ (veja o histórico de edições)
Postado Fevereiro 15, 2015 10 anos Autor 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 -- Storage IDs -- fassassino = 22005 sassassino = 22006 newaddon = 'Ah, certo! Aqui esta o seu addon, volte sempre.' noitems = 'Voce nao tem todos os itens necessarios.' noitems2 = 'Voce nao tem todos os itens necessarios.' already = 'Parece que voce ja tem este addon, nao tente me zombar filho!' function AssassinoFirst(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end addon = getPlayerStorageValue(cid,fassassino) if addon == -1 then if getPlayerItemCount(cid,2160) >= 1 and getPlayerItemCount(cid,2160) >= 1 then if doPlayerRemoveItem(cid,2160,1) and doPlayerRemoveItem(cid,2160,1) then npcHandler:say('Ah, certo! Aqui esta o seu addon, volte sempre.') doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid,fassassino,1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 152, 1) elseif getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 156, 2) end end else selfSay(noitems) end else selfSay(already) end end function AssassinoSecond(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end addon = getPlayerStorageValue(cid,sassassino) if addon == -1 then if getPlayerItemCount(cid,2160) >= 1 then if doPlayerRemoveItem(cid,2160,1) then npcHandler:say('Ah, certo! Aqui esta o seu addon, volte sempre.') doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid,sassassino,1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 152, 2) elseif getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 156, 1) end end else selfSay(noitems) end else selfSay(already) end end node2 = keywordHandler:addKeyword({'addon1'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce pode comprar o segundo addon por. Voce tem-los com voce?'}) node2:addChildKeyword({'yes'}, AssassinoFirst, {}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem entao. Volte quando voce tem todos os itens necessarios.', reset = true}) node3 = keywordHandler:addKeyword({'addon2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce pode comprar o segundo addon por. Voce tem-los com voce?'}) node3:addChildKeyword({'yes'}, AssassinoSecond, {}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem entao. Volte quando voce tem todos os itens necessarios.', reset = true}) npcHandler:addModule(FocusModule:new()) Não deu, ele continua só entregando para players vip, quando um player que não é vip pede o addon o NPC responde isso :"11:16 Assassin: Parece que voce ja tem este addon, nao tente me zombar filho!" Não deu certo
Postado Fevereiro 15, 2015 10 anos 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 -- Storage IDs -- fassassino = 22015 sassassino = 22016 newaddon = 'Ah, certo! Aqui esta o seu addon, volte sempre.' noitems = 'Voce nao tem todos os itens necessarios.' noitems2 = 'Voce nao tem todos os itens necessarios.' already = 'Parece que voce ja tem este addon, nao tente me zombar filho!' function AssassinoFirst(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end local addon = getPlayerStorageValue(cid,fassassino) if addon < 1 then if getPlayerItemCount(cid,2160) >= 1 and getPlayerItemCount(cid,2160) >= 1 then if doPlayerRemoveItem(cid,2160,1) and doPlayerRemoveItem(cid,2160,1) then npcHandler:say('Ah, certo! Aqui esta o seu addon, volte sempre.') doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid,fassassino,1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 152, 1) elseif getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 156, 2) end end else selfSay(noitems) end else selfSay(already) end end function AssassinoSecond(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end local addon = getPlayerStorageValue(cid,sassassino) if addon < 1 then if getPlayerItemCount(cid,2160) >= 1 then if doPlayerRemoveItem(cid,2160,1) then npcHandler:say('Ah, certo! Aqui esta o seu addon, volte sempre.') doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid,sassassino,1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 152, 2) elseif getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 156, 1) end end else selfSay(noitems) end else selfSay(already) end end node2 = keywordHandler:addKeyword({'addon1'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce pode comprar o segundo addon por. Voce tem-los com voce?'}) node2:addChildKeyword({'yes'}, AssassinoFirst, {}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem entao. Volte quando voce tem todos os itens necessarios.', reset = true}) node3 = keywordHandler:addKeyword({'addon2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce pode comprar o segundo addon por. Voce tem-los com voce?'}) node3:addChildKeyword({'yes'}, AssassinoSecond, {}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem entao. Volte quando voce tem todos os itens necessarios.', reset = true}) npcHandler:addModule(FocusModule:new())
Postado Fevereiro 15, 2015 10 anos Autor 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 -- Storage IDs -- fassassino = 22015 sassassino = 22016 newaddon = 'Ah, certo! Aqui esta o seu addon, volte sempre.' noitems = 'Voce nao tem todos os itens necessarios.' noitems2 = 'Voce nao tem todos os itens necessarios.' already = 'Parece que voce ja tem este addon, nao tente me zombar filho!' function AssassinoFirst(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end local addon = getPlayerStorageValue(cid,fassassino) if addon < 1 then if getPlayerItemCount(cid,2160) >= 1 and getPlayerItemCount(cid,2160) >= 1 then if doPlayerRemoveItem(cid,2160,1) and doPlayerRemoveItem(cid,2160,1) then npcHandler:say('Ah, certo! Aqui esta o seu addon, volte sempre.') doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid,fassassino,1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 152, 1) elseif getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 156, 2) end end else selfSay(noitems) end else selfSay(already) end end function AssassinoSecond(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end local addon = getPlayerStorageValue(cid,sassassino) if addon < 1 then if getPlayerItemCount(cid,2160) >= 1 then if doPlayerRemoveItem(cid,2160,1) then npcHandler:say('Ah, certo! Aqui esta o seu addon, volte sempre.') doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid,sassassino,1) if getPlayerSex(cid) == 1 then doPlayerAddOutfit(cid, 152, 2) elseif getPlayerSex(cid) == 0 then doPlayerAddOutfit(cid, 156, 1) end end else selfSay(noitems) end else selfSay(already) end end node2 = keywordHandler:addKeyword({'addon1'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce pode comprar o segundo addon por. Voce tem-los com voce?'}) node2:addChildKeyword({'yes'}, AssassinoFirst, {}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem entao. Volte quando voce tem todos os itens necessarios.', reset = true}) node3 = keywordHandler:addKeyword({'addon2'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce pode comprar o segundo addon por. Voce tem-los com voce?'}) node3:addChildKeyword({'yes'}, AssassinoSecond, {}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Tudo bem entao. Volte quando voce tem todos os itens necessarios.', reset = true}) npcHandler:addModule(FocusModule:new()) '-' Agora aparece o efeito que o addon foi entregue para o player que nao é vip, mas quando vou trocar a outfit o addon não ta lá '-' Depois eu falo de novo com o NPC e ele fala que ja tenho o addon. O NPC ta entregando o addon mas o addon não ta indo pro player '-' lol '-' Agora aparece o efeito que o addon foi entregue para o player que nao é vip, mas quando vou trocar a outfit o addon não ta lá '-' Depois eu falo de novo com o NPC e ele fala que ja tenho o addon. O NPC ta entregando o addon mas o addon não ta indo pro player '-' lol O VIP ta normal, só o free que não recebe o addon
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.