diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-09-15 00:25:34 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-09-15 00:25:34 -0300 |
commit | 4b1e1bb544ebfc4a8a864d7ab404408f160c2aa6 (patch) | |
tree | 5df27446594799f03ea8f05d86ff2fec6b1501b6 /npc | |
parent | b6b3954f5ba47378fea23ef7fb73bc4d83c413f3 (diff) | |
download | serverdata-4b1e1bb544ebfc4a8a864d7ab404408f160c2aa6.tar.gz serverdata-4b1e1bb544ebfc4a8a864d7ab404408f160c2aa6.tar.bz2 serverdata-4b1e1bb544ebfc4a8a864d7ab404408f160c2aa6.tar.xz serverdata-4b1e1bb544ebfc4a8a864d7ab404408f160c2aa6.zip |
Rewrite Ched, hotfix patch FOR R10.0 LIVE SERVER
Diffstat (limited to 'npc')
-rw-r--r-- | npc/003-1/ched.txt | 76 | ||||
-rw-r--r-- | npc/functions/scoreboards.txt | 3 | ||||
-rw-r--r-- | npc/functions/seasons.txt | 4 |
3 files changed, 58 insertions, 25 deletions
diff --git a/npc/003-1/ched.txt b/npc/003-1/ched.txt index d4b6038e9..0cdefe386 100644 --- a/npc/003-1/ched.txt +++ b/npc/003-1/ched.txt @@ -11,19 +11,20 @@ return countitem(CactusCocktail)+countitem(CherryCocktail)+countitem(AppleCocktail); } function ScoreSSC { - .@nb = query_sql("SELECT c.name, i.count2 FROM `quest` AS i, `char` AS c WHERE i.quest_id=305 AND i.char_id=c.char_id AND i.count1="+(gettime(GETTIME_YEAR)-2000)+" ORDER BY i.count2 DESC LIMIT 10", .@name$, .@value); - - mes "##B"+l("Top 10 - Summer Ched's Event")+"##b"; - mes("1."+.@name$[0]+" ("+.@value[0]+")"); - mes("2."+.@name$[1]+" ("+.@value[1]+")"); - mes("3."+.@name$[2]+" ("+.@value[2]+")"); - mes("4."+.@name$[3]+" ("+.@value[3]+")"); - mes("5."+.@name$[4]+" ("+.@value[4]+")"); - mes("6."+.@name$[5]+" ("+.@value[5]+")"); - mes("7."+.@name$[6]+" ("+.@value[6]+")"); - mes("8."+.@name$[7]+" ("+.@value[7]+")"); - mes("9."+.@name$[8]+" ("+.@value[8]+")"); - mes("10."+.@name$[9]+" ("+.@value[9]+")"); + mesc l("All leaderboards are refreshed hourly."), 1; + mesc l("Your current score: @@", getq2(SQuest_Ched)), 3; + mes ""; + mes b(l("Top 10 - Summer Ched's Event")); + mes("1."+$@ched_name$[0]+" ("+$@ched_value[0]+")"); + mes("2."+$@ched_name$[1]+" ("+$@ched_value[1]+")"); + mes("3."+$@ched_name$[2]+" ("+$@ched_value[2]+")"); + mes("4."+$@ched_name$[3]+" ("+$@ched_value[3]+")"); + mes("5."+$@ched_name$[4]+" ("+$@ched_value[4]+")"); + mes("6."+$@ched_name$[5]+" ("+$@ched_value[5]+")"); + mes("7."+$@ched_name$[6]+" ("+$@ched_value[6]+")"); + mes("8."+$@ched_name$[7]+" ("+$@ched_value[7]+")"); + mes("9."+$@ched_name$[8]+" ("+$@ched_value[8]+")"); + mes("10."+$@ched_name$[9]+" ("+$@ched_value[9]+")"); next; } function InfoSSC { @@ -31,6 +32,35 @@ mesc l("@@ - @@ point(s)", getitemlink(CherryCocktail), "3"); mesc l("@@ - @@ point(s)", getitemlink(AppleCocktail), "5"); next; + mes ".:: " + l("Prizes") + " ::."; + mes getitemlink(MasterBola); + mesc l("Min. Position: ")+l("top 1"), 3; + mesc l("Min. Score: "+1000); + mes ""; + mes getitemlink(PiouBola); + mesc l("Min. Position: ")+l("top 3"), 3; + mesc l("Min. Score: "+1000); + mes ""; + mes getitemlink(SnakeBola); + mesc l("Min. Position: ")+l("top 5"), 3; + mesc l("Min. Score: "+700); + mes ""; + mes getitemlink(TulimsharBola); + mesc l("Min. Position: ")+l("top 7"), 3; + mesc l("Min. Score: "+400); + mes ""; + mes getitemlink(PurpleBola); + mesc l("Min. Position: ")+l("top 10"), 3; + mesc l("Min. Score: "+200); + mes ""; + mes getitemlink(CandorBola); + mesc l("Min. Position: ")+l("any"), 3; + mesc l("Min. Score: "+100); + mes ""; + mes getitemlink(KidBola); + mesc l("Min. Position: ")+l("any"), 3; + mesc l("Min. Score: "+25); + next; } function DepositSSC { .@pts=.@pts+countitem(CactusCocktail)*1; @@ -123,18 +153,21 @@ L_Autumn: mes ""; } + .@pos=array_find($@ched_name$, strcharinfo(0)); + .@pos=(.@pos >= 0 ? .@pos+1 : 0); + // Give you the due boia - if (strcharinfo(0) == $@AUTUMN_VICTOR$ && @ched > 1000) + if (.@pos <= 1 && @ched > 1000) getitem MasterBola, 1; - else if (@ched >= 1000) + else if (.@pos <= 3 && @ched >= 1000) getitem PiouBola, 1; - else if (@ched >= 700) + else if (.@pos <= 5 && @ched >= 700) getitem SnakeBola, 1; - else if (@ched >= 400) + else if (.@pos <= 7 && @ched >= 400) getitem TulimsharBola, 1; - else if (@ched >= 200) + else if (.@pos <= 10 && @ched >= 200) getitem PurpleBola, 1; - else if (@ched >= 60) + else if (@ched >= 100) getitem CandorBola, 1; else if (@ched >= 25) getitem KidBola, 1; @@ -143,8 +176,9 @@ L_Autumn: if (gettime(7) == 2018) @ched=@ched*12/10; - // Give you experience and money reward - Zeny=Zeny+@ched; + // Give you experience and money reward. + // Each cocktail is worth 15~30 gp, so we'll give 10 GP per point + Zeny+=@ched*10; getexp BaseLevel*@ched, @ched; // The quest is complete for the year. diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt index 47df65760..7524a5a64 100644 --- a/npc/functions/scoreboards.txt +++ b/npc/functions/scoreboards.txt @@ -40,6 +40,9 @@ OnInit: .@nb = query_sql("select name, guild_lv from `guild` WHERE `guild_id`!=1 ORDER BY guild_lv DESC LIMIT 5", $@hoguild_name$, $@hoguild_value); .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='CRAZYPOINTS' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@cfefe_name$, $@cfefe_value); .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='UDTRANK' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@udt_name$, $@udt_value); + if (season() == SUMMER || season() == AUTUMN) { + .@nb = query_sql("SELECT c.name, i.count2 FROM `quest` AS i, `char` AS c WHERE i.quest_id=305 AND i.char_id=c.char_id AND i.count1="+(gettime(GETTIME_YEAR)-2000)+" ORDER BY i.count2 DESC LIMIT 10", $@ched_name$, $@ched_value); + } debugmes "Scoreboards reloaded"; end; } diff --git a/npc/functions/seasons.txt b/npc/functions/seasons.txt index 2d82b5c79..50aa99c24 100644 --- a/npc/functions/seasons.txt +++ b/npc/functions/seasons.txt @@ -271,10 +271,6 @@ OnSummerEnd: end; OnAutumnStart: - // Ched's Quest Winner - .@nb = query_sql("SELECT c.name FROM `quest` AS i, `char` AS c WHERE i.quest_id="+SQuest_Ched+" AND i.char_id=c.char_id AND i.count1="+(gettime(GETTIME_YEAR)-2000)+" ORDER BY i.count2 DESC LIMIT 1", .@name$); - $@AUTUMN_VICTOR$=.@name$[0]; - // Fancy trees addmapmask "012-1", MASK_AUTUMN; |