Forum nie tylko o Tibii i OTS...

Nie tylko o Tibii i OTS...


#1 2008-06-19 21:49:59

kamildeder

http://i36.tinypic.com/28i01e0.gif

10769453
Call me!
Zarejestrowany: 2008-01-04
Posty: 236

[NPC] Quest man(daje misje do wykonania i dostajesz nagrode)

W data/npc/ tworzysz plik Quest Changer.Xml i spisujesz w nim to:

Kod:

<npc name="Quest Changer" script="data/npc/scripts/quest.lua" lookdir="3" autowalk="25">
<health now="500" max="500"/>
<look type="111" head="0" body="0" legs="0" feet="0"/>
<parameters>
<parameter key="message_greet" value="Witam |PLAYERNAME|. Zamieniam itemki z questo na nagrody powiec 'pomoc'." />
<parameter key="message_needmoremoney" value="Niemasz tyle kasy." />
<parameter key="message_decline" value="Czy |TOTALCOST| to za duzo dla ciebie?" />
</parameters>
</npc>

Potem wejdź w /data/npc scripts stworz plik quest.Lua i wpisz w nim to:

Kod:

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
return false
end

addon_need_premium = 'Sorry, you need a premium account to get addons.'
addon_have_already = 'Sorry, you already have this addon.'
addon_have_not_items = 'Sorry, you don\'t have these items.'
addon_give = 'Masz i sie ciesz xD'
player_gold = getPlayerItemCount(cid,2148)
player_plat = getPlayerItemCount(cid,2152)*100
player_crys = getPlayerItemCount(cid,2160)*10000
player_money = player_gold + player_plat + player_crys

if msgcontains(msg, 'pomoc') then
selfSay('Zamieniam itemki na nagrody.')

elseif msgcontains(msg, 'blue robe') then
if getPlayerItemCount(cid,2090) >= 1 then
selfSay('Przyniosles mi niebieski klucz?')
talk_state = 1
else
selfSay('Niemasz tego itemka. Przyjdz jak go bedziesz mial.')
talk_state = 0
end
elseif msgcontains(msg, 'tak') and talk_state == 1 then
talk_state = 0
if getPlayerItemCount(cid,2090) >= 1 then
if doPlayerRemoveItem(cid,2090,1) == 1 then
selfSay(addon_give)
doPlayerAddItem(cid,7428,1)
end

else
selfSay(havent_item)
end


elseif msgcontains(msg, 'nie') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Ok to nara ziom...')
talk_state = 0
end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Ostatnio edytowany przez kamildeder (2008-06-19 21:51:08)


POMOGŁEM? daj [+]  ZAWIODŁEM? daj [-]
http://www.pokeplushies.com/images/adoptables/460704.gif[br]Kliknij tutaj i nakarm malego Pokemona!

http://img264.imageshack.us/img264/8031/logosho.jpg
http://zgarnij-doladowanie.pl/public/images/zgarnij.png

Offline

 

#2 2008-06-26 03:34:48

 Seeker

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

4133650
Skąd: Tu i Tam...
Zarejestrowany: 2008-02-29
Posty: 1243
Nick: Heannak
Profesja: Honera
Server: 39~
WWW

Re: [NPC] Quest man(daje misje do wykonania i dostajesz nagrode)

zajebdobre tylko ma pare bledow a tak to spoko tylko wytlumacz oco chodzi z tymi zadaniami itp.


http://pretoriaots.pl/signature.php?character=Seeker&image=4
http://s2.tibiafun.y0.pl/char.php?c=Naplecior
http://www.pokeplushies.com/images/adoptables/690903.gif

Offline

 

#3 2008-06-26 08:40:43

kubakrupa

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

Zarejestrowany: 2008-06-17
Posty: 28

Re: [NPC] Quest man(daje misje do wykonania i dostajesz nagrode)

Zarombisty NPC..Jak Bede Mogl To Reput4u


