summaryrefslogtreecommitdiff
path: root/npc/003-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-22 23:05:34 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-22 23:05:34 -0300
commitec78c5c7134ca53b8eeea22e6975f9e515f69430 (patch)
tree098354b0cf9850d6a9a0562b0428402aaa794dcc /npc/003-1
parent55bd7b7d2eab6448d9515c0d2ac059f3ef281202 (diff)
downloadserverdata-ec78c5c7134ca53b8eeea22e6975f9e515f69430.tar.gz
serverdata-ec78c5c7134ca53b8eeea22e6975f9e515f69430.tar.bz2
serverdata-ec78c5c7134ca53b8eeea22e6975f9e515f69430.tar.xz
serverdata-ec78c5c7134ca53b8eeea22e6975f9e515f69430.zip
Hasan Autumn's Scorpion Killing Quest!! :inGame_N:
During autumn, you have 3 months to kill scorpions and get Hasan's money. You can also donate to event. Rewards only claimable during Winter.
Diffstat (limited to 'npc/003-1')
-rw-r--r--npc/003-1/hasan.txt63
1 files changed, 60 insertions, 3 deletions
diff --git a/npc/003-1/hasan.txt b/npc/003-1/hasan.txt
index aeef80c63..708fa4bd9 100644
--- a/npc/003-1/hasan.txt
+++ b/npc/003-1/hasan.txt
@@ -25,6 +25,8 @@
// Number of Scorpions killed during Autumn
// $HASAN_GP
// Total money Hasan collected for Autumn event
+// $HASAN_LT
+// Previous collected money, for rewards calc
// Temporary sprite
003-1,62,148,0 script Hasan NPC_ELVEN_MAN_RED,2,2,{
@@ -80,6 +82,31 @@ L_Complete:
mesn;
mesq l("I am collecting money for the Yearly Autumn Scorpion Hunter quest.");
mesq l("You're, of course, invited. Thus far, the total prize money I've collected is @@ GP.", $HASAN_GP);
+ if (season() == AUTUMN) {
+ mesq l("You've killed @@ scorpions, and a total of @@ were killed this season.", getq2(SQuest_Autumn), $HASAN_ST);
+ mesq l("If the event ended now, you would get @@ GP.", getq2(SQuest_Autumn)*$HASAN_GP/$HASAN_ST);
+ menuint
+ l("Thanks."),0,
+ rif(Zeny >= 5, l("Donate 5 GP for prize")),5,
+ rif(Zeny >= 15, l("Donate 15 GP for prize")),15,
+ rif(Zeny >= 50, l("Donate 50 GP for prize")),50,
+ rif(Zeny >= 100, l("Donate 100 GP for prize")),100;
+ if (@menu > 0) {
+ Zeny=Zeny-@menu;
+ $HASAN_GP=$HASAN_GP+@menu;
+ }
+ }
+
+ if (season() == WINTER && getq(SQuest_Autumn) == gettime(GETTIME_YEAR)) {
+ .@p=getq2(SQuest_Autumn)*$HASAN_LT/$HASAN_ST;
+ mesn l("Summary");
+ mes l("Scorpions killed: @@/@@ scorpions", getq2(SQuest_Autumn), $HASAN_ST);
+ mes l("Total money collected: @@ GP", $HASAN_LT);
+ mes l("##2Your prize: @@ GP", );
+ if (.@p >= 1)
+ Zeny=Zeny+.@p;
+ setq SQuest_Autumn, 1970, 0;
+ }
close;
L_TouchComplete:
@@ -115,11 +142,41 @@ OnInit:
//npcspeed(150);
//npcwalkto(<x>, <y>);
+ end;
+
+// Restart hasan status on 20/09
+OnDay0920:
+ $HASAN_ST=0;
+ end;
- // Create initial GP poll
- if ($HASAN_GP == 0)
- $HASAN_GP=rand(3,12)+rand(3,12)+rand(3,12);
+// Once autumn is over (21/12) restart GP poll and send value to backup
+OnDay1221:
+ $HASAN_ST=0;
+ $HASAN_LT=0+$HASAN_GP;
+ $HASAN_GP=0;
end;
+}
+function script SQuest_Hasan {
+ if (season() != AUTUMN)
+ return;
+ if (getq(SQuest_Autumn) != gettime(GETTIME_YEAR))
+ setq SQuest_Autumn, gettime(GETTIME_YEAR), 0;
+ // All scorpions are counting for Hasan Autumn Quest
+ if (
+ killedrid == Scorpion ||
+ killedrid == RedScorpion ||
+ killedrid == BlackScorpion ||
+ killedrid == CandorScorpion ||
+ killedrid == AngryScorpion ||
+ killedrid == AngryRedScorpion ||
+ killedrid == NightScorpion ||
+ killedrid == GoldenScorpion ||
+ killedrid == MurdererScorpion) {
+ setq2 SQuest_Autumn, getq2(SQuest_Autumn)+1;
+ $HASAN_ST=$HASAN_ST+1;
+ }
+ return;
}
+