summaryrefslogtreecommitdiff
path: root/npc/003-1/michel.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/003-1/michel.txt')
-rw-r--r--npc/003-1/michel.txt41
1 files changed, 39 insertions, 2 deletions
diff --git a/npc/003-1/michel.txt b/npc/003-1/michel.txt
index 4fe22308d..03893dfbe 100644
--- a/npc/003-1/michel.txt
+++ b/npc/003-1/michel.txt
@@ -12,13 +12,13 @@
HallOfCoins();
// Anyone with GM Level, staff or not, is allowed to latest GM logs
- if (!getgmlevel()) close;
+ if (!getgmlevel()) goto L_Main;
next;
HallOfGMLog();
// Only Admins are allowed to change the HoF Scoreboard
- if (!is_admin()) close;
+ if (!is_admin()) goto L_Main;
next;
mes "##BGM Information##b";
@@ -35,8 +35,45 @@
mes "##B Technical Notes ##b";
mes "In future we may start Fame field directly (but it is not displayed on client, thus, we decided to use Karma).";
//set Karma, Karma + 5;
+ if (is_admin()) goto L_GM;
close;
+L_Main:
+ if (!$REFERRAL_IDS[#REFERRAL_PROG])
+ close;
+ next;
+ mesn;
+ mesq l("Hey, I see you have appointed @@ players to this game. Good job!", $REFERRAL_IDS[#REFERRAL_PROG]);
+ close;
+
+L_GM:
+ .@nb = query_sql("SELECT SUM(value) FROM `mapreg` WHERE varname='$REFERRAL_IDS' LIMIT 2", .@value);
+ @total=.@value[0];
+ mesc "Referral Event status: " + ($REFERRAL_ENABLED ? "##2ACTIVE##0" : "##1INACTIVE##0");
+ mesc "Total refers count: "+@total;
+ mes "";
+ select
+ "Close",
+ "Toggle Referral Event",
+ "Scoreboard",
+ "CLEAR REFERRAL ID ARRAY",
+ "Close";
+ mes "";
+ switch (@menu) {
+ case 2:
+ $REFERRAL_ENABLED=!$REFERRAL_ENABLED; break;
+ case 3:
+ HallOfReferral(); break;
+ case 4:
+ mesc "Are you sure?", 1;
+ next;
+ if (askyesno() == ASK_YES)
+ deletearray($REFERRAL_IDS);
+ default: close;
+ }
+ next;
+ goto L_GM;
+
OnInit:
.sex = G_MALE;
.distance = 5;