Vai em npc > scripts e cria heal.lua e coloque isso dentro:
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye sir!')
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)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
for a, b in pairs(gobackmsgs) do
if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then
return true
end
end
if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then
doPlayerRemoveItem(cid, ID DO GOLD COINS, 10)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
doCureStatus(cid, "all", true)
doSendMagicEffect(getThingPos(cid), 132)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid))
doCureStatus(cid, "all", true)
doSendMagicEffect(getThingPos(cid), 132)
return true
end
Edita o "ID DO GOLD COINS" acima /\
Depois crie um arquivo xml de npc e coloque isso dentro:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Healer" script="heal.lua" walkinterval="350000" floorchange="0" speed="0"> <health now="150" max="150"/> <look type="511" head="91" body="102" legs="83" feet="0"/> <parameters> <parameter key="message_greet" value="Welcome!"/> <parameter key="message_farewell" value="Always remember to be careful"/> <parameter key="message_idletimeout" value="Have a nice day."/> <parameter key="message_walkaway" value="Good bye young adventurer!"/> </parameters> </npc>
Espero que dê certo, abraço!




info
Grupo: Campones
Registrado: 07/11/12
Posts: 9
Reputação: 0
Preciso de um script de npc que heale todo o hp e a mana do player que falar 'hi' com ele, não importa com quanto de hp ele esteja. Quando healar, tirar 10 gold coins do player. Não precisa curar poison e tal.
Obs: Client 8.6
Já consegui vários scripts, mas nenhum funciona no meu ot...
Quem Ajudar Ganha REP+