TH
pedido

Npc Que Vende Skills!

Por TheSlayer, 01 de ago. de 2012 em Scripts

skills
script
4
1.9k
TheSlayerT
01 de agosto de 2012 às 22:00

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!!

notle2012N
02 de agosto de 2012 às 21:40

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 -------------------

Editado Agosto 3 por notle2012

TheSlayerT
03 de agosto de 2012 às 11:06

Vlw amigo REP+,mas tipo o npc abre a tabela de trade para vender as skills né?

Editado Agosto 3 por TheSlayer

notle2012N
05 de agosto de 2012 às 08:22

pega esse amigo editei esse dai e melhorei ele

LINK