data\npc\nomedoarquivo.xml
<npc name="NOMEDONPC" script="data/npc/scripts/nomedoarquivo.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="134" head="78" body="88" legs="0" feet="88" addons="3"/>
<parameters>
<parameter key="message_greet" value="Ola. Para mais informacoes de meus servicos diga {skills}." />
<parameter key="message_farewell" value="Tchau." />
<parameter key="message_walkaway" value="Tchau." />
</parameters>
</npc>
data\npc\scripts\nomedoarquivo.lua
------------------- By Notle ------------------- local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local money = 100000 -------------- aqui vc coloca quantos de granas local ps = 1 -- players skills 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 creatureSayCallback(cid, type, msg) if msgcontains(msg, 'skills') then if doPlayerRemoveMoney(cid,money) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) doPlayerAddSkillTry(cid,0,ps) doPlayerAddSkillTry(cid,1,ps) doPlayerAddSkillTry(cid,2,ps) doPlayerAddSkillTry(cid,3,ps) doPlayerAddSkillTry(cid,4,ps) doPlayerAddSkillTry(cid,5,ps) doPlayerAddSkillTry(cid,6,ps) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabéns Vou Te Editar Por Ter Recebido Minha Grana") else doPlayerSendCancel(cid,"Você Não Tem Grana Só Lamento.") end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) ------------------- By Notle -------------------




info
Grupo: Cavaleiro
Registrado: 04/06/12
Posts: 188
Reputação: +22
Char no Tibia: Muleke do Sangue
eu queria um npc que vende skills tipo assim o cara da 3000000 de gps e ganha um skill entenderam por favor me fale ou me de o link se ja existe um script desses!!