From fc95bd988cbb647e23706535b2cb93ee00f5ae44 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 3 Jul 2018 11:35:49 -0300 Subject: [skip ci] penalty for parties not sharing EXP: Their time is halved. --- npc/008-0/master.txt | 6 ++++++ npc/functions/util.txt | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/npc/008-0/master.txt b/npc/008-0/master.txt index adf4211bd..2cf7129f7 100644 --- a/npc/008-0/master.txt +++ b/npc/008-0/master.txt @@ -23,6 +23,8 @@ next; mesn; mesq l("You also can't stay there forever! You will have about 20 minutes to entirely clear it out and defeat the last boss."); + if (!party_expon(getcharid(1))) + mesc l("Note: your party is not sharing experience, and will suffer a time penalty. Your time will be halved."); next; // Get info about your party, and backup it getpartymember(getcharid(1)); @@ -123,6 +125,10 @@ OnLoop: warp "008-0", 47, 64; dispbottom l("You are not a member of a party anymore."); } + if (!party_expon(getcharid(1))) { + // Party exp sharing disabled means time penalty. + @pmloop+=1; + } // Add new cycle or finish. if (@pmloop < 1200) { diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 48937d157..9e2ef7700 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -233,4 +233,10 @@ function script reachable { return 0; } +// Determines if party exp sharing is enabled +// ( Party ID ) +function script party_expon { + .@nb = query_sql("SELECT exp FROM `party` WHERE party_id="+escape_sql(getarg(0))+" LIMIT 2", .@value); + return .@value[0]; +} -- cgit v1.2.3-60-g2f50