summaryrefslogtreecommitdiff
path: root/npc/commands/motd.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/commands/motd.txt')
-rw-r--r--npc/commands/motd.txt67
1 files changed, 54 insertions, 13 deletions
diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt
index 7a4f65576..34af15106 100644
--- a/npc/commands/motd.txt
+++ b/npc/commands/motd.txt
@@ -1,3 +1,4 @@
+// TMW2 Script
function script displayMOTD {
.@size = getvariableofnpc(.size, "@motd");
.@dsize = getvariableofnpc(.dsize, "@motd");
@@ -172,6 +173,17 @@ OnPCLoginEvent:
}
// Handle daily login bonus
+ // The Strange Coin output wasn't changed, but now it relies on streaks.
+ // Variables:
+ // #LOGIN_DAY
+ // Current day
+ // #LOGIN_TABLE
+ // Current month
+ // #LOGIN_STREAK
+ // Number of monthly connections
+ // #LOGIN_ALLTIME
+ // Number of times you claimed the top prize (27 days streak)
+
if (#LOGIN_DAY != .login_ref) {
// Is it a new month?
if (#LOGIN_TABLE == gettime(6)) {
@@ -184,32 +196,61 @@ OnPCLoginEvent:
// Update last day you've claimed a reward
#LOGIN_DAY = .login_ref;
- // Handle rewards: Streaks first, daily later. Streak reward overrides daily reward.
+ // Handle rewards: Streaks first, daily later. Streak reward prevail over daily reward.
if (#LOGIN_STREAK > 27) {
getitem StrangeCoin, 2;
dispbottom l("##2 @@ Days login bonus: ##B2x @@##b", #LOGIN_STREAK, getitemlink(StrangeCoin));
} else if (#LOGIN_STREAK == 27) {
- getitem RightEyePatch, 1;
- dispbottom l("##2 27 Days login bonus: ##B1x @@##b", getitemlink(RightEyePatch)); // TODO placeholder
+ #LOGIN_ALLTIME+=1;
+ // Your prize is based on season
+ switch (season()) {
+ case AUTUMN:
+ .@prize=ChocolateDye; break; // Maybe a LightGreenDiamond? Well, even an ElixirOfLife is better!
+ case WINTER:
+ .@prize=SilverGift; break;
+ case SPRING:
+ .@prize=Toothbrush; break;
+ case SUMMER:
+ .@prize=RightEyePatch; break;
+ }
+ // Some special cases
+ if (#LOGIN_ALLTIME == 3)
+ .@prize=GoldenGift;
+ if (#LOGIN_ALLTIME == 8)
+ .@prize=PrismGift;
+
+ if (#LOGIN_ALLTIME == 12) {
+ dispbottom l("CONGRATULATIONS! For a year worth of logins, you're getting a pet!");
+ makepet Piou; // we must replace this before August 2019. (r18 probably)
+ }
+
+ getitem .@prize, 1;
+ dispbottom l("##2 27 Days login bonus: ##B1x @@##b", getitemlink(.@prize));
} else if (#LOGIN_STREAK == 21) {
- getitem StrangeCoin, 3;
- dispbottom l("##2 21 Days login bonus: ##B3x @@##b", getitemlink(StrangeCoin));
+ getitem StrangeCoin, 7;
+ dispbottom l("##2 21 Days login bonus: ##B7x @@##b", getitemlink(StrangeCoin));
} else if (#LOGIN_STREAK == 14) {
- getitem StrangeCoin, 2;
- dispbottom l("##2 14 Days login bonus: ##B2x @@##b", getitemlink(StrangeCoin));
+ getitem StrangeCoin, 5;
+ dispbottom l("##2 14 Days login bonus: ##B5x @@##b", getitemlink(StrangeCoin));
} else if (#LOGIN_STREAK == 7) {
- .@value=max(20, rand(0, (#LOGIN_STREAK)));
- getexp 0, .@value;
- dispbottom l("##2 7 Days login bonus: ##B@@ Job Exp.##b", .@value);
- } else if (.login_ref % 3 == 0) {
+ getitem StrangeCoin, 2;
+ dispbottom l("##2 7 Days login bonus: ##B2x @@##b", getitemlink(StrangeCoin));
+ } else if (#LOGIN_STREAK == 3) {
getitem StrangeCoin, 1;
- dispbottom l("##2Daily login bonus: ##B1x @@##b", getitemlink(StrangeCoin));
+ dispbottom l("##2 3 Days login bonus: ##B1x @@##b", getitemlink(StrangeCoin));
+ } else if (.login_ref % 3 == 0) {
+ .@value=max(5, rand(0, (#LOGIN_STREAK/4)));
+ .@value+=(BaseLevel**2);
+ getexp .@value, 0;
+ dispbottom l("##2Daily login bonus: ##B@@ EXP##b", .@value);
} else if (.login_ref % 3 == 1) {
.@value=max(20, rand(0, (#LOGIN_STREAK*2)));
+ .@value+=(BaseLevel+JobLevel);
Zeny=Zeny+.@value;
- dispbottom l("##2Daily login bonus: ##B@@ GP##b", str( .@value ) );
+ dispbottom l("##2Daily login bonus: ##B@@ GP##b", .@value);
} else {
.@value=max(5, rand(0, (#LOGIN_STREAK/4)));
+ .@value+=(JobLevel**2);
getexp 0, .@value;
dispbottom l("##2Daily login bonus: ##B@@ Job Exp.##b", .@value);
}