Merhaba arkadaşlar.
x bir platformdan aldıgım top10 sistemini biraz değiştirip haftada bir birinciye ödül veren şekle soktuk.
Soktuk sokmasınada liste puanları sıfırlanınca listede önceki isimler kalıyor veyahutta map üzerindeki
itemlerin adı mesela worldgem bit felan yazıyor. Bunları nasıl fixlerim bilemedim daha dogrusu...
Listclear gibi bi tirgger dedi birisi ama ne bulabildim nede inandım..
Şu scpte bug da olabilr diyecegim ama işlevinde bir sorun yok dedigim gibi tek sıkıntı puanları sıfırlatıp ödül verdikten sonra listede isimler kalması.Yani sıfırlanınca bütün 1.2.3.4.5 liste isimleri ---- veya O şekline girsin istiyorm
Varsa yardım edebilcek cok memnun olurum yani.
[defname topplayer]
topplayer 10 //değiştirilebilir topplayer değeri
///////////////////////////***************////////////////////
[itemdef i_top10listesi]
defname i_top10listesi
ID=i_bulletin_board
name top10 liste
weight 1231231
TYPE T_NORMAL
on=@create
TIMER = <EVAL (3600*24)*7>
color 07b1
ATTR=010
on=@click
message @07b1,,1 <eval <timer>/86400> gün, <eval (<timer>%86400)/3600> saat ve <eval ((<timer>%86400)%3600)/60> dakika sonra sıfırlanacak.
message @07b7,,1 En iyi 10 oyuncu.
return 1
on=@dclick
src.dialogclose d_top10
src.sdialog d_top10
return 1
on=@timer
top10temizligi
TIMER = <EVAL (3600*24)*7>
///////////////////////////***************////////////////////
[itemdef i_top10odulu]
defname i_top10odulu
id i_crystal_ball
name top10 odulu
on=@create
color 0809
on=@click
message @07b7,,1 Top10 şampiyonu.
message @1153,,1 Tebrikler.
return 1
on=@dclick
if (<topobj.uid> != <src.uid>)
src.sysmessage @07b7,,1 Çantanızda olmalıdır.
return 1
endif
serv.newitem i_deed_guildstone
new.bounce
serv.newitem i_egg_binek
new.bounce
serv.newitem i_pet_horse_brown_dk
new.more c_m_mare
new.name Nightmare
new.color 0901
new.bounce
serv.newitem i_gold,50000
new.bounce
serv.newitem i_gold,50000
new.bounce
serv.newitem i_gold,50000
new.bounce
serv.newitem i_gold,50000
new.bounce
serv.newitem i_gold,50000
new.bounce
remove
///////////////////////////***************////////////////////
[plevel 1]
istatistik
[function istatistik]
src.dialogclose d_top10
src.sdialog d_top10
[dialog d_top10]
10,100
nomove
resizepic 50 0 3600 400 250 //ARka Fon
page 0
dtext 150 218 450 <serv.servname> Eniyi 10 player.
dtext 70 20 38 1 ->
dtext 70 40 38 2 ->
dtext 70 60 38 3 ->
dtext 70 80 38 4 ->
dtext 70 100 38 5 ->
dtext 70 120 38 6 ->
dtext 70 140 38 7 ->
dtext 70 160 38 8 ->
dtext 70 180 38 9 ->
dtext 70 200 38 10 ->
dtext 350 20 38 Puan:
dtext 350 40 38 Puan:
dtext 350 60 38 Puan:
dtext 350 80 38 Puan:
dtext 350 100 38 Puan:
dtext 350 120 38 Puan:
dtext 350 140 38 Puan:
dtext 350 160 38 Puan:
dtext 350 180 38 Puan:
dtext 350 200 38 Puan:
for c 1 10
obj = <var.topplayer_<dlocal.c>>
if !(strmatch('<var0.topplayer_<dlocal.c>>','0')
dtext 120 <hval <local.c>*20> 50 <obj.name>
dtext 400 <hval <local.c>*20> 50 <dobj.tag0.puan_action>
endif
endfor
///////////////////////////***************////////////////////
[function top10puankazan]
tag0.puan_action +=1
for 1 <ddef.topplayer>
var.remove <ddef.topplayer>
for y 1 <ddef.topplayer>
ref1=<var.topplayer_<dlocal.y>>
if (<ref1> = <uid>)
var.remove <dlocal.y>
endif
endfor
ref2=<var.topplayer_<dlocal._for>>
if (<dtag.puan_action> >= <ref2.dtag.puan_action>)
var.topplayer_<dvar.remove>
for x <dvar.remove> <dlocal._for>
var.topplayer_<dlocal.x> <var.topplayer_<eval <dlocal.x> -1>>
endfor
var.topplayer_<dlocal._for> <uid>
var.remove
return 1
endif
endfor
///////////////////////////***************////////////////////
[function top10temizligi]
remove
tebelekoy
kimbirinci
top10puanlarinisil
///////////////////////////***************////////////////////
[function tebelekoy]
serv.newitem i_top10listesi
new.p 1966,2072
new.update
new.fix
///////////////////////////***************////////////////////
[function kimbirinci]
for c 1 10
obj = <var.topplayer_<dlocal.c>>
if !(strmatch('<var0.topplayer_<dlocal.c>>','0')
if (strmatch("<dlocal.c>","1")
try uid.<obj.uid>.odulumuverleyn
return 1
endif
endfor
///////////////////////////***************////////////////////
[function odulumuverleyn]
serv.newitem i_top10odulu
serv.allclients sysmessage @07b7,,1 Haftanin top10 birincisi <name> olmuştur.
new.cont <findlayer(29).uid>
///////////////////////////***************////////////////////
[function top10puanlarinisil]
forplayers 65000
IF (<id> == c_man) || (<id> == c_woman)
tag0.puan_action =0
sysmessage @1153,,1 Puaniniz sifirlandi.
ENDIF
ENDFOR
///////////////////////////***************////////////////////
[EOF]