#1 2007-12-08 22:15:54

JaNo Mapper

Zbanowany

6073717
Skąd: Rio
Zarejestrowany: 2007-11-24
Posty: 94
Nick: Wiesiu
Profesja: Guardia
Server: 139
WWW

NPC Lodziarz

Wchodzimy w data\npc i tworzymy nowy plik o nazwie Lodziarz.
Wpisujemy w nim:

Kod:

<?xml version="1.0"?>
<npc name="Lodziarz" script="data/npc/scripts/lodu.lua" access="3">
<look type="251" head="0" body="0" legs="0" feet="0"/>
</npc>

następnie wchodzimy w data\npc\scripts i tworzymy plik lodu.lua następnie wpisujemy w nim:

Kod:

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

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
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 (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Witaj W Lodziarni' .. creatureGetName(cid) .. '! Sprzedaje rzezbiator, ice cube, lody z wisienka, lody cytrynowe, lody truskawkowe, lody malinowe, lody jablkowe and lody smerfowe (everything for 100 gps).')
focus = cid
talk_start = os.clock()

elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')

elseif focus == cid then
talk_start = os.clock()

if msgcontains(msg, 'rzezbiator') or msgcontains(msg, 'rzezbiator')then
count = getCount(msg)
price = count*1
buy(cid,7437,count,price)
elseif msgcontains(msg, 'ice cube') or msgcontains(msg, 'ice cube')then
count = getCount(msg)
price = count*1
buy(cid,7441,count,price)
elseif msgcontains(msg, 'lody z wisienka') or msgcontains(msg, 'lody z wisienka') then
count = getCount(msg)
price = count*1
buy(cid,7372,count,price)
elseif msgcontains(msg, 'lody cytrynowe') or msgcontains(msg, 'lody cytrynowe')then
count = getCount(msg)
price = count*1
buy(cid,7373,count,price)
elseif msgcontains(msg, 'lody truskawkowe') or msgcontains(msg, 'lody truskawkowe')then
count = getCount(msg)
price = count*1
buy(cid,7374,count,price)
elseif msgcontains(msg, 'lody malinowe') or msgcontains(msg, 'lody malinowe')then
count = getCount(msg)
price = count*1
buy(cid,7375,count,price)
elseif msgcontains(msg, 'lody jablkowe') or msgcontains(msg, 'lody jablkowe')then
count = getCount(msg)
price = count*1
buy(cid,7376,count,price)
elseif msgcontains(msg, 'lody smerfowe') or msgcontains(msg, 'lody smerfowe')then
count = getCount(msg)
price = count*1
buy(cid,7377,count,price)


elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Zapraszam ponownie ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
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('Good bye then.')
focus = 0
end
end
end

Od tej pory możemy kupować lody u npc. :)


Tibia see you!

http://r3.fodey.com/1dbc9b6767ec1486eb59c11bd0a608f87.1.gif

Offline

 

#2 2007-12-09 07:51:43

jasiu1995l

http://i49.tinypic.com/2uggx2g.jpg

Zarejestrowany: 2007-12-05
Posty: 1396

Re: NPC Lodziarz

juz widzialem to na jakims ots

Offline

 

#3 2007-12-09 08:35:03

Burbon

http://i37.tinypic.com/30iway9.gif

9616756
Skąd: Katowice
Zarejestrowany: 2007-10-28
Posty: 92
Nick: xxxxxxx
Profesja: Aldora
Server: 116

Re: NPC Lodziarz

jasiu1995l napisał:

juz widzialem to na jakims ots

Tak, bylo to na jakims otsie. A nawet chyba mozna bylo pobrac z jakims


Save Your Planet ~ Kill Yourself

Offline

 

#4 2007-12-09 09:20:09

JaNo Mapper

Zbanowany

6073717
Skąd: Rio
Zarejestrowany: 2007-11-24
Posty: 94
Nick: Wiesiu
Profesja: Guardia
Server: 139
WWW

Re: NPC Lodziarz

sam go zrobiłem i dałem kumplom na ots-y potem nie wiem co z nim (NPC) sie stało....


Tibia see you!

http://r3.fodey.com/1dbc9b6767ec1486eb59c11bd0a608f87.1.gif

Offline

 

#5 2007-12-09 10:27:50

Sir Xidoaozu

Zbanowany

Zarejestrowany: 2007-11-28
Posty: 119

Re: NPC Lodziarz

przydalo mi sie ) pozdro 10/10


Za duża sygnaturka. Linki usunięte.

Offline

 

#6 2007-12-09 12:06:38

 Rici

Sułtan łechtaczek

Skąd: Ełk
Zarejestrowany: 2007-05-15
Posty: 1753
Nick: Vineium Doron
Profesja: Paladyn
Server: Guardia
Level: 64

Re: NPC Lodziarz

To pod 8.0 no nie ??
Za sam skrypt 10/10. Moge uwierzyć że to twoje nic trudnego w tym npc


http://img13.imageshack.us/img13/8466/ovoj.jpg

Offline

 

#7 2008-01-13 14:12:03

Pisul

http://i38.tinypic.com/19pb0n.gif

Zarejestrowany: 2008-01-04
Posty: 14

Re: NPC Lodziarz

Fajny daje 10/10.Przydało się!


http://www.pokeplushies.com/images/plushies/Digimon/plushie_lunamon.gif

Offline

 

#8 2008-01-13 18:48:13

Vegeta123

http://i37.tinypic.com/2dqpohz.gif

Zarejestrowany: 2008-01-13
Posty: 22

Re: NPC Lodziarz

nice npc daje 10/10


http://r3.fodey.com/1daa889e554d24fbdbf658fe1184ad219.1.gif

Offline

 

#9 2008-01-13 20:46:52

Koloss

http://i38.tinypic.com/2ni1vub.gif

Zarejestrowany: 2008-01-13
Posty: 75

Re: NPC Lodziarz

hmm.. Mi się przyda


Tibia.mine.nu

Offline

 

#10 2008-01-16 10:56:04

Sidorax

http://i37.tinypic.com/zmmamp.gif

8817737
Zarejestrowany: 2008-01-13
Posty: 43

Re: NPC Lodziarz

troche śmieszne to ale postawie jak bede miał troche czasu, teraz mam ważniejsze rzeczy do robienia na otsie;p;p

Offline

 

#11 2008-01-16 11:13:05

Veno

http://i37.tinypic.com/sb1sbd.jpg

6307988
Skąd: stalowa wola
Zarejestrowany: 2007-08-04
Posty: 178
WWW

Re: NPC Lodziarz

Fajny skrypt .........

Offline

 

#12 2009-02-20 22:03:55

Michael

Zbanowany

6377824
Skąd: Nie interesuj sie
Zarejestrowany: 2009-02-20
Posty: 105

Re: NPC Lodziarz

Widzialem tego npc na Evo by Legolas ale aktualnie
hostuje Stigme i mi sie przydal ten npc thx
5/10 bo skopiowany npc z innego ots

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
Hotels Livingston www.worldhotels-in.com