diff options
author | gumi <mekolat@users.noreply.github.com> | 2016-08-18 18:45:01 -0400 |
---|---|---|
committer | gumi <mekolat@users.noreply.github.com> | 2016-09-02 20:16:53 -0400 |
commit | 5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d (patch) | |
tree | f917e542caacec1361a237b2ee25ef184dcbcc9b /npc/commands/super-menu.txt | |
parent | 3aaf8002319cdebd93f2292e6d18cb727c532550 (diff) | |
download | serverdata-5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d.tar.gz serverdata-5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d.tar.bz2 serverdata-5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d.tar.xz serverdata-5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d.zip |
last minute changes
Diffstat (limited to 'npc/commands/super-menu.txt')
-rw-r--r-- | npc/commands/super-menu.txt | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/npc/commands/super-menu.txt b/npc/commands/super-menu.txt new file mode 100644 index 00000000..fede6e71 --- /dev/null +++ b/npc/commands/super-menu.txt @@ -0,0 +1,69 @@ +function script SuperMenu { + do + { + .@gid = getgroupid(); + + if (.@gid < 3) + { + GlobalDebugMenu; + return; + } + + clear; + setnpcdialogtitle l("Super Menu"); + mes l("This menu contains all options available to you, based on your access privileges."); + mes ""; + mes l("What do you want to access?"); + next; + select + l("Scheduled broadcasts"), + l("MOTD"), + rif(.@gid >= 4, l("Event management")), + l("Debug"); + + switch (@menu) + { + case 1: StoneBoard 1; break; + case 2: MOTDConfig 1; break; + case 3: GlobalEventMenu 1; break; + case 4: GlobalDebugMenu 1; break; + } + } while (1); +} + + + +- script @super 32767,{ + end; + +OnCall: + .@gid = getgroupid(); + + if (!debug && .@gid < 3) + { + dispbottom l("You do not have the required access privileges to use the Super Menu."); + end; + } + + SuperMenu; + closedialog; + end; + +OnPCLoginEvent: + .@debug_skill = getskilllv(EVOL_SUPER_MENU); + + if (.@debug_skill > 0 && !debug) + { + skill EVOL_SUPER_MENU, 0, 0; // remove debug skill + } + + else if (.@debug_skill < 1 && debug) + { + skill EVOL_SUPER_MENU, 1, 0; // give debug skill + } + end; + +OnInit: + bindatcmd "super", "@super::OnCall", 0, 99, 0; + bindatcmd "numa", "@super::OnCall", 0, 99, 0; // alias for those used to TMW's @numa +} |