gabizinhaah 1 Postado Março 18, 2011 Share Postado Março 18, 2011 Galerinha, alguem pode me passar o NPC A Sweaty Cyclops? Thanks Link para o comentário https://xtibia.com/forum/topic/153617-pedido-npc-a-sweaty-cyclops/ Compartilhar em outros sites More sharing options...
0 xXPaquitoXx 4 Postado Março 18, 2011 Share Postado Março 18, 2011 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 function Sweet(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end for i = 1, table.maxn(parameters.items) do if getPlayerItemCount(cid, parameters.items[i]) <= 0 then npcHandler:say('You don\'t have these items!', cid) return true end end for i = 1, table.maxn(parameters.items) do doPlayerRemoveItem(cid,parameters.items[i], 1) end npcHandler:say('Here is your item!', cid) doPlayerAddItem(cid, parameters.reward,1) return true end keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I can forge Amulet, {koshei ancient amulet},{huge chunk of crude iron},{piece of draconian steel},{piece of royal steel} and {piece of hell steel}!"}) local node1 = keywordHandler:addKeyword({'koshei ancient amulet'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a all piece of broken amulet for a Koshei Ancient Amulet?'}) node1:addChildKeyword({'yes'}, Sweet, {items = {8262,8263,8264,8265},reward = 8266}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true}) local node2 = keywordHandler:addKeyword({'huge chunk of crude iron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Giant Sword for a Huge Chunk of Crude Iron?'}) node2:addChildKeyword({'yes'}, Sweet, {items = {2393},reward = 5892}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true}) local node3 = keywordHandler:addKeyword({'piece of draconian steel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Dragon Shield for a Piece of Draconian Steel?'}) node3:addChildKeyword({'yes'}, Sweet, {items = {2516},reward = 5889}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true}) local node4 = keywordHandler:addKeyword({'piece of royal steel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Crown Armor for a Piece of Royal Steel?'}) node4:addChildKeyword({'yes'}, Sweet, {items = {2487},reward = 5887}) node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true}) local node5 = keywordHandler:addKeyword({'piece of royal steel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Devil Helmet for a Piece of Hell Steel?'}) node5:addChildKeyword({'yes'}, Sweet, {items = {2462},reward = 5888}) node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true}) npcHandler:addModule(FocusModule:new()) Se nao souber add aviza que edito post ------------------------ TE ajudei clica ali :button_ok: REP +++++ Link para o comentário https://xtibia.com/forum/topic/153617-pedido-npc-a-sweaty-cyclops/#findComment-1014359 Compartilhar em outros sites More sharing options...
0 gabizinhaah 1 Postado Março 18, 2011 Autor Share Postado Março 18, 2011 Funcionou direitinho Thanks. Link para o comentário https://xtibia.com/forum/topic/153617-pedido-npc-a-sweaty-cyclops/#findComment-1014367 Compartilhar em outros sites More sharing options...
0 xXPaquitoXx 4 Postado Março 18, 2011 Share Postado Março 18, 2011 Magina Link para o comentário https://xtibia.com/forum/topic/153617-pedido-npc-a-sweaty-cyclops/#findComment-1014372 Compartilhar em outros sites More sharing options...
Pergunta
gabizinhaah 1
Galerinha, alguem pode me passar o NPC A Sweaty Cyclops?
Thanks
Link para o comentário
https://xtibia.com/forum/topic/153617-pedido-npc-a-sweaty-cyclops/Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados