What's new

[8.x][NPC] Guard

Status
Not open for further replies.
Joined
Dec 29, 2008
Messages
47
Reaction score
3
Skrypt poto by nie by?o na ots'ie du?o noob'?w :D:D
Dodajemy:
data/npc/Guard.xml
Code:
<?xml version="1.0"?>
<npc name="Guard" script="data/npc/scripts/guard.lua" access="3" lookdir="2" autowalk="25">
	<mana now="800" max="800"/>
	<health now="200" max="200"/>
<look type="131" head="95" body="95" legs="95" feet="95" corpse="3128"/>
</npc>
Dodajemy:
data/npc/scripts/guard.lua
Code:
local focus = 0
local talk_start = 0
local target = 0
local days = 0
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
  	if focus == cid then
          selfSay('Good bye then.')
          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)
 
Status
Not open for further replies.
Top