Forum nie tylko o Tibii i OTS...

Nie tylko o Tibii i OTS...


#1 2008-09-28 07:30:08

Uliczny fighter

Zbanowany

Zarejestrowany: 2008-08-29
Posty: 89

[Skrypt] Kowal 8.1

Cos mnie wziê³o i postanowi³em napisaæ skrypt który miejmy nadziejê ¿e uczyni wiele ots-ów ciekawszymi

otó¿ npc ten bêdzie kowalem !!
robimy plik kowal.lua a w nim

Spoiler:

--------------------------------------------------------------------------------------------
------------------------------------ Kowal ------------------------------------
--------------------------- Script by Uliczny Fighter --------------------------


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 = 'Here you are.'
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, 'kowal') then
selfSay('Wyrabiam golden helmet, Dragon scale legs i warlord sword.')
------------------------------------------------ golden helmet ------------------------------------------------
elseif msgcontains(msg, 'golden helmet') then
if isPremium(cid) then
if getPlayerItemCount(cid,6500) >= 100 and getPlayerItemCount(cid,5887) >= 100 and getPlayerItemCount(cid,6546) >= 1 then
selfSay('Czy masz 100 demonic essence, 100 piece of royal steel i dracola\'s eye?')
talk_state = 1
else
selfSay('Potrzebuje 100 demonic essence, 100 piece of royal steel i dracola\'s eye.')
talk_state = 0
end
else
selfSay(addon_need_premium)
talk_state = 0
end
------------------------------------------------ confirm yes ------------------------------------------------
elseif msgcontains(msg, 'yes') and talk_state == 1 then
talk_state = 0
if getPlayerItemCount(cid,6500) >= 100 and getPlayerItemCount(cid,5887) >= 100 and getPlayerItemCount(cid,6546) >= 1 then
if doPlayerTakeItem(cid,6500,100) == 0 and doPlayerTakeItem(cid,5887,100) == 0 and doPlayerTakeItem(cid,6546,1) == 0 then
doPlayerAddItem(cid,2471, 1)
end
else
selfSay(addon_need_premium)
end
------------------------------------------------ dragon scale legs ------------------------------------------------
elseif msgcontains(msg, 'dragon scale legs') then
if isPremium(cid) then
if getPlayerItemCount(cid,5920) >= 100 and getPlayerItemCount(cid,5877) >= 100 then
selfSay('Czy masz 100 smoczych skor i 100 zielonych smoczych lusek??')
talk_state = 2
else
selfSay('Potrzebuje 100 smoczych skor i 100 zielonych smoczych lusek.')
talk_state = 0
end
else
selfSay(addon_need_premium)
talk_state = 0
end
------------------------------------------------ confirm yes ------------------------------------------------
elseif msgcontains(msg, 'yes') and talk_state == 2 then
talk_state = 0
if getPlayerItemCount(cid,5920) >= 100 and getPlayerItemCount(cid,5877) >= 100 then
if doPlayerTakeItem(cid,5920,100) == 0 and doPlayerTakeItem(cid,5877,100) == 0 then
doPlayerAddItem(cid,2469, 1)
end
else
selfSay(addon_have_not_items)
end
------------------------------------------------ Warlord sword ------------------------------------------------
elseif msgcontains(msg, 'warlord sword') then
if isPremium(cid) then
if getPlayerItemCount(cid,5887) >= 100 and getPlayerItemCount(cid,7390) >= 1 then
selfSay('Czy masz 100 piece of royal steel i justice seeker?')
talk_state = 3
else
selfSay('Potrzebuje 100 piece of royal steel i justice seeker.')
talk_state = 0
end
else
selfSay(addon_need_premium)
talk_state = 0
end
------------------------------------------------ confirm yes ------------------------------------------------
elseif msgcontains(msg, 'yes') and talk_state == 3 then
talk_state = 0
if getPlayerItemCount(cid,5887) >= 100 and getPlayerItemCount(cid,7390) >= 1 then
if doPlayerTakeItem(cid,5887,50) == 0 and doPlayerTakeItem(cid,7390,1) == 0 then
doPlayerAddItem(cid,2408, 1)
end
else
selfSay(addon_have_not_items)
end
------------------------------------------------ confirm no ------------------------------------------------
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <=3) then
selfSay('Ok than.')
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())

