Ir para conteúdo

[npc]addon Por Item, Com Todos Os Outfits.


Posts Recomendados

poo , eu mudei os itens do script e o treco bugou :/

 

e até agora ja olhei todos os erros possiveis e ta tudo direitin

menos os itens que num taum igual pq os itens que era dai era impossivel de adquirir no meu server

alguem pode me ajudar com isso ?

Link para o comentário
Compartilhar em outros sites

@AlissonLinneker

 

Agora so falta o NPC A Sweaty Cyclops para trocar os itens

 

Eu tenho um aqui mais num funfa bem não :blush:

 

SCRIPT

 

local exchanges = {

{takeId = 2487, takeCount = 1, giveId = 5887, giveCount = 1, keywords = {'crown armor','piece of royal steel'}},

{takeId = 2195, takeCount = 1, giveId = 5891, giveCount = 1, keywords = {'boh','enchanted chicken wings'}},

{takeId = 2498, takeCount = 2, giveId = 5884, giveCount = 1, keywords = {'fighting spirit','royal helmet'}},

{takeId = 2475, takeCount = 4, giveId = 5885, giveCount = 1, keywords = {'warriors sweat','warrior helmet'}},

{takeId = 5879, takeCount = 10, giveId = 5886, giveCount = 1, keywords = {'spool of yarn','giant spider silk'}},

{takeId = 2393, takeCount = 1, giveId = 5892, giveCount = 1, keywords = {'crude iron','giant sword'}},

{takeId = 2462, takeCount = 1, giveId = 5888, giveCount = 1, keywords = {'devil helmet','piece of hell steel'}},

{takeId = 2516, takeCount = 1, giveId = 5889, giveCount = 1, keywords = {'dragon shield','piece of draconian steel'}},

}

 

local phrases = {

"Oi, {|PLAYERNAME|} ! Em que posso ajudar?",

"How rude!",

"Wait! I'm talking.",

"Você não tem o item",

"Thank you so much.",

"Volte sempre, {|PLAYERNAME|}",

"Ohh, this is bad",

trade1="Do you want to trade your",

trade2="by"

}

 

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, phrases[1])

npcHandler:setMessage(MESSAGE_WALKAWAY, phrases[2])

npcHandler:setMessage(MESSAGE_PLACEDINQUEUE, phrases[3])

npcHandler:setMessage(MESSAGE_FAREWELL, phrases[6])

 

local function cyclopsExchange(cid, message, keywords, parameters, node)

local exchange = exchanges[parameters.id]

if (not npcHandler:isFocused(cid)) then return false end

if doPlayerTakeItem(cid, exchange.takeId, exchange.takeCount) > 0 then

doPlayerAddItem(cid, exchange.giveId, exchange.giveCount)

npcHandler:say(phrases[5], cid)

else npcHandler:say(phrases[4], cid) end

keywordHandler:moveUp(1)

return TRUE

end

 

for i = 1, #exchanges do

local exchange = exchanges

for a = 1, #exchange.keywords do

local node = keywordHandler:addKeyword({exchange.keywords[a]}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text =phrases.trade1..' '..getItemName(exchange.takeId)..' '..phrases.trade2..' '..getItemName(exchange.giveId)..'?'})

node:addChildKeyword({'yes'}, cyclopsExchange, {id = i})

node:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = phrases[7]})

end

end

 

npcHandler:addModule(FocusModule:new())

 

NPC

 

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

<npc name="A Sweaty Cyclops" script="data/npc/scripts/bootmaker.lua" walkinterval="2000" floorchange="0">

<health now="100" max="100"/>

<look type="22" head="0" body="0" legs="0" feet="0" addons="0"/>

</npc>

 

Se servir como base para você, e você puder trazer um NPC excelente como o que faz os addon por item, todos nois seremos gratos :smile_positivo:

 

Obs: Seus trabalho são EXCELENTE

Link para o comentário
Compartilhar em outros sites

  • 2 months later...

Script muito bom... me ajudou muito pois o que eu tinha faltava o demonhunter ai eu criei mais ficou meia boca ai esse agora eu so mudei os itens do demonhunter e ficou show de bola.

