 |
OTS Red Castle Forum Red Castle
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
son_of_sillve
Miotacz Postów
Dołączył: 09 Kwi 2007
Posty: 167
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: Z Nienacka
|
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 ^^
Post został pochwalony 0 razy
|
|
Powrót do góry |
|
 |
|
 |
|
|
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
|