Postado Dezembro 27, 2014 10 anos Procurei e não achei os NPC'S que eu queria, era um de Bless, promotion e premium! Se alguém tiver o link deixa ai pra mim, ou mandem um tutorial de como fazer Editado Dezembro 27, 2014 10 anos por TioJapa (veja o histórico de edições)
Postado Dezembro 29, 2014 10 anos Bless: data\npc: <npc name="Blesser Man" script="data/npc/scripts/bless.lua" floorchange="0" walkinterval="25" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="152" head="114" body="114" legs="0" feet="0" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. Eu vendo 5 Bless fale: First Bless ...." /> <parameter key="shop_buyable" value=" Amulet of Loss,2173,10000; "/> </parameters> </npc> data\npc\scripts: 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({'first bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first blessing for 2000 (plus level depending amount) gold?'}) node1:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 1, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node2 = keywordHandler:addKeyword({'second bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the second blessing for 2000 (plus level depending amount) gold?'}) node2:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 2, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node3 = keywordHandler:addKeyword({'third bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the third blessing for 2000 (plus level depending amount) gold?'}) node3:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 3, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node4 = keywordHandler:addKeyword({'fourth bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fourth blessing for 2000 (plus level depending amount) gold?'}) node4:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 4, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120}) node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) local node5 = keywordHandler:addKeyword({'fifth bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fifth blessing for 2000 (plus level depending amount) gold?'}) node5:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 5, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120}) node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'}) npcHandler:addModule(FocusModule:new()) Promotion: Não tenho o script do npc aqui, mas eu criei uma quest que ganha promote de prize, dê uma olhada. Se baseia em somente um baú, mas para cada vocation vem a promote certa: data\actions\scripts: function onUse(cid, item, frompos, item2, topos) -- 5 = MasterSorc, 6 = ElderDruid, 7 = RoyalPally, 8 = EliteKina -- local t = { [1] = {newvoc = 5, stor = 15161}, [2] = {newvoc = 6, stor = 15162}, [3] = {newvoc = 7, stor = 15163}, [4] = {newvoc = 8, stor = 15164}} local voc = t[getPlayerVocation(cid)] if item.uid == 15157 then if voc then if getPlayerStorageValue(cid, voc.stor) == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Você foi promovido!') doPlayerSetVocation(cid, voc.newvoc) doSendMagicEffect(getPlayerPosition(cid), 49) setPlayerStorageValue(cid, voc.stor, 1) else doPlayerSendCancel(cid, "Você já fez essa quest.") end end return TRUE end end data\actions\actions.xml <action uniqueid="15157" script="NOME_DO_SCRIPT.lua" /> Premium: Depende do seu server, se é por item, talkaction, quest ou site. Editado Dezembro 29, 2014 10 anos por Biroskak4 (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.