Klimko
Go
Dołączył: 08 Lip 2007
Posty: 9 Przeczytał: 0 tematów
Ostrzeżeń: 0/5
Skąd: Katowice
|
w data/npc/Policjant.xml
Kod:
<?xml version="1.0"?>
<npc name="Policjant" script="data/npc/scripts/Policjant.lua" access="3">
<look type="128" head="20" body="100" legs="50" feet="99"/>
</npc>
data/npc/scrips/Policjant.lua
Cytat:
focus = 0
talk_start = 0
target = 0
following = false
attacking = false
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)
msg = string.lower(msg)
if (msgcontains(msg, ' ... ')or msgcontains(msg, ' ... ')or msgcontains(msg, ' ... ')or msgcontains(msg, ' ... ')or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ) or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ')or msgcontains(msg, ' ... ')or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ')or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ')or msgcontains(msg, ' ... ')or msgcontains(msg, ' ... ')or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ') or msgcontains(msg, 'l ... ') or msgcontains(msg, ' ... ') or msgcontains(msg, ' ... ) or msgcontains(msg, ' ... ') and focus == 0) and getDistanceToCreature(cid) < 4 then
selfSay('/kick ' .. creatureGetName(cid) .. '')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'fuck') then
selfSay('/kick ' .. creatureGetName(cid) .. '')
elseif msgcontains(msg, 'pies')or msgcontains(msg, 'piesek')or msgcontains(msg, 'nie')or msgcontains(msg, 'Rany boskie, jestem kioskiem') then
selfSay('Masz za swoje brudasie ' .. creatureGetName(cid) .. ' ,i nie pokazuj mi się tu wiecej.')
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('SPADAJ')
elseif focus == cid then
talk_start = os.clock()
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Moze kutas juz niewruci, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if focus == 0 then
cx, cy, cz = selfGetPosition()
randmove = math.random(1,20)
if randmove == 1 then
nx = cx + 2
end
if randmove == 2 then
nx = cx - 2
end
if randmove == 3 then
ny = cy + 2
end
if randmove == 4 then
ny = cy - 2
end
if randmove == 5 then
nx = cx
ny = cy
end
moveToPosition(nx, ny, cz)
--summons = 30
--summons2 = 30
end
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
end
W miejce " ... " wpisujemy słowo po którym jak kotś powie ma kick
Mam nadzieje ze sie przyda Pozdro
Post został pochwalony 0 razy
|