• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

What is the problem? O.o

Sebastian Ching

New Member
Joined
Dec 26, 2007
Messages
314
Reaction score
4
Location
Rio grande, rs, Brazil
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.

-----------------------------------------------------------------
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... :D
 
Last edited by a moderator:
Back
Top