1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
// TMW-2 Script
// Author:
// Jesusalva
// Description:
// This stuff should be moved somewhere else...
003-1,89,109,0 script Michel NPC_BACCHUS,{
mesn;
mesq l("These people have lots of unspent Strange Coins! Waw!");
HallOfCoins();
// Anyone with GM Level, staff or not, is allowed to latest GM logs
if (!getgmlevel()) goto L_Main;
next;
HallOfGMLog();
// Only Admins are allowed to change the HoF Scoreboard
if (!is_admin()) goto L_Main;
next;
mes "##BGM Information##b";
mes "We are currently relying in Karma to generate this Hall Of Fame.";
mes "";
mes "##B Manual Edition ##b";
mes "To reliably change Karma values, you must use @set Karma.";
mes "But watch out: This command overrides karma!";
mes "Therefore, it is advised to DON'T change this by hand.";
mes "";
mes "##B Scripting Edition ##b";
mes "Is known to work. This hall of fame will need a few minutes to update itself.";
mes "";
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; logmes "Enabled REFER event.", LOGMES_ATCOMMAND; break;
case 3:
HallOfReferral(); break;
case 4:
mesc "Are you sure?", 1;
next;
if (askyesno() == ASK_YES) {
deletearray($REFERRAL_IDS);
logmes "##1Deleted PERMANENTLY the REFER event scoreboard.##0", LOGMES_ATCOMMAND;
}
default: close;
}
next;
goto L_GM;
OnInit:
.sex = G_MALE;
.distance = 5;
end;
}
|