Mehahbr 1 Postado Janeiro 22, 2012 Share Postado Janeiro 22, 2012 Meu npc de promotion bless e addon criado por mim no Otserver 8.5 esta dando erro no servidor 8.6 ... Na hora de você dizer "yes" pra comprar as coisas ele nao vende e nao fala as frases... O que pode ser? ele é feito assim 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 local node1 = keywordHandler:addKeyword({'promotion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) local node2 = keywordHandler:addKeyword({'first addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first addons set for 150000 gold coins?'}) node2:addChildKeyword({'yes'}, buyAddons, {npcHandler = npcHandler, cost = 15000000, addon = 1, text = 'Congratulations! You are have a First Addon.'}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) local node3 = keywordHandler:addKeyword({'second addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to buy the second addons set for 300000 gold coins?'}) node2:addChildKeyword({'yes'}, buyAddons, {npcHandler = npcHandler, cost = 30000000, addon = 1, text = 'Congratulations! You are a Second Addon.'}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) local node4 = keywordHandler:addKeyword({'primeira bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first blessing for 10000 gold?'}) node1:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 1, premium = true, cost = 10000}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node5 = keywordHandler:addKeyword({'segunda bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the second blessing for 10000 gold?'}) node2:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 2, premium = true, cost = 10000}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node6 = keywordHandler:addKeyword({'terceira bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the third blessing for 10000 gold?'}) node3:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 3, premium = true, cost = 10000}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node7 = keywordHandler:addKeyword({'quarta bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fourth blessing for 10000 gold?'}) node4:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 4, premium = true, cost = 10000}) node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node8 = keywordHandler:addKeyword({'quinta bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fifth blessing for 10000 gold?'}) node5:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 5, premium = true, cost = 10000}) node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) npcHandler:addModule(FocusModule:new()) O que esta de errado nele? Obrigado Link para o comentário https://xtibia.com/forum/topic/178823-erro-no-npc-de-promotion-ajudem-me/ Compartilhar em outros sites More sharing options...
Tryller 193 Postado Janeiro 22, 2012 Share Postado Janeiro 22, 2012 (editado) Vou testar no Crystal pra ver. edit Esse é o erro? [22/1/2012 19:43:22] data/npc/lib/npcsystem/modules.lua:150: attempt to compare nil with number[22/1/2012 19:43:22] stack traceback: [22/1/2012 19:43:22] data/npc/lib/npcsystem/modules.lua:150: in function 'callback' [22/1/2012 19:43:22] data/npc/lib/npcsystem/keywordhandler.lua:41: in function 'processMessage' [22/1/2012 19:43:22] data/npc/lib/npcsystem/keywordhandler.lua:176: in function 'processNodeMessage' [22/1/2012 19:43:22] data/npc/lib/npcsystem/keywordhandler.lua:128: in function 'processMessage' [22/1/2012 19:43:22] data/npc/lib/npcsystem/npchandler.lua:426: in function 'onCreatureSay' [22/1/2012 19:43:22] data/npc/scripts/bless.lua:7: in function <data/npc/scripts/bless.lua:7> Editado Janeiro 22, 2012 por Tryller Link para o comentário https://xtibia.com/forum/topic/178823-erro-no-npc-de-promotion-ajudem-me/#findComment-1183323 Compartilhar em outros sites More sharing options...
Mehahbr 1 Postado Janeiro 22, 2012 Autor Share Postado Janeiro 22, 2012 sim sim porquee? ele ta com problema na bless, promotion e na addon Link para o comentário https://xtibia.com/forum/topic/178823-erro-no-npc-de-promotion-ajudem-me/#findComment-1183356 Compartilhar em outros sites More sharing options...
Tryller 193 Postado Janeiro 22, 2012 Share Postado Janeiro 22, 2012 Promotion funcionou aqui Estou vendo agroa os outros 2 Se possivel poderia apstar a pasta npc com apenas o npc denttro e as libs?? para eu testar com susas libs no crystal e ver oq ta acontecendo Link para o comentário https://xtibia.com/forum/topic/178823-erro-no-npc-de-promotion-ajudem-me/#findComment-1183362 Compartilhar em outros sites More sharing options...
Mehahbr 1 Postado Janeiro 22, 2012 Autor Share Postado Janeiro 22, 2012 esta é minha lib... http://sharex.xpg.com.br/files/8818428005/lib.rar.html Link para o comentário https://xtibia.com/forum/topic/178823-erro-no-npc-de-promotion-ajudem-me/#findComment-1183402 Compartilhar em outros sites More sharing options...
Tryller 193 Postado Janeiro 23, 2012 Share Postado Janeiro 23, 2012 Pronto refiz o npc Percebi que ele vendi addons, promote e as bless ai criei um npc. Aqui funcionou normalmente Este é o script do NPC http://sharex.xpg.com.br/files/8504594906/npc.lua.html Link para o comentário https://xtibia.com/forum/topic/178823-erro-no-npc-de-promotion-ajudem-me/#findComment-1183573 Compartilhar em outros sites More sharing options...
Mehahbr 1 Postado Janeiro 23, 2012 Autor Share Postado Janeiro 23, 2012 mas aqui você arrancou o inicio dele... porque ele so atendia quando o player falava hail king :s ... mas tudo bem muito obrigado! Resolveu o outro npc que te falei a dois 2 atras... Link para o comentário https://xtibia.com/forum/topic/178823-erro-no-npc-de-promotion-ajudem-me/#findComment-1183885 Compartilhar em outros sites More sharing options...
Posts Recomendados