summaryrefslogtreecommitdiff
path: root/npc
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
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')
-rw-r--r--npc/003-1/hasan.txt63
-rw-r--r--npc/003-3/malindou.txt1
-rw-r--r--npc/functions/mobpoint.txt8
3 files changed, 64 insertions, 8 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;
}
+
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index a26e6dcaa..ee28c4b17 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -28,6 +28,7 @@ OnInit:
// Current UPDATE value: Dom Jun 17 21:32:45 -03 2018
if ($UPDATE < 1529281965) {
$UPDATE=1529281965;
+ $HASAN_GP=rand(3,12)+rand(3,12)+rand(3,12);
}
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index 27cf31b72..9219f3b29 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -4,17 +4,14 @@
// Desc: Mob Points for Aidan & Ishi. You will gain MONSTER-LEVEL mob points.
function script mobpoint {
- if (!MPQUEST) goto L_Return;
+ if (!MPQUEST)
+ return;
//if (killedrid < 1002) goto L_Return;
// You get MobLv + 10% as MobPoints.
// So a level 100 monster gives you 110 MobPt.
.@addval=strmobinfo(3,killedrid)*11/10;
Mobpt = Mobpt + .@addval;
-
-
-L_Return:
- //set @value, 0;
return;
}
@@ -24,5 +21,6 @@ L_Return:
OnNPCKillEvent:
callfunc "mobpoint";
+ callfunc "SQuest_Hasan";
end;
}