Crie um arquivo chamado terry.xml em npcs
Dentro coloque
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Terry" script="data/npc/scripts/Terry.lua" access="3" lookdir="2" walkinterval="2000">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="142" head="114" body="15" legs="16" feet="0" addons="2"/>
</npc>
Agora
Crie um arquivo chamado Terry.lua dentro de npcs/scripts e coloque
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 thinkCallback(cid)
local rand = math.random(1,100)
if rand == 1 then
selfSay('Eu Vendo itens VIP para comprar fale trade.')
end
return true
end
function greetCallback(cid)
return true
end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:addSellableItem({'Holy Staff', 'VIP Staff'}, 2184, 3000000000, 'Holy Staff')
shopModule:addSellableItem({'Slingshot', 'VIP Crossbow'}, 5907, 3000000000, 'Slingshot')
shopModule:addSellableItem({'Reapers Axe', 'VIP Axe'}, 7420, 3000000000, 'Reapers Axe')
shopModule:addSellableItem({'Skullcruher', 'VIP Hammer'}, 7423, 3000000000, 'Skullcruher')
shopModule:addSellableItem({'Calamity', 'VIP Sword'}, 8932, 3000000000, 'Calamity')
npcHandler:setCallback(CALLBACK_ONTHINK, thinkCallback)
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:addModule(FocusModule:new())
TE AJUDEI? REP+



info
Grupo: Campones
Registrado: 12/01/08
Posts: 60
Reputação: +6
Alguem poderia fazer este npc pra mim?
o nome vai ser Npc Vip
vai vender apenas 5 items
Holy Staff[VIP Staff] - ID 2184
Slingshot[VIP Crossbow] - ID 5907
Reapers Axe[VIP Axe] - ID 7420
Skullcruher[VIP Hammer] - ID 7423
Calamity[VIp Sword] - ID 8932
Todos por 3kk
O outfit eu tenho preferencia no warrior só com a espadinha mas podem deixar como quiserem nem ligo mtu pra ropa do npc não;x
Abração ae ;D