Alisson muito obrigado por trazer sempre boas coisas a nossa comunidade =]

Link para o comentário
Compartilhar em outros sites

addonfdp.th.jpg

 

Loguei o GOD Delton, olhei os items por ID no addons.lua, derrepente, com os itens do first citizen(minotaur leather 100), mesmo o npc não falando nada, eu falei yes e o npc:

 

Here you are.

 

Veja:

 

buged.th.jpg

 

Bug chato, em?

Editado por xDGabrielxDs
Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...

<...>

 

goosteeeii ;D

 

 

fiikooo Roox~~

 

deu certim akew ;X

 

:bigboulay::oh: :oh: :diablo:

 

<a href="http://www.fodey.com/generators/animated/ninjatext.asp"><img src="http://r9.fodey.com/2050/c44681f2aba8420090bebb851878490c.0.gif" border=0 width="243" height="119" alt=""></a>c44681f2aba8420090bebb851878490c.0.gif

Editado por marco22
Link para o comentário
Compartilhar em outros sites

  • 3 weeks later...

alisson usa esse parte aqui do npc na parte do hunte addon que ele vai entregar o addon certo pra mulher.

 

 

-- hunter (done)

local outfit_node = keywordHandler:addKeyword({'hunter addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5947,1}, {5876,100}, {5948,100}, {5891,5}, {5887,1}, {5889,1}, {5888,1}}, outfit_female = 137, addon = 2, outfit_male = 129, addon = 1, storageID = 20048})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

local outfit_node = keywordHandler:addKeyword({'sniper addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5875,1}}, outfit_female = 137, addon = 1, outfit_male = 129, addon = 2, storageID = 20049})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

 

e na rl quem faz nightmare addon nao faz brotherhood entao eu fiz assim no meu:

 

-- nightmare (done)(custom)

local outfit_node = keywordHandler:addKeyword({'first nightmare addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,1500}}, outfit_female = 269, outfit_male = 268, addon = 1, storageID = 20039, storageID = 20044})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

local outfit_node = keywordHandler:addKeyword({'second nightmare addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,1500}}, outfit_female = 269, outfit_male = 268, addon = 2, storageID = 20040, storageID = 20042, storageID = 20045})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

 

-- brotherhood (done)(custom)

local outfit_node = keywordHandler:addKeyword({'first brotherhood addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,1500}}, outfit_female = 136, outfit_male = 278, addon = 1, storageID = 20039, storageID = 20045})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

local outfit_node = keywordHandler:addKeyword({'second brotherhood addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{6500,1500}}, outfit_female = 136, outfit_male = 278, addon = 2, storageID = 20040, storageID = 20043, storageID = 20044})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

 

e tem tb o problema com o summoner e o mage addon que e diferente entre homens e mulheres contornei tb o problema dessa forma.

 

-- mage (done)

local outfit_node = keywordHandler:addKeyword({'magician addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{2182,1}, {2186,1}, {2185,1}, {2181,1}, {2183,1}, {2190,1}, {2191,1}, {2188,1}, {2189,1}, {2187,1}, {5809,1}, {2193,20}}, outfit_female = 141, outfit_male = 130, addon = 1, storageID = 20007})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

local outfit_node = keywordHandler:addKeyword({'ferumbras hat'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5903,1}}, outfit_female = 141, outfit_male = 130, addon = 2, storageID = 20008})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

 

 

-- summoner (done)

local outfit_node = keywordHandler:addKeyword({'ticket addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5957,1}}, outfit_female = 138, outfit_male = 133, addon = 1, storageID = 20009})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

local outfit_node = keywordHandler:addKeyword({'mage addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5894,70}, {5911,20}, {5883,40}, {5922,35}, {5879,10}, {5881,60}, {5882,40}, {5905,30}}, outfit_female = 138, outfit_male = 133, addon = 2, storageID = 20010})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

 

espero que isso ajude.

Link para o comentário
Compartilhar em outros sites

  • 1 month later...
×
×
  • Criar Novo...