summaryrefslogblamecommitdiff
path: root/npc/commands/super-menu.txt
blob: a14f26bc3b6ce6de8d654d23f163630bc1fe9570 (plain) (tree)
1
2
3
4


                                         
                              












                                                                                                   

                                                

                                                                  

                                             





                                             
                   
                                                                                          
                      
                                          






                                                                                         










                               
                           























                                                                                              
                                                   
                                                                                                                      
 
function	script	SuperMenu	{
    do
    {
        if (debug && !is_gm())
        {
            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"),
            rif(is_admin(), l("MOTD")),
            rif(is_gm(), l("Event management")),
            rif(is_admin() && !getcharid(2), l("Join teh Guild")),
            rif(is_admin(), l("Referral Program Report")),
            rif(is_admin(), "Broken checks"),
            "Debug";

        switch (@menu)
        {
            case 1: StoneBoard 1; break;
            case 2: MOTDConfig 1; break;
            case 3: GlobalEventMenu 1; break;
            case 4:
            	query_sql("UPDATE `char` SET `guild_id`=1 WHERE `char_id`="+getcharid(0));
                break;
            case 5: HallOfReferral; break;
            case 6: 
                delitem Aquada, 1;
                delitem Bread, 100;
                mes("Either delitem is not working, or you had 1 aquada and 100 bread.");
                next;
                break;
            case 7: GlobalDebugMenu 1; break;
        }
    } while (1);
}



-	script	@super	32767,{
    end;

OnCall:

    if (!debug && !is_gm())
    {
        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", 80, 99, 0;
    //bindatcmd "numa", "@super::OnCall", 80, 99, 0; // alias for those used to TMW's @numa - none at the moment, iirc
}