From 20df2abc1aca00d6aa5dc78347133890f36b32f3 Mon Sep 17 00:00:00 2001 From: Saulc Date: Sat, 13 Jan 2018 20:50:42 +0100 Subject: Initial commit --- npc/commands/event.txt | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 npc/commands/event.txt (limited to 'npc/commands/event.txt') diff --git a/npc/commands/event.txt b/npc/commands/event.txt new file mode 100644 index 000000000..db98bcf29 --- /dev/null +++ b/npc/commands/event.txt @@ -0,0 +1,57 @@ +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; + } + + 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("Rate management"), + 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; + default: return; + } + + } while (true); +} + + + +- script @event 32767,{ + end; + +OnCall: + if (!is_evtc()) + { + end; + } + + GlobalEventMenu; + closedialog; + end; + +OnInit: + bindatcmd "event", "@event::OnCall", 0, 99, 0; +} -- cgit v1.2.3-60-g2f50