Distributed
User
- Joined
- Dec 29, 2008
- Messages
- 47
- Reaction score
- 3
Skrypt poto by nie by?o na ots'ie du?o noob'?w
Dodajemy:
data/npc/Guard.xml
Dodajemy:
data/npc/scripts/guard.lua
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>
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)