Postado Dezembro 14, 2013 11 anos Então, eu quero um script pra adicionar na quest do nightmare/brotherhood outfit/addon. Seguinte, os addons já são free pra qualquer player, então o que eu realmente quero é um NPC onde se eu entregasse 500 demonic essences receberia o addon 1, e depois entregasse 1000 demonic essences receberia o segundo addon junto com um nightmare shield. Pode deixar os addons e itens de entregar/outfit a receber configurável que eu me viro. Skype @kaiquegabriel__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Atenciosamente, kaiquegabriel. Não dou suporte via pm. Em caso de dúvidas, crie um tópico e espere o suporte.
Postado Dezembro 23, 2013 11 anos Já que ninguém respondeu... nightbrother.xml <?xml version="1.0"?> <npc name="Addons NPC" script="data/npc/scripts/nightbrother.lua" walkinterval="1000" floorchange="0"> <health now="100" max="100"/> <look type="155" head="115" body="76" legs="76" feet="83" addons="3"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Podemos trocar alguns itens pelos addons {first nightmare addon}, {second nightmare addon}, {first brotherhood addon} e {second brotherhood addon}" /> </parameters> </npc> nightbrother.lua 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 local a = { nightoutfitfemale = 269, -- id do nightmare addon female nightoutfitemale = 268, -- id do nightmare addon male brotheroutfitfemale = 279, -- id do brotherhood addon female brotheroutfitmale = 278, -- id do brotherhood addon male quant1 = 500, -- quantidade de demonic que precisa para os first addons quant2 = 1000, -- quantidade de demonic que precisa para os second addons demonic = 6500, -- Não troque item1 = 6391, -- id do nightmare shield item2 = 6433, -- id do necromancer shield } -- Nightmare Addon -- if msgcontains(msg, 'first nightmare addon') then if getPlayerSex(cid) == 0 then if getPlayerItemCount(cid, a.demonic) >= a.quant1 then doPlayerAddOutfit(cid,a.nightoutfitfemale, 1) doPlayerRemoveItem(cid, a.demonic, a.quant1) selfSay('Você ganhou o {first nightmare addon}!', cid) else selfSay('Você precisa de {'..a.quant1..' '..getItemNameById(a.demonic)..'} para fazer o {first nightmare addon}.', cid) end end end if msgcontains(msg, 'second nightmare addon') then if getPlayerStorageValue(cid,76435) == -1 then if getPlayerSex(cid) == 0 then if getPlayerItemCount(cid, a.demonic) >= a.quant2 then doPlayerAddOutfit(cid,a.nightoutfitfemale, 2) doPlayerRemoveItem(cid, a.demonic, a.quant2) doPlayerAddItem(cid, a.item1, 1) setPlayerStorageValue(cid,76435,1) selfSay('Você ganhou o {second nightmare addon} e um {'..getItemNameById(a.item1)..'}!', cid) else selfSay('Você precisa de {'..a.quant2..' '..getItemNameById(a.demonic)..'} para fazer o {second nightmare addon}.', cid) end end else selfSay('Você já fez o {second nightmare addon}.', cid) end end if msgcontains(msg, 'first nightmare addon') then if getPlayerSex(cid) == 1 then if getPlayerItemCount(cid, a.demonic) >= a.quant1 then doPlayerAddOutfit(cid,a.nightoutfitmale, 1) doPlayerRemoveItem(cid, a.demonic, a.quant1) selfSay('Você ganhou o {first nightmare addon}!', cid) else selfSay('Você precisa de {'..a.quant1..' '..getItemNameById(a.demonic)..'} para fazer o {first nightmare addon}.', cid) end end end if msgcontains(msg, 'second nightmare addon') then if getPlayerSex(cid) == 1 then if getPlayerItemCount(cid, a.demonic) >= a.quant2 then doPlayerAddOutfit(cid,a.nightoutfitmale, 2) doPlayerRemoveItem(cid, a.demonic, a.quant2) doPlayerAddItem(cid, a.item1, 1) selfSay('Você ganhou o {second nightmare addon} e um {'..getItemNameById(a.item1)..'}!', cid) else selfSay('Você precisa de {'..a.quant2..' '..getItemNameById(a.demonic)..'} para fazer o {second nightmare addon}.', cid) end end end -- Nightmare Addon -- -- Brotherhood Addon -- if msgcontains(msg, 'first brotherhood addon') then if getPlayerSex(cid) == 0 then if getPlayerItemCount(cid, a.demonic) >= a.quant1 then doPlayerAddOutfit(cid,a.brotheroutfitfemale, 1) doPlayerRemoveItem(cid, a.demonic, a.quant1) selfSay('Você ganhou o {first brotherhood addon}!', cid) else selfSay('Você precisa de {'..a.quant1..' '..getItemNameById(a.demonic)..'} para fazer o {first brotherhood addon}.', cid) end end end if msgcontains(msg, 'second brotherhood addon') then if getPlayerSex(cid) == 0 then if getPlayerItemCount(cid, a.demonic) >= a.quant2 then doPlayerAddOutfit(cid,a.brotheroutfitmale, 2) doPlayerRemoveItem(cid, a.demonic, a.quant2) doPlayerAddItem(cid, a.item2, 1) selfSay('Você ganhou o {second brotherhood addon} e um {'..getItemNameById(a.item2)..'}!', cid) else selfSay('Você precisa de {'..a.quant2..' '..getItemNameById(a.demonic)..'} para fazer o {second brotherhood addon}.', cid) end end end if msgcontains(msg, 'first brotherhood addon') then if getPlayerSex(cid) == 1 then if getPlayerItemCount(cid, a.demonic) >= a.quant1 then doPlayerAddOutfit(cid,a.brotheroutfitfemale, 1) doPlayerRemoveItem(cid, a.demonic, a.quant1) selfSay('Você ganhou o {first brotherhood addon}!', cid) else selfSay('Você precisa de {'..a.quant1..' '..getItemNameById(a.demonic)..'} para fazer o {first brotherhood addon}.', cid) end end end if msgcontains(msg, 'second brotherhood addon') then if getPlayerSex(cid) == 1 then if getPlayerItemCount(cid, a.demonic) >= a.quant2 then doPlayerAddOutfit(cid,a.brotheroutfitmale, 2) doPlayerRemoveItem(cid, a.demonic, a.quant2) doPlayerAddItem(cid, a.item2, 1) selfSay('Você ganhou o {second brotherhood addon} e um {'..getItemNameById(a.item2)..'}!', cid) else selfSay('Você precisa de {'..a.quant2..' '..getItemNameById(a.demonic)..'} para fazer o {second brotherhood addon}.', cid) end end end -- Brotherhood Addon -- return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Edite como quiser nesta parte: local a = { nightoutfitfemale = 269, -- id do nightmare addon female nightoutfitemale = 268, -- id do nightmare addon male brotheroutfitfemale = 279, -- id do brotherhood addon female brotheroutfitmale = 278, -- id do brotherhood addon male quant1 = 500, -- quantidade de demonic que precisa para os first addons quant2 = 1000, -- quantidade de demonic que precisa para os second addons demonic = 6500, -- Não troque item1 = 6391, -- id do nightmare shield item2 = 6433, -- id do necromancer shield } - Verificar se o player é female ou male - Da o outfit(addon) conforme o sexo - Não adicionei storage por preguiça, então se quiser adicione você, a função é igual de quests normais - O player pode falar com o npc quantas vezes quiser 16/11/2014 23/11/2014 RIP AnneMotta 21/01/2012 - 15/01/2014 Liga das lendas: DIAMOND É A META
Postado Dezembro 23, 2013 11 anos Autor não testei ainda mas como é minha neguinha eu confio, rep+ Skype @kaiquegabriel__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Atenciosamente, kaiquegabriel. Não dou suporte via pm. Em caso de dúvidas, crie um tópico e espere o suporte.
Postado Dezembro 23, 2013 11 anos É Tudo Tois 16/11/2014 23/11/2014 RIP AnneMotta 21/01/2012 - 15/01/2014 Liga das lendas: DIAMOND É A META
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.