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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
function script GlobalEventMenu {
function rateManagement {
clear;
mes l("To get the current rate:");
mes col(" @exprate", 7);
next;
mes l("To set the exp rate:");
mes col(" @exprate ##Brate##b hours", 7);
next;
mes l("To reset back to normal:");
mes col(" @exprate default", 7); // note to translators: any non-numerical value will reset so "default" is safe to translate
next;
return;
}
function dropManagement {
clear;
mes l("To get the current rate:");
mes col(" @rates", 7);
next;
mes l("To set the drop rate:");
mes col(" @droprate ##Brate##b hours", 7);
next;
mes l("To reset back to normal:");
mes col(" @droprate default", 7); // note to translators: any non-numerical value will reset so "default" is safe to translate
next;
return;
}
function seasonManagement {
clear;
mes l("Current event: @@", $EVENT$);
menu
l("Disable event"), -,
l("Enable Easter"), -,
l("Enable Worker's Day"), -;
switch (@menu) {
case 1: set $EVENT$, ""; logmes "Disabled events.", LOGMES_ATCOMMAND;
break;
case 2: set $EVENT$, "Easter"; logmes "Enabled EASTER event.", LOGMES_ATCOMMAND; break;
case 3:
set $EVENT$, "Worker Day";
logmes "Enabled WORKERS DAY event.", LOGMES_ATCOMMAND;
/*
addmonsterdrop(Snake, Pearl, 10);
debugmes "Snakes are now dropping Pearls.";
*/
break;
}
return;
}
do
{
clear;
setnpcdialogtitle l("Event Management");
mes l("This menu allows you to manage events and gives access to event-related tools.");
mes "";
mes l("What do you want to access?");
select
l("Experience Rate management"),
l("Drop Rate management"),
l("Change Season Event"),
rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu")));
//.@c = getarg(0,0) ? 2 : 1; // 1 = back to event menu, 2 = back to super menu
switch (@menu) {
case 1: rateManagement; break;
case 2: dropManagement; break;
case 3: seasonManagement; break;
default: return;
}
} while (true);
}
- script @event 32767,{
end;
OnCall:
if (!is_gm()) {
end;
}
GlobalEventMenu;
closedialog;
end;
}
- script @toevent 32767,{
end;
OnCall:
if (!$@GM_EVENT)
dispbottom l("The mana bridge is closed at the moment.");
else if (BaseLevel < 10)
dispbottom l("You are not strong enough to survive this trip.");
else if (readparam(Sp) != readparam(MaxSp))
dispbottom l("You need all your mana to do this trip.");
else if (readparam(Hp) != readparam(MaxHp))
dispbottom l("You cannot be hurt to do this trip.");
else if (getmapname() ~= "001-*")
dispbottom l("You are already at the Mana Plane of Existence.");
else if (getmapname() == "boss" || getmapname() == "sec_pri" || getmapname() ~= "000-*")
dispbottom l("The Mana Plane is currently out of reach.");
else
warp "001-1", 235, 26;
end;
OnInit:
bindatcmd "event", "@event::OnCall", 99, 99, 0;
bindatcmd "toevent", "@toevent::OnCall", 0, 99, 0;
}
|