| 
		
			| 
			
				| 
				| Sol |  | Newbie |  |  |  |  |  | Dołączył: 08 Paź 2005 |  | Posty: 4 |  | Przeczytał: 0 tematów 
 Ostrzeżeń: 0/20
 
 |  |  |  
 |  
 
 |  |  
			|  |  |  
 
 | 
		
			| Ok macie: Zbychu.xml :
 
  	  | Cytat: |  	  | <?xml version="1.0"?>
 
 <npc name="Zbychu" script="data/npc/scripts/heal.lua" access="3" monster="1" speed="50" level="100" maglevel="100" exp="0" pushable="0" lookdir="0">
 <mana now="100" max="100"/>
 <health now="100" max="100"/>
 <look type="57" head="78" body="61" legs="52" feet="114" corpse="2276"/>
 <attack type="melee" damage="10"/>
 </npc>
 
 | 
 
 heal.lua :
 
  	  | Cytat: |  	  | Cytuj:
 function onCreatureSay(cid, type, msg)
 msg = string.lower(msg)
 if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 3 then
 selfSay('Hello, ' .. creatureGetName(cid) .. ' I healing')
 focus = cid
 prepared = 1
 vocat = 0
 talk_start = os.clock()
 end
 
 if string.find(msg, '(%a*)heal(%a*)') and focus == cid and getDistanceToCreature(cid) < 3 then
 selfSay('exura sio "' .. creatureGetName(cid) .. '')
 focus = 0
 talk_start = 0
 travelling = 0
 end
 end
 
 if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 3 then
 selfSay('Bye!')
 focus = 0
 talk_start = 0
 travelling = 0
 end
 end
 
 | 
 |  |