Va na pasta Data/NPC do seu server copie e cole algum arquivo .xml e dentro dele coloque isso:
<?xml version="1.0"?><npc name="Vendedor de runas" script="data/npc/scripts/bp_de_runa.lua" access="9" autowalk="0">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="134" head="78" body="88" legs="0" feet="88"/>
</npc>
Depois feche e salve renomeie pra Vendedor de runas
depois va na pasta Data/NPC/Scripts copie algum arquivo .lua e cole isso dentro dele
local focus = 0local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
local msg = string.lower(msg)
if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) < 4 then
selfSay('Hello ' .. creatureGetName(cid) .. '! Eu vendo Bps de runes, Wands e Rods para ver os preços diga bps de runes.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and focus ~= cid and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! Eu ja falo contigo.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'bps de runes') then
selfSay('Bp de sd (8k), Bp de explosion (6.5k), Bp de UH (6k), Bp HMM (2.5k), ')
elseif msgcontains(msg, 'wands') then
selfSay('I sell wand of inferno (15k), plague (5k), cosmic energy (10k), vortex (500gp) and dragonbreath (1k).')
elseif msgcontains(msg, 'rods') then
selfSay('I sell quagmire (10k), snakebite (500gp), tempest (15k), volcanic (5k) and moonlight rod (1k).')
elseif msgcontains(msg, 'inferno') then
buy(cid,2187,getCount(msg),15000)
elseif msgcontains(msg, 'plague') then
buy(cid,2188,getCount(msg),5000)
elseif msgcontains(msg, 'cosmic energy') then
buy(cid,2189,getCount(msg),10000)
elseif msgcontains(msg, 'vortex') then
buy(cid,2190,getCount(msg),500)
elseif msgcontains(msg, 'dragonbreath') then
buy(cid,2191,getCount(msg),1000)
elseif msgcontains(msg, 'quagmire') then
buy(cid,2181,getCount(msg),10000)
elseif msgcontains(msg, 'snakebite') then
buy(cid,2182,getCount(msg),500)
elseif msgcontains(msg, 'tempest') then
buy(cid,2183,getCount(msg),15000)
elseif msgcontains(msg, 'volcanic') then
buy(cid,2185,getCount(msg),5000)
elseif msgcontains(msg, 'moonlight') then
buy(cid,2186,getCount(msg),1000)
elseif msgcontains(msg, 'bp sd') then
buyContainer(cid,2003,2268,1,8000)
elseif msgcontains(msg, 'bp explosion') then
buyContainer(cid,2000,2313,6,6500)
elseif msgcontains(msg, 'bp uh') then
buyContainer(cid,2001,2273,1,6000)
elseif msgcontains(msg, 'bp hmm') then
buyContainer(cid,2002,2311,10,2500)
elseif msgcontains(msg, 'bp gfb') then
buyContainer(cid,2000,2304,4,4000)
elseif msgcontains(msg, 'blank') then
buy(cid,2260,getCount(msg),5)
elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Flw volte sempre ^^.')
focus = 0
end
end
end
Renomeie para bp_de_runa.lua
Duvidas / Erros tell me ^^
Créditos:
100% pra mim que fiz o npc do 0 entaum se for postar em algumoutro lugar gimme creditos ^^