diff options
Diffstat (limited to 'npc/003-1')
-rw-r--r-- | npc/003-1/hasan.txt | 63 |
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; } + |