Kod:
[chardef c_cpvp_duello]
name Duello Hakemi
id c_man
can mt_equip|mt_nonmover
On=@Create
str 9500
dex 1000
int 1000
magery 100
invul 1
speechcolor 1953
food 990
color 01
npc 1
taming 32000
itemnewbie random_male_hair
color 01
itemnewbie random_facial_hair
color 01
itemnewbie i_dh
color 0455
on=@gethit
return 1
on=@spelleffect
return 1
on=@death
hits 100
return 1
on=@attack
skill fail
action -1
return 1
on=@hit
return 1
on=@click
messageua 0481,6,6,enu [<name>]
return 1
on=@dclick
if (<src.findid.i_duellocu>)
src.findid.i_duellocu.remove
endif
if (<src.account.plevel>==7) && (<src.isgm>)
sdialog d_cpvp_duello_ayar
elif (<src.account.plevel>==1) || (<src.account.plevel>==7)
if (<distance> >3)
src.sysmessage @1953,1,1,1 Yetisemiyorsunuz...
return 1
endif
sdialog d_cpvp_duello
endif
return 1
[dialog d_cpvp_duello_ayar]
0,0
resizepic 100 100 5120 300 200
resizepic 110 110 9350 280 180
dhtmlgump 170 120 300 20 0 0 <serv.servname> Duello Sistemi
button 120 150 210 211 1 0 1
button 120 175 210 211 1 0 2
button 120 200 210 211 1 0 3
button 120 225 210 211 1 0 4
button 120 250 210 211 1 0 5
dhtmlgump 142 150 400 20 0 0 Normal Koordinati: <tag0.koordinat1>
dhtmlgump 142 175 400 20 0 0 Gerisayim Koordinati: <tag0.koordinat2>
dhtmlgump 142 200 400 20 0 0 Pvp'deki Koordinati: <tag0.koordinat3>
dhtmlgump 142 225 400 20 0 0 1.Player: <tag0.koordinat4>
dhtmlgump 142 250 400 20 0 0 2.Player: <tag0.koordinat5>
[dialog d_cpvp_duello_ayar button]
onbutton 1
var.hakemuid <uid>
targetfg hakemkoordinat 1
onbutton 2
var.hakemuid <uid>
targetfg hakemkoordinat 2
onbutton 3
var.hakemuid <uid>
targetfg hakemkoordinat 3
onbutton 4
var.hakemuid <uid>
targetfg hakemkoordinat 4
onbutton 5
var.hakemuid <uid>
targetfg hakemkoordinat 5
[dialog d_cpvp_duello]
0,0
resizepic 100 100 9300 300 270
resizepic 110 110 9300 280 250
resizepic 155 150 9300 185 20
dhtmlgump 170 120 300 20 0 0 <serv.servname> Duello Sistemi
dhtmlgump 120 150 50 20 0 0 Bahis:
dhtmlgump 345 150 50 20 0 0 Bilet
dtextentry 170 150 100 20 910 1 0
checkbox 132 186 210 211 0 1
dtext 130 230 48 Oyundan dustugunuzde/ciktiginizda
dtext 130 250 48 Yenilmis sayilirsiniz ve belirttiginiz
dtext 130 270 48 Bahsi Kaybedersiniz.
dhtmlgump 160 187 300 20 0 0 Loot var
button 227 310 4023 4025 1 0 1
[dialog d_cpvp_duello button]
onbutton 1
if !(<isnum <argtxt[1]>>) || (<eval <argtxt[1]>> > 30000)
src.sysmessage @38,1,1 Sadece rakam kullanabilirsiniz veya En fazla 30k Sp ile Oynayabilirsiniz.
return 1
endif
serv.newitem i_duellocu
src.new.link <uid>
src.new.tag.bahis <argtxt[1]>
src.new.tag.loot <argchk[1]>
src.new.timer 60*10
src.new.equip
[dialog d_cpvp_duello_teklif]
0,0
resizepic 100 100 9300 300 270
resizepic 110 110 9300 280 250
dtext 170 120 0 <serv.servname> Duello Sistemi
dtext 120 150 0 <cont.name> Duello teklifinde bulundu.
dtext 130 180 38 Bahis : <eval <tag.bahis>> bilet
dtext 130 200 38 Loot : <qval (<tag0.loot>) ? var:yok>
dtext 130 230 48 Oyundan dustugunuzde/ciktiginizda
dtext 130 250 48 Yenilmis sayilirsiniz ve
dtext 130 270 48 <eval <tag.bahis>> bilet Kaybedersiniz.
button 123 320 4023 4025 1 0 1
dtext 156 320 0 Kabul Ediyorum
[dialog d_cpvp_duello_teklif button]
onbutton 0
cont.sysmessage @1976,1,1,1 <src.name> teklifi kabul etmedi..
remove
onbutton 1
if !(<cont.isevent.e_duellogiris>)
src.sysmessage @38,1,1 Rakibiniz veya siz Duello Alaninda degilsiniz.
return 1
endif
if !(<src.isevent.e_duellogiris>)
src.sysmessage @38,,1 Duello Alaninda Olmalisiniz.
return 1
endif
if (<eval <link.tag.pvpdeyim>>==1)
src.sysmessage @1953,1,1,1 Duello alani su anda dolu..
cont.sysmessage @1953,1,1,1 <src.name> teklifi kabul etti, ancak duello alani su anda dolu
return 1
endif
if (<eval <tag.bahis>> = 0)
else
if (<src.restest <eval <tag.bahis>>i_bilet>) && (<cont.restest <eval <tag.bahis>>i_bilet>)
cont.consume <eval <tag.bahis>>i_bilet
src.consume <eval <tag.bahis>>i_bilet
else
src.sysmessage @1976,1,1,1 <cont.name> veya sizde <eval <tag.bahis>> Bilet yok..
cont.sysmessage @1976,1,1,1 <src.name> veya sizde <eval <tag.bahis>> Bilet yok..
return 1
endif
endif
if (<src.findlayer.25>) || (<cont.findlayer.25>)
src.sysmessage @1953,1,1,1 Senin yada onun altinda binek var..
cont.sysmessage @1953,1,1,1 Senin yada onun altinda binek var..
return 1
endif
var.uid1 <src.uid>
var.uid2 <cont.uid>
forchars 25
if (<memoryfindtype.memory_ipet>)
if (<memoryfindtype.memory_ipet.link>==<var.uid1>) || (<memoryfindtype.memory_ipet.link>==<var.uid2>)
try uid.<var.uid1>.sysmessage @1953,1,1,1 Sizin veya rakibinizin binekleri etrafta oldugu surece duello baslamayacaktir.
try uid.<var.uid2>.sysmessage @1953,1,1,1 Sizin veya rakibinizin binekleri etrafta oldugu surece duello baslamayacaktir.
return 1
endif
endif
endfor
var.uid1
var.uid2
timer -1
src.events -e_duellogiris
src.tag.events -e_duellogiris
src.newitem i_duello_deed
new.p <link.tag.koordinat4>
src.newitem i_duello_deed
new.p <link.tag.koordinat5>
src.go <link.tag.koordinat4>
src.Kafesle_duel
src.food 15
src.tag.cpvp_duello_rakip.events -e_duellogiris
src.tag.cpvp_duello_rakip <cont.uid>
src.tag.cpvp_duello_karma <src.karma>
src.tag.cpvp_duello_kills <src.kills>
src.tag.cpvp_duello_fame <src.fame>
cont.go <link.tag.koordinat5>
cont.food 15
cont.Kafesle_duel
cont.events -e_duellogiris
cont.tag.cpvp_duello_rakip.events -e_duellogiris
cont.tag.cpvp_duello_rakip <src.uid>
cont.tag.cpvp_duello_karma <cont.karma>
cont.tag.cpvp_duello_kills <cont.kills>
cont.tag.cpvp_duello_fame <cont.fame>
link.tag.pvpdeyim 1
serv.newitem i_cpvp_duello_gerisayim
new.timer 1
new.morex 5
new.cont <link.uid>
link.go <link.tag.koordinat2>
link.tag.player1 <src.uid>
link.tag.player2 <cont.uid>
//-----------------------------------------------------------------------------------------
// Functions
[function hakemkoordinat]
try uid.<var.hakemuid>.tag.koordinat<args> <src.targp>
src.sysmessage @1953,1,1,1 Yeni koordinat ayarlandi : <src.targp>
[function cpvp_duello_loot]
serv.newitem i_bag
src.new.cont <src.findlayer.29>
local.bag <src.new>
var.lfor
for <uid.<args>.rescount>
if (<uid.<args>.findcont.<eval <var.lfor>>.attr>&attr_newbie)
var.lfor <eval <var.lfor>> +1
else
try uid.<args>.findcont.<eval <var.lfor>>.cont <uid.<local.bag>>
endif
endfor
//-----------------------------------------------------------------------------------------
// Items
[itemdef i_duellocu]
id i_memory
type t_eq_script
name duellocu
on=@equip
target @1953,1,1,1 Kiminle duello yapacaksiniz?
on=@targon_cancel
remove
on=@timer
remove
return 1
on=@targon_char
if !(<src.targ.isplayer>)
src.sysmessage @1952,1,1,1 Sadece playerlarla duello yapabilirsiniz
return 1
elif (<src.targ.isevent.e_cpvp_duello>)
src.sysmessage @1952,1,1,1 <src.targ.name> zaten duello yapiyor.
return 1
elif (<src.isevent.e_cpvp_duello>)
src.sysmessage @1952,1,1,1 Zaten pvp yapiyorsunuz
return 1
elif (<src.uid>==<src.targ.uid>)
src.sysmessage @1952,1,1,1 Kendinizle duello yapamazsiniz
return 1
endif
trysrc <src.targ.uid> sdialog d_cpvp_duello_teklif
src.sysmessage @1976,1,1,1 Teklif yapildi. Lutfen bekleyiniz.
timer 60*120
return 1
[itemdef i_cpvp_duello_gerisayim]
id i_memory
type t_eq_script
name gerisayim
on=@timer
if (<morex>==0)
cont.say Potion ve Bandage Deedleriniz Tam Altinizdadir
cont.say Basarilar..
cont.go <cont.tag.koordinat3>
try uid.<cont.tag.player1>.events e_cpvp_duello
try uid.<cont.tag.player2>.events e_cpvp_duello
try uid.<cont.tag.player1>.events -e_cpvp_area
try uid.<cont.tag.player2>.events -e_cpvp_area
remove
else
timer 1
morex -=1
endif
return 1
[events e_cpvp_duello]
on=@logout
src.hits 0
on=@itemtargon_char
if (<findid.i_duellocu>)
obj <findid.i_duellocu.uid>
else
obj <uid.<tag.cpvp_duello_rakip>.findid.i_duellocu.uid>
endif
on=@spellcast
if (<argn>==45) || (<argn>==32) || (<argn>==52) || (<argn>==24) || (<argn>==57) || (<argn>==54) || (<argn>==50) || (<argn>==49) || (<argn>==45) || (<argn>==43) || (<argn>==40) || (<argn>==39) || (<argn>==28) || (<argn>==22) || (<argn>==38) || (<argn>==44) || (<argn>==58)
src.sysmessage @1976,1,1,1 Duello'da bu buyuleri kullanamazsiniz..
f_fizzle
skill fail
return 1
endif
on=@itemdclick
if (<act.baseid> == i_deed_animal) || (<act.baseid> == i_binek_deed) || (<act.baseid> == i_runebook) || (<act.baseid> == i_pet_golem2) || (<act.baseid> == i_pet_golem1) || (<act.baseid> == i_potion_explosiongreat) || (<act.baseid> == i_potion_explosion) || (<act.baseid> == i_potion_explosionless) || (<act.baseid> == i_runebook) || (<act.baseid> == i_deed_horse_random)
src.sysmessage @2028 Bu bolgede kullanilmaz..
return 1
endif
if (<findid.i_duellocu>)
obj <findid.i_duellocu.uid>
else
obj <uid.<tag.cpvp_duello_rakip>.findid.i_duellocu.uid>
endif
on=@itemequip
if (<findid.i_duellocu>)
obj <findid.i_duellocu.uid>
else
obj <uid.<tag.cpvp_duello_rakip>.findid.i_duellocu.uid>
endif
On=@Death
src.f_cpvp_duello_death
return 1
on=@Skillstart
if ((<action> == id(skill_hiding)) || (<action> == skill_hiding) || (<action> == id(skill_stealth)) || (<action> == skill_stealth))
src.sysmessage @38,,1 Burada Olmaz.
return 1
endif
[function f_cpvp_duello_death]
act <tag.cpvp_duello_rakip>
if (<findid.i_duellocu>)
obj <findid.i_duellocu.uid>
else
obj <act.findid.i_duellocu.uid>
endif
obj.link.go <obj.link.tag.koordinat1>
obj.link.tag.pvpdeyim
obj.link.tag.player1
obj.link.tag.player2
go <obj.link.tag.koordinat1>
if (<memoryfindtype.memory_sawcrime>)
memoryfindtype.memory_sawcrime.remove
endif
tag.cpvp_duello_fame <eval <tag.cpvp_duello_fame>>
tag.cpvp_duello_karma <eval <tag.cpvp_duello_karma>>
tag.cpvp_duello_kills <eval <tag.cpvp_duello_kills>>
tag.cpvp_duello_rakip
act.go <obj.link.tag.koordinat1>
if (<act.memoryfindtype.memory_sawcrime>)
act.memoryfindtype.memory_sawcrime.remove
endif
act.tag.cpvp_duello_fame <eval <act.tag.cpvp_duello_fame>>
act.tag.cpvp_duello_karma <eval <act.tag.cpvp_duello_karma>>
act.tag.cpvp_duello_kills <eval <act.tag.cpvp_duello_kills>>
act.tag.cpvp_duello_rakip
src.sysmessage @1976,1,1,1 Duelloyu kaybettiniz...
src.events +e_duellogiris
src.findid.i_bleeding2.remove
src.findid.i_bleeding.remove
src.findid.i_rune_poison.remove
src.f_fizzle
src.hits 100
act.sysmessage @1976,1,1,1 Tebrikler..Duelloyu kazandiniz!
act.events +e_duellogiris
act.findid.i_bleeding2.remove
act.findid.i_bleeding.remove
act.findid.i_rune_poison.remove
act.hits 100
act.f_fizzle
obj.remove
hits <str>
if (<eval <obj.tag.bahis>> >0)
trysrc <act> paraver <eval <obj.tag.bahis>*2>
act.sysmessage @1976,1,1,1 <eval <obj.tag.bahis>*2> sp Cantaniza aktarildi.
endif
if (<eval <obj.tag.loot>>==1)
findlayer.1.cont <findlayer.21>
findlayer.2.cont <findlayer.21>
findlayer.3.cont <findlayer.21>
findlayer.4.cont <findlayer.21>
findlayer.5.cont <findlayer.21>
findlayer.6.cont <findlayer.21>
findlayer.7.cont <findlayer.21>
findlayer.8.cont <findlayer.21>
findlayer.10.cont <findlayer.21>
findlayer.12.cont <findlayer.21>
findlayer.13.cont <findlayer.21>
findlayer.17.cont <findlayer.21>
findlayer.18.cont <findlayer.21>
findlayer.19.cont <findlayer.21>
findlayer.20.cont <findlayer.21>
findlayer.22.cont <findlayer.21>
findlayer.23.cont <findlayer.21>
findlayer.24.cont <findlayer.21>
trysrc <act> cpvp_duello_loot <findlayer.21>
act.sysmessage @0790,,1 Rakibinizin Loot'u Bag icinde Bankaniza Aktarilmistir.
endif
if (strmatch(*pvp*,<act.region.name>))
act.events +e_cpvp_area
endif
act.events -e_cpvp_duello
if (strmatch(*pvp*,<region.name>))
events +e_cpvp_area
endif
events -e_cpvp_duello
serv.allclients sysmessage @38,,1 Duello Duyuru :
serv.allclients sysmessage @0790,,1 "<src.name>" ile "<act.name>" Arasindaki Duelloyu "<act.name>" Kazanmistir.
[events e_cpvp_area]
on=@attack
skill fail
action -1
return 1
on=@itemdclick
if (<act.baseid> == i_deed_animal) || (<act.baseid> == i_binek_deed) || (<act.baseid> == i_runebook) || (<act.baseid> == i_pet_golem2) || (<act.baseid> == i_pet_golem1) || (<act.baseid> == i_potion_explosiongreat) || (<act.baseid> == i_potion_explosion) || (<act.baseid> == i_potion_explosionless) || (<act.baseid> == i_runebook) || (<act.baseid> == i_deed_horse_random)
src.sysmessage @2028 Bu bolgede kullanilmaz..
return 1
endif
on=@hit
return 1
on=@gethit
return 1
on=@spellcast
if !(<src.uid>==<act.uid>)
f_fizzle
return 1
endif
on=@skillgain
return 1
[events e_duellogiris]
on=@hit
If !(<act.uid> == <src.uid>)
src.sysmessage @38,,1 Duello Alaninda Sadece Kendinize Armor ve stat buyulerini atabilirsiniz.
return 1
endif
On=@SpellCast
if ((<argn> == 28) || (<argn> == 24) || (<argn> == 32) || (<argn> == 33) || (<argn> == 39) || (<argn> == 40) || (<argn> == 45) || (<argn> == 46) || (<argn> == 47) || (<argn> == 49) || (<argn> == 50) || (<argn> >= 55) || (<argn> >= 44))
src.sysmessage @38,,1 Duello Alaninda Sadece Kendinize Armor ve stat buyulerini atabilirsiniz.
f_fizzle
return 1
endif
If !(<act.uid> == <src.uid>)
src.sysmessage @38,,1 Duello Alaninda Sadece Kendinize Armor ve stat buyulerini atabilirsiniz.
return 1
endif
On=@SkillStart
if (<action> == id(skill_hiding)) || (<action> == skill_hiding) || (<action> == id(skill_stealth)) || (<action> == skill_stealth)
src.sysmessage @07a1 Duello'da bunu yapamazsiniz.
skill fail
return 1
endif
mana <int>
If !(<act.uid> == <src.uid>)
src.sysmessage @38,,1 Duello Alaninda Sadece Kendinize Armor ve stat buyulerini atabilirsiniz.
return 1
endif
on=@itemdclick
if (<act.baseid> == i_deed_animal) || (<act.baseid> == i_binek_deed) || (<act.baseid> == i_runebook) || (<act.baseid> == i_pet_golem2) || (<act.baseid> == i_pet_golem1) || (<act.baseid> == i_potion_explosiongreat) || (<act.baseid> == i_potion_explosion) || (<act.baseid> == i_potion_explosionless) || (<act.baseid> == i_runebook) || (<act.baseid> == i_deed_horse_random)
src.sysmessage @2028 Bu bolgede kullanilmaz..
return 1
endif
[function paraver]
serv.newitem i_bilet
new.amount <eval <obj.tag.bahis>*2>
new.bounce
[itemdef i_duello_gate]
defname i_duello_gate
id i_moongate_blue
type t_telepad
on=@create
attr 010
color 080a
on=@click
message @0790,,1 Duello Cikis.
return 1
on=@step
src.go 1913,2112
src.events -e_duellogiris
return 1
[itemdef i_duello_deed]
defname i_duello_deed
id i_deed
on=@create
color 080a
on=@click
message @080a [Slayer Tr]
message @1997,1,1 [Duello Deed]
return 1
on=@dclick
src.newitem i_bandage,5
src.new.bounce
src.newitem i_potion_curegreat,5
src.new.bounce
src.newitem i_potion_healgreat,5
src.new.bounce
src.newitem i_potion_refreshtotal,5
src.new.bounce
src.newitem i_potion_agilitygreat,5
src.new.bounce
src.newitem i_potion_bleed,5
src.new.bounce
remove 1
[eof]
Gördüğünüz Gibi Sorunsuz Çalışıyor Fakat Duelloya Girdiğinde Çantasındaki Potları Nasıl Silebilirim ? ve Poison Var Yada Olmamasını Nasıl Ayarlayabilirim?