Forum Open Tibia Server Strona Główna Open Tibia Server
Zapraszamy na nowy Adres http://otibias.xad.pl
 
 FAQFAQ   SzukajSzukaj   UżytkownicyUżytkownicy   GrupyGrupy   GalerieGalerie   RejestracjaRejestracja 
 ProfilProfil   Zaloguj się, by sprawdzić wiadomościZaloguj się, by sprawdzić wiadomości   ZalogujZaloguj 

[7.6][npc] Henry Grajek - Npc sprzedający Instrumenty Muzy..

 
Napisz nowy temat   Odpowiedz do tematu    Forum Open Tibia Server Strona Główna -> Skrypty Ots
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Defozo
Quara Predator Scout
Quara Predator Scout



Dołączył: 15 Sty 2007
Posty: 94
Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Gdzieś :)

PostWysłany: Pon 14:51, 15 Sty 2007    Temat postu: [7.6][npc] Henry Grajek - Npc sprzedający Instrumenty Muzy..

Ten skrypt (chyba) nie jest zrobiony przezemnie ;]

Przedstawiam wam:

Henry Grajek Npc sprzedający Instrumenty Muzyczne!

Henry Grajek.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('Narqa.')
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('Siemka, ' .. creatureGetName(cid) .. '! Sprzedaje wszystkie instrumentu muzyczne, a dokladniej sprzedaje: zakrzywiona trabka, beben, mala trabka, rug, gitara, harfa, flet i grajka. Wszystko po 50gp.')
selfLook(cid)
focus = cid
talk_start = os.clock()

elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorka, ' .. creatureGetName(cid) .. '! Wlasnie rozmawiam.')

elseif msgcontains(msg, 'zakrzywiona trabka') and focus == cid then
buy(cid,2364,1,50)
talk_start = os.clock()

elseif msgcontains(msg, 'flet') and focus == cid then
buy(cid,2374,1,50)
talk_start = os.clock()

elseif msgcontains(msg, 'grajka') and focus == cid then
buy(cid,2373,1,50)
talk_start = os.clock()

elseif msgcontains(msg, 'gitara') and focus == cid then
buy(cid,2370,1,50)
talk_start = os.clock()

elseif msgcontains(msg, 'rug') and focus == cid then
buy(cid,2369,1,50)
talk_start = os.clock()

elseif msgcontains(msg, 'beben') and focus == cid then
buy(cid,2367,1,50)
talk_start = os.clock()

elseif msgcontains(msg, 'mala trabka') and focus == cid then
buy(cid,2368,1,50)
talk_start = os.clock()

elseif msgcontains(msg, 'harfa') and focus == cid then
buy(cid,2372,1,50)
talk_start = os.clock()


elseif string.find(msg, '(%a*)bye(%a*)') and focus == cid and getDistanceToCreature(cid) < 4 then
selfSay('Narqa, ' .. 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('Nastepny prosze...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Narqa.')
focus = 0
end
end
end


Henry Grajek.xml
Kod:
<?xml version="1.0"?>
<npc name="Henry Grajek" script="data/npc/scripts/Henry Grajek.lua" access="3">
    <look type="129" head="76" body="114" legs="124" feet="86"/>
</npc>


Tak, to już chyba koniec ;]


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Penut
Tiger
Tiger



Dołączył: 10 Lut 2007
Posty: 16
Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: Sob 4:16, 10 Lut 2007    Temat postu:

yeaaah Razz Razz Smile
[link widoczny dla zalogowanych]
regards, Penut


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Nony
Tiger
Tiger



Dołączył: 11 Lut 2007
Posty: 20
Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: Nie 17:28, 11 Lut 2007    Temat postu:

amazing! Razz
[link widoczny dla zalogowanych]
regards, Nony


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Wyświetl posty z ostatnich:   
Napisz nowy temat   Odpowiedz do tematu    Forum Open Tibia Server Strona Główna -> Skrypty Ots Wszystkie czasy w strefie CET (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, 2005 phpBB Group
Regulamin