Gente Primeiramente agredecendo ao Antoniojun Pelo NPC de encantamento xD adorei
Alchemist Suplice e um vendedor de Hydra Eggs,Fire Mushroom,Crystal ring e Ice Shard, que são uteis para enchanting de Weapons....
Primeiramente va em Data/NPC e copie qualquer arquivo.xml e coloque o nome de Alchemy suplice ou qualquer coisa que vc quiser... enchanting suplice por exemplo ou outro nome qualquer...
clicke com o botão direito e coloque em Edit
apague tudo que estiver la e coloque isso
<?xml version="1.0"?>
<npc name="Alchemy suplice" script="data/npc/scripts/alchemysuplice.lua" access="5" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="57" head="20" body="30" legs="40" feet="50" corpse="3128"/>
</npc>
O NPC name e o que vc muda se quiser mudar o nome do NPC
Agora va em Data/Npc/script e la copie qualquer arquivo.lua e coloque o nome de alchemysuplice
apague tudo e coloque la dentro;
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)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hello ' .. creatureGetName(cid) .. '! I sell all materials for alchemy 500gp.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'Fire Mushroom') then
buy(cid,2795,getCount(msg),500)
elseif msgcontains(msg, 'Hydra Eggs') then
buy(cid,4850,getCount(msg),500)
elseif msgcontains(msg, 'Ice Shard') then
buy(cid,7290,getCount(msg),500)
elseif msgcontains(msg, 'Crystal Ring') then
buy(cid,2124,getCount(msg),500)
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('Good bye then.')
focus = 0
end
end
end
E é isso qualquer Bug Poste
100% By me ShinigamiWL
NPC Encantador de armas link = http://www.xtibia.com/forum/Npc-Encantando-Armas-t83851.html
Edite A gosto e se Gostar Post =D