potem robimy plik kowal.xml i wklejamy

Spoiler:

<?xml version="1.0"?>

<npc name="Kowal" script="data/npc/scripts/kowal.lua" access="5" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="131" head="114" body="114" legs="0" feet="114" addons="3"/>
</npc>

teraz opiszê jak on dzia³a otó¿ wyrabia nam 3 przedmioty
Dragon scale legs
warlord sword
golden helmet
teraz co trzeba miec aby dostac przedmiot
dragon scale legs-100 green dragon scale i 100 green dragon leather
golden helmet-100 piece of royal steel, 100 demonic essence i dragonla's eye
warlord sword- justice seeker i 100 piece of royal steel

dziala na aries z mapka evo

prosze o komentarze


ivelios
trudno zeby nick nie byl taki sam ;p
lecz przegladajac ten temat zobaczylem ze sie jednak rozni , moj jest to raczej ots for fun a nie rpg(chociaz kto wie) bazuje on na klasycznej wymianie przedmiotow. tamten z tego co przegladalem ma za zadanie sprawic aby gracz sam wykul przedmiot, wiec chyba jest roznica.
moze chociaz jeden ots stanie sie przez to urozmaicony

Pozdrawiam
Uliczny Fighter


Zbyt du¿a sygnaturka.

Offline

 

#2 2008-09-28 07:44:01

dzido

http://i33.tinypic.com/21bk4jn.jpg

2652955
SkÄ…d: Rejowiec Fabryczny
Zarejestrowany: 2007-11-17
Posty: 150
Nick: Dzido
Profesja: Jamera
Server: 81

Re: [Skrypt] Kowal 8.1

Po 1 skrypt nie twój widzia³em go na innym forum.
tak jak my¶la³em by³ na innym forum.

Cos mnie wziê³o i postanowi³em napisaæ skrypt który miejmy nadziejê ¿e uczyni wiele ots-ów ciekawszymi

otó¿ npc ten bêdzie kowalem !!
robimy plik kowal.lua a w nim

Kod:

--------------------------------------------------------------------------------------------
------------------------------------ Kowal ------------------------------------
--------------------------- Script by Sharky --------------------------


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 = 'Here you are.'
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, 'kowal') then
selfSay('Wyrabiam golden helmet, Dragon scale legs i warlord sword.')
------------------------------------------------ golden helmet ------------------------------------------------
elseif msgcontains(msg, 'golden helmet') then
if isPremium(cid) then
if getPlayerItemCount(cid,6500) >= 100 and getPlayerItemCount(cid,5887) >= 100 and getPlayerItemCount(cid,6546) >= 1 then
selfSay('Czy masz 100 demonic essence, 100 piece of royal steel i dracola\'s eye?')
talk_state = 1
else
selfSay('Potrzebuje 100 demonic essence, 100 piece of royal steel i dracola\'s eye.')
talk_state = 0
end
else
selfSay(addon_need_premium)
talk_state = 0
end
------------------------------------------------ confirm yes ------------------------------------------------
elseif msgcontains(msg, 'yes') and talk_state == 1 then
talk_state = 0
if getPlayerItemCount(cid,6500) >= 100 and getPlayerItemCount(cid,5887) >= 100 and getPlayerItemCount(cid,6546) >= 1 then
if doPlayerTakeItem(cid,6500,100) == 0 and doPlayerTakeItem(cid,5887,100) == 0 and doPlayerTakeItem(cid,6546,1) == 0 then
doPlayerAddItem(cid,2471, 1)
end
else
selfSay(addon_need_premium)
end
------------------------------------------------ dragon scale legs ------------------------------------------------
elseif msgcontains(msg, 'dragon scale legs') then
if isPremium(cid) then
if getPlayerItemCount(cid,5920) >= 100 and getPlayerItemCount(cid,5877) >= 100 then
selfSay('Czy masz 100 smoczych skor i 100 zielonych smoczych lusek??')
talk_state = 2
else
selfSay('Potrzebuje 100 smoczych skor i 100 zielonych smoczych lusek.')
talk_state = 0
end
else
selfSay(addon_need_premium)
talk_state = 0
end
------------------------------------------------ confirm yes ------------------------------------------------
elseif msgcontains(msg, 'yes') and talk_state == 2 then
talk_state = 0
if getPlayerItemCount(cid,5920) >= 100 and getPlayerItemCount(cid,5877) >= 100 then
if doPlayerTakeItem(cid,5920,100) == 0 and doPlayerTakeItem(cid,5877,100) == 0 then
doPlayerAddItem(cid,2469, 1)
end
else
selfSay(addon_have_not_items)
end
------------------------------------------------ Warlord sword ------------------------------------------------
elseif msgcontains(msg, 'warlord sword') then
if isPremium(cid) then
if getPlayerItemCount(cid,5887) >= 100 and getPlayerItemCount(cid,7390) >= 1 then
selfSay('Czy masz 100 piece of royal steel i justice seeker?')
talk_state = 3
else
selfSay('Potrzebuje 100 piece of royal steel i justice seeker.')
talk_state = 0
end
else
selfSay(addon_need_premium)
talk_state = 0
end
------------------------------------------------ confirm yes ------------------------------------------------
elseif msgcontains(msg, 'yes') and talk_state == 3 then
talk_state = 0
if getPlayerItemCount(cid,5887) >= 100 and getPlayerItemCount(cid,7390) >= 1 then
if doPlayerTakeItem(cid,5887,50) == 0 and doPlayerTakeItem(cid,7390,1) == 0 then
doPlayerAddItem(cid,2408, 1)
end
else
selfSay(addon_have_not_items)
end
------------------------------------------------ confirm no ------------------------------------------------
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <=3) then
selfSay('Ok than.')
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())





