OTS
Wszystko o naszym Servie
Obecny czas to Pią 10:42, 26 Kwi 2024

[NPC] Wasp - pilnujący pożądku

 
Odpowiedz do tematu    Forum OTS Strona Główna -> Inne Skrypty
Zobacz poprzedni temat :: Zobacz następny temat  

Autor Wiadomość
Mario Bross
Administrator



Dołączył: 14 Lut 2007
Posty: 162
Przeczytał: 0 tematów

Ostrzeżeń: 0/5


PostWysłany: Czw 8:00, 15 Lut 2007    Temat postu: [NPC] Wasp - pilnujący pożądku

A wiec znalazlem ten scrypt na tibi xx i pomyslalem ze moze sie przydac ludziom bo pomysl byl bardzo fajny Cool

A wiec to tak wygląda:

Tworzymy plik Wasp.lua w data\npc\scripts i wklejamy to :



Kod:

focus = 0
talk_start = 0
target = 0
potwierdzenie = 0
following = false
attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)



end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)

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 ((string.find(msg, '(%a*)kurw(%a*)')) or (string.find(msg, '(%a*)huj(%a*)')) or (string.find(msg, '(%a*)pizd(%a*)')) or (string.find(msg, '(%a*)dziwk(%a*)')) or (string.find(msg, '(%a*)suka(%a*)')) or (string.find(msg, '(%a*)suko(%a*)')) or (string.find(msg, '(%a*)pierd(%a*)')) or (string.find(msg, '(%a*)jeb(%a*)')) or (string.find(msg, '(%a*)qurw(%a*)')) or (string.find(msg, '(%a*)qrw(%a*)')) or (string.find(msg, '(%a*)fuck(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 8 then
selfSay('' .. creatureGetName(cid) ..' nie przeklinaj wiecej...!!')
potwierdzenie = 1
focus = cid
talk_start = os.clock()
end
end


function onCreatureChangeOutfit(creature)

end


function onThink()
if potwierdzenie == 1 and (os.clock() - talk_start) > 1 then
selfSay('/kick ' .. creatureGetName(focus) ..'')
potwierdzenie = 0
talk_start = 0
focus = 0
end

if focus == 0 then
cx, cy, cz = selfGetPosition()
randmove = math.random(1,5)
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 focus > 0 then
rand = math.random(1,6)
if rand == 1 then
item = 0
elseif rand == 2 then
item = 0
elseif rand == 3 then
item = 0
elseif rand == 4 then
item = 0
elseif rand == 5 then
item = 0
else
item = 0
end
end

if focus == 0 then
randsay = math.random(1,60)
if randsay == 1 then
selfSay('Nie przeklinaj...')
end
if randsay == 2 then
selfSay('Nie uzywaj wulgaryzmow...')
end
end

end

Po tym tworzymy plik Wasp Security.xml w data\npc i wklejamy to :



Kod:

<?xml version="1.0"?>

<npc name="Wasp Security" script="data/npc/scripts/wasp.lua" access="1" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="44" head="20" body="30" legs="40" feet="50" corpse="2131"/>
</npc>


Na koncu zeby postawic Waspa na mapie wchodzimy do data\world\npc i wklejamy to :



Kod:

<npc name="Wasp Security" x="Pozycja x" y="Pozycja y" z="Pozycja z"/>



i to bylo na tyle Mr. Green


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora

Wyświetl posty z ostatnich:   
Odpowiedz do tematu    Forum OTS Strona Główna -> Inne Skrypty Wszystkie czasy w strefie EET (Europa)
Strona 1 z 1

 
Skocz do:  
Możesz pisać nowe tematy
Możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach

fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2002 phpBB Group.
Theme Designed By ArthurStyle
Regulamin