esse npc e em portugues vc chega e fala oi e ele fala um monte de coisas vc fala uma das opçoes e ele obedece (a ue te afeta)
ai vai o codigo do q fica na pasta npc(dados dele)eu sugiro que coloque o nome de monsc.xml:
<?xml version="1.0"?><npc name="Criador de Monstros" script="data/npc/scripts/heal2.lua" access="5" lookdir="1">
<health now="9000" max="9000"/>
<look type="57" head="20" body="30" legs="40" feet="50" corpse="3128"/>
</npc>
se quiser muda o nome dele!
Ai vai o que fica no scripts(fala e etc...)ponha o nome de "heal2.lua"
(obrigatorio):
target = 0focus = 0
talk_start = 0
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
end
function onCreatureTurn(creature)
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if ((string.find(msg, '(%a*)oi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 5 then
selfSay('OI ' .. creatureGetName(cid) .. '!Que bicho vc quer q eu sumone como bicho que nao ataca?Demon, Ferumbras?E sem summon?SDemon, SFrumbras?Cuidado eles te atacam em!Se vc quiser ultimate explosion fala ue!Isse do ue e so teste!E se quiser heal fala vida!')
focus = cid
talk_start = os.clock()
elseif (string.find(msg, '(%a*)demon(%a*)') and focus ~= 0) then
selfSay('/summon demon')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)ferumbras(%a*)') and focus ~= 0) then
selfSay('/summon ferumbras')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)sdemon(%a*)') and focus ~= 0) then
selfSay('/m demon')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)sferumbras(%a*)') and focus ~= 0) then
selfSay('/m demon')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)ue(%a*)') and focus ~= 0) then
selfSay('exevo gran mas vis')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)vida(%a*)') and focus ~= 0) then
if getPlayerHealth(cid) <= 80 then
heal(cid, 80)
else
selfSay('I cannot heal you.')
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if focus > 0 then
x, y, z = creatureGetPosition(focus)
myx, myy, myz = selfGetPosition()
if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then
selfTurn(0)
end
if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then
selfTurn(2)
end
if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then
selfTurn(1)
end
if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then
selfTurn(3)
end
if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(1)
end
if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(3)
end
if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(2)
end
if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(0)
end
if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(1)
end
if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(3)
end
if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(2)
end
if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(0)
end
if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(1)
end
if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(3)
end
if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(2)
end
if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(0)
end
end
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Va embor se vc nao pediu nada!Dexa o otro treinar!Se ja pediu ignore!')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Tiau!Volte sempre que quiser matar monstros!.')
focus = 0
end
end
end
algum bug duvida ou sugestao do npc me fala!