potem robimy plik kowal.xml i wklejamy
Cytat:
<?xml version="1.0"?>

<npc name="Kowal" script="data/npc/scripts/kowal.lua" access="5" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="131" head="114" body="114" legs="0" feet="114" addons="3"/>
</npc>


teraz opiszê jak on dzia³a otó¿ wyrabia nam 3 przedmioty
Dragon scale legs
warlord sword
golden helmet
teraz co trzeba miec aby dostac przedmiot
dragon scale legs-100 green dragon scale i 100 green dragon leather
golden helmet-100 piece of royal steel, 100 demonic essence i dragonla's eye
warlord sword- justice seeker i 100 piece of royal steel

dziala na aries z mapka evo

prosze o komentarze

edit
nie zauwazylem zly dzial prosze o przeniesienie do xml
przepraszam

ivelios
trudno zeby nick nie byl taki sam ;p
lecz przegladajac ten temat zobaczylem ze sie jednak rozni , moj jest to raczej ots for fun a nie rpg(chociaz kto wie) bazuje on na klasycznej wymianie przedmiotow. tamten z tego co przegladalem ma za zadanie sprawic aby gracz sam wykul przedmiot, wiec chyba jest roznica.
moze chociaz jeden ots stanie sie przez to urozmaicony

Pozdrawiam
Sharky

Ostatnio edytowany przez dzido (2008-09-28 13:42:28)

Offline

 

#3 2008-09-28 08:01:23

Kakashi

http://i34.tinypic.com/3321jrs.gif

Zarejestrowany: 2008-01-21
Posty: 1411

Re: [Skrypt] Kowal 8.1

Ty i ten skrypt.. nawet jubilera nie umiesz zrobic :]

Skrypt ciekawy, tylko szkoda, ¿e kowal ma tak ma³o umiejêtno¶ci.


Nie zmieniam nicków.

Offline

 

#4 2008-09-28 08:08:38

dzido

http://i33.tinypic.com/21bk4jn.jpg

2652955
SkÄ…d: Rejowiec Fabryczny
Zarejestrowany: 2007-11-17
Posty: 150
Nick: Dzido
Profesja: Jamera
Server: 81

Re: [Skrypt] Kowal 8.1

mnie te¿ to zdziwi³o bo jako¶ mu dawa³em skrypta na npc co assassinki po 10 cc wiêc wbi³em na tibia.net.pl i wpisa³em kowal i by³ ale te¿ wiedzia³em ¿e to nie jego bo go jako¶ widzia³êm.