http://www.pokeplushies.com/images/adoptables/459657.gifKliknij dasz mi Level UP!-KLIK

[red]Guest a może tak plusik ? ;> Minusów nie dawać[red]

Offline

 

#4 2008-06-26 09:10:12

Żwir

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

Zarejestrowany: 2008-01-20
Posty: 44
WWW

Re: [NPC] Quest man(daje misje do wykonania i dostajesz nagrode)

Ładny skrypt. Lecz wyjaśnij wszystko dla początkujących ; )
Btw. +


http://img131.imageshack.us/img131/9752/bannerlosjc1.gif
http://img514.imageshack.us/img514/2118/bannerlosqi7.png
http://img404.imageshack.us/img404/9814/sygnalosxb3.jpg

Offline

 

#5 2008-06-26 09:27:56

Ziele

http://i38.tinypic.com/ztvkat.gif

6868784
Zarejestrowany: 2008-03-26
Posty: 462

Re: [NPC] Quest man(daje misje do wykonania i dostajesz nagrode)

Nom dobry npc ale gdzies juz go widzialem..na tym forum..ale nie wiem kto tu dal xD
ale ocenka 7/10 :]

PzDr


^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^
http://www.pokeplushies.com/images/adoptables/771098.gif
Nakarmisz Mnie ???
www.cs-myp.xt.pl <<<<---- zapraszamy do rejestracjii !!
www.games4you.y0.pl <<<< --------- Również zapraszamy !!!

Offline

 

#6 2008-06-26 22:05:31

kamildeder

http://i36.tinypic.com/28i01e0.gif

10769453
Call me!
Zarejestrowany: 2008-01-04
Posty: 236

Re: [NPC] Quest man(daje misje do wykonania i dostajesz nagrode)

Jak takie ladne Komentarze dajcie  +(plusika)
Zaraz go zedytuje i wytlumacze


POMOGŁEM? daj [+]  ZAWIODŁEM? daj [-]
http://www.pokeplushies.com/images/adoptables/460704.gif[br]Kliknij tutaj i nakarm malego Pokemona!

http://img264.imageshack.us/img264/8031/logosho.jpg
http://zgarnij-doladowanie.pl/public/images/zgarnij.png

Offline

 

#7 2008-06-27 08:29:49

KubixiS

http://i33.tinypic.com/2v2gq5x.gif

11960312
Zarejestrowany: 2008-03-01
Posty: 297

Re: [NPC] Quest man(daje misje do wykonania i dostajesz nagrode)

No własnie bo też niewiem ocb


http://img223.yfrog.com/img223/43/beznazwy1oix.jpg

http://www.tibiaimage.com/char/12/Melostor.png

Offline

 

#8 2008-07-01 10:52:22

Renion

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

Skąd: WrOcLoVe <3
Zarejestrowany: 2007-12-31
Posty: 394

Re: [NPC] Quest man(daje misje do wykonania i dostajesz nagrode)

Ładny skrypcik, trochę pozmieniałem i działa 9/10

Offline

 

#9 2011-06-07 11:57:05

slepy

http://i36.tinypic.com/28i01e0.gif

7243678
Skąd: Andrychów
Zarejestrowany: 2008-09-10
Posty: 244
Nick: Nie gram juz sprzedalem
Profesja: w pracy
Server: 111 byl...
WWW

Re: [NPC] Quest man(daje misje do wykonania i dostajesz nagrode)

nie widzicie ze to poprostu spocony cyklop wszedzie jest na necie


Pomoglem daj "+" zawiodlem daj "-" ;pp
http://gothic.org.pl/forum/uploads/av-638.gif
http://img191.imageshack.us/img191/4492/52542537.gif
http://img101.imageshack.us/img101/8315/dancerh.gif

Offline

 

Stopka forum

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


Darmowe Forum | Ciekawe Fora | Darmowe Fora
Lodging Russia