OTS Red Castle
Forum Red Castle
FAQ
Szukaj
Użytkownicy
Grupy
Galerie
Rejestracja
Profil
Zaloguj się, by sprawdzić wiadomości
Zaloguj
Forum OTS Red Castle Strona Główna
->
Skrypty itp.
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:
NIE
BBCode
:
TAK
Uśmieszki:
TAK
Wyłącz BBCode w tym poście
Wyłącz Uśmieszki w tym poście
Kod potwierdzający: *
Wszystkie czasy w strefie EET (Europa)
Skocz do:
Wybierz forum
Nowy Red Castle
----------------
Błędy, skargi, problemy, itp.
Propozycje
Pochwały na temat Red Castle
Skrypty
Pochwały na temat Red Castle
O niebieskich migdałach...
Nasz OTS (Stary Red Castle)
----------------
Błędy, skargi, problemy, itp.
Propozycje
Mapy
Skrypty itp.
Pochwały na temat Red Castle
O niebieskich migdałach...
Przegląd tematu
Autor
Wiadomość
son_of_sillve
Wysłany: Wto 20:36, 15 Maj 2007
Temat postu: NPC Inwazjer
hmmm... na moim ots są problemy z expieniem... bo nie zrobiłem expowisk.. więc taki oto łatwy NPC Inwazjer
na poczatek tworzymy w data\npc\ plik Inwazjer.xml
i wpisujemy
Kod:
<npc name="Inwazjer" script="data/npc/scripts/inwazje.lua" access="3" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="129" head="0" body="94" legs="94" feet="114"/>
</npc>
i potem w data\npc\scripts tworzymy plik inwazje.lua
Kod:
if msgcontains(msg, 'minotaur') and focus == cid then
selfSay('/m minotaur')
talk_start = os.clock()
end
if msgcontains(msg, 'gs') and focus == cid then
selfSay('/m giant spider')
talk_start = os.clock()
end
if msgcontains(msg, 'elf') and focus == cid then
selfSay('/m elf')
talk_start = os.clock()
end
if msgcontains(msg, 'human') and focus == cid then
selfSay('/m human')
talk_start = os.clock()
end
if msgcontains(msg, 'dragon') and focus == cid then
selfSay('/m dragon')
talk_start = os.clock()
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('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end
miłego expienia pozdroffiki ^^
fora.pl
- załóż własne forum dyskusyjne za darmo
Powered by
phpBB
© 2001, 2002 phpBB Group
Regulamin