Offline

 

#5 2008-09-28 08:23:33

JaNo Mapper

Zbanowany

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

Re: [Skrypt] Kowal 8.1

Nom tez go widzia³em na tnp i nawet nie napisa³e¶ ¿e to nie twój ale te¿ nie napisa³e¶ chocia¿ ¿e twój ;]


Tibia see you!

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

Offline

 

#6 2008-09-28 08:29:14

 Fox

http://i40.tinypic.com/2nv6kn4.gif

Zarejestrowany: 2008-07-11
Posty: 1148

Re: [Skrypt] Kowal 8.1

Skrypt fajny ,ale nie twój ,za k³amstwo da³bym ci munus , lae sie zlituje


http://i88.servimg.com/u/f88/12/58/58/71/mu_eye11.gif

Offline

 

#7 2008-09-28 13:40:35

dzido

http://i33.tinypic.com/21bk4jn.jpg

2652955
SkÄ…d: Rejowiec Fabryczny
Zarejestrowany: 2007-11-17
Posty: 150
Nick: Dzido
Profesja: Jamera
Server: 81

Re: [Skrypt] Kowal 8.1

Dobrze link usune i wezme w quote

Offline

 

#8 2008-10-01 19:18:01

Polandos

Zbanowany

Prosze o usuniêcie konta.
Call me!
Skąd: Prosze o usuniêcie konta.
Zarejestrowany: 2008-06-30
Posty: 520
Nick: Prosze o usuniêcie konta.
Profesja: Prosze o usuniêcie konta.
Server: Prosze o usuniêcie konta.
WWW

Re: [Skrypt] Kowal 8.1

Zwykly skrypt z 7.6 z Loozik ots itp. na jakies wyspie co sie nazywa na G (jest taka mapa z inferna itp.)zabijasz jakies super fajnew kosmos stwory dochodzisz do kowala i on za 1cc chyba albo zalezy od wartosci itema daje ci sklad a obok jest dzwignia kladziesz item i masz nowe


Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.Prosze o usuniêcie konta.

Offline

 

#9 2008-10-31 20:36:22

bubel997

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

4142534
Zarejestrowany: 2008-09-18
Posty: 66

Re: [Skrypt] Kowal 8.1

Skrypt fajny ale nie twój i nie bêdzie + nastêpnym razem z twórz swój skrypt i poleci +

Offline

 

#10 2008-11-01 22:57:47

Dane323

http://i36.tinypic.com/qs3v5t.gif

Zarejestrowany: 2008-10-09
Posty: 868

Re: [Skrypt] Kowal 8.1

Skrypcik fajny przyda sie w OTS'ach rpg (zmienic z np. dsl na np. crown legs) tylko ze nie moj

Offline

 

#11 2008-11-01 23:00:40

Damix1998

http://i34.tinypic.com/28ko5qb.gif

Za Du¿y Spam
Skąd: Mo¿e kiedys sie dowiecie
Zarejestrowany: 2008-10-01
Posty: 51
Nick: Mini Masterka
Profesja: Polski.otserv.net
Server: 100 Elder Druid

Re: [Skrypt] Kowal 8.1

moze mi sie przyda


Nie Bij Mamy Krzes³em To Expa Nie Daje
http://r5.fodey.com/1458d7b6de2f948c1bb9e21a38e3f5634.1.gif
http://www.pokeplushies.com/images/adoptables/761525.gif
Jestem Glodny!

Offline

 

#12 2008-12-29 16:21:08

DonKonieczko

Zbanowany

I'm ToXiC
SkÄ…d: Londynek <33
Zarejestrowany: 2008-12-15
Posty: 310
Nick: Master Loczek
Profesja: Rox666
Server: 250

Re: [Skrypt] Kowal 8.1

Nice Skrypt


www.14dzielnica.pun.pl
Super Forum O Grach !

Offline

 

Stopka forum

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

[ Generated in 0.034 seconds, 9 queries executed ]


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.kingdragons.pun.pl www.dirt-bike.pun.pl www.teatr-przedmiotu.pun.pl www.hajtownia.pun.pl www.mago1w.pun.pl