Postado Abril 12, 2015 10 anos EU QUERIA UM NPC Q VENDER-SE PROMOTION NAS QUAIS SERIA ESSAS VOCATION : VOCATION >5 VOCATION >6 VOCATION >7 VOCATION >8 SERIA UM NPC NORMAL COMO OS OUTRO NPC DE PROMOTION O CUSTO SERIA 200 MOEDA AZZUL. REP + PRA QUEM AJUDA.
Postado Abril 12, 2015 10 anos Solução The Forgotten King.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="The Forgotten King" script="promotion.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="133" head="20" body="39" legs="45" feet="7" addons="0"/> </npc> scripts/promotion.lua 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 onPlayerEndTrade(cid) npcHandler:onPlayerEndTrade(cid) end function onPlayerCloseChannel(cid) npcHandler:onPlayerCloseChannel(cid) end local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 2000000 gold coins. Do you want me to promote you?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 2000000, level = 8, 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}) npcHandler:addModule(FocusModule:new())
Postado Abril 12, 2015 10 anos npc>scripts crie um promotion.lua 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({'promot'}, 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 = 200000, 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({'epic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 200000 gold coins. Do you want me to epicize you?'}) node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! You are now epicized.'}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) ]]-- npcHandler:addModule(FocusModule:new()) npc data npc johnny.xml : <?xml version="1.0" encoding="UTF-8"?> <npc name="Johnny" script="promotion.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="133" head="114" body="119" legs="132" feet="114"/> </npc> peguei o npc padrao do meu sv Toda terça-feira um tópico novo: Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/ Peça sua spell (Suporte): https://tibiaking.com/forums/topic/84162-peça-sua-spell/ Chuva de flechas (Spell): https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/ Doom (Spell): https://tibiaking.com/forums/topic/51622-doom-spell/ Utilização do VS Code (Infra): https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/ SD com Combo (Spell): https://tibiaking.com/forums/topic/94520-sd-modificada/ Alteração attack speed (C++): https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/ Bônus de Speed (NPC): https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
Postado Abril 12, 2015 10 anos Autor EU VI QUE VCS SO PEGARAM EM ALGUM LUGAR AI, MAIS EU QUERO UM Q COMPRE AKELAS VOCATIONS. COMO EU SEI QUAL SERIA O PROMOTIO 1 OU 2 ? VLW FIRE DEU CERTO ! Editado Abril 12, 2015 10 anos por macalo (veja o histórico de edições)
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.