Najlepszy OTS
Super OTS :: Super Forum
Szukanie zaawansowane
Home
Rejestracja
FAQ
Użytkownicy
Grupy
Galerie
Zaloguj się, by sprawdzić wiadomości
Zaloguj
Forum Najlepszy OTS Strona Główna
Skrypty
Napisz odpowiedź
Użytkownik
Temat
Treść wiadomości
Emotikony
Więcej Ikon
Kolor:
Domyślny
Ciemnoczerwony
Czerwony
Pomarańćzowy
Brązowy
Żółty
Zielony
Oliwkowy
Błękitny
Niebieski
Ciemnoniebieski
Purpurowy
Fioletowy
Biały
Czarny
Rozmiar:
Minimalny
Mały
Normalny
Duży
Ogromny
Zamknij Tagi
Opcje
HTML:
TAK
BBCode
:
TAK
Uśmieszki:
TAK
Wyłącz HTML w tym poście
Wyłącz BBCode w tym poście
Wyłącz Uśmieszki w tym poście
Kod potwierdzający: *
Do góry
Skocz do:
Wybierz forum
OTS
----------------
Nowosci z OTSa
o OTSie
Ogolnie o oTSiE
----------------
Problemy/Pytania
Skargi
Kupie/Sprzedam/Zamienie
Fotki z OTSa
Shoutbox !!!
Ksiega Gosci
Tibia Realna
----------------
Pomoc w tibii
Pochwal Sie
Download RL Tibia
Open Tibia Serwer
----------------
Skrypty
Pomoc
Pytania
Download
Hyde Park
----------------
Bramka SMS
Inne
Przegląd tematu
Autor
Wiadomość
Administrator
Wysłany: Sob 16:06, 18 Mar 2006
Temat postu: Kroliczek Wielkanocny
data\npc\Kruliczek Wielkanocny.xml
Kod:
<?xml version="1.0"?>
<npc name="Kruliczek Wielkanocny" script="data/npc/scripts/krulik.lua" access="3" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="74" head="20" body="30" legs="40" feet="50" corpse="3119"/>
</npc>
data\npc\scripts\krulik.lua:
Kod:
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('Merry Christmas!')
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 ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Wesolych Swiat ' .. creatureGetName(cid) .. '!')
focus = cid
talk_start = os.clock()
end
if string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! Please wait.')
end
if string.find(msg, '(%a*)present(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then
present = getPlayerStorageValue(cid,1210)
if present == -1 then
buy(cid,item,1,0)
setPlayerStorageValue(cid,1210,1)
end
if present == 1 then
selfSay('Sorry, nie mam wiecej prezentuw dla ciebie.')
end
end
if string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Wesolych Swiat')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 3 then
selfSay('Wesolych Swiat')
focus = 0
end
end
if focus == 0 then
cx, cy, cz = selfGetPosition()
randmove = math.random(1,25)
if randmove == 1 then
nx = cx + 1
end
if randmove == 2 then
nx = cx - 1
end
if randmove == 3 then
ny = cy + 1
end
if randmove == 4 then
ny = cy - 1
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 = 2352
elseif rand == 2 then
item = 2353
elseif rand == 3 then
item = 2354
elseif rand == 4 then
item = 2798
elseif rand == 5 then
item = 3946,10
else
item = 4850
end
end
if focus == 0 then
randsay = math.random(1,75)
if randsay == 1 then
selfSay('Smacznego jajka')
end
if randsay == 2 then
selfSay('Wesolych Swiat')
end
end
end
Pogrubione cyfry to numery id.Można se pozmieniać według gustu ;p
fora.pl
- załóż własne forum dyskusyjne za darmo
Powered by
phpBB
© 2001, 2002 phpBB Group
Avalanche style by
What Is Real
© 2004
Regulamin