Sebastian Ching
New Member
Greetings, i wanna a know whta is wrong in this script , i m trying around 1 weak in configure and dont work omfg. =/
if someone know how i can get a script heal that work 100%, tellme please.
-----------------------------------------------------------------
--------------------------------------------------------------
Also wanna a a guard npc, but same than rl, when u insult to king to him, atack with fire.
PLEASE I NEED THAT PLX...
if someone know how i can get a script heal that work 100%, tellme please.
-----------------------------------------------------------------
Code:
local target = 0
local focus = 0
local 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*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 5 then
selfSay('Hello ' .. getCreatureName(cid) .. '!')
focus = cid
talk_start = os.clock()
elseif (string.find(msg, '(%a*)bye(%a*)') and focus ~= 0) then
selfSay('Goodbye ' .. getCreatureName(cid) .. '!')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)heal(%a*)') and focus ~= 0) then
if getPlayerHealth(cid) <= 79 then
heal(cid, 80)
else
selfSay('I cannot heal you.')
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
Also wanna a a guard npc, but same than rl, when u insult to king to him, atack with fire.
PLEASE I NEED THAT PLX...
Last edited by a moderator: