summaryrefslogtreecommitdiff
path: root/npc/commands/super-menu.txt
blob: 9df8c791c3e517a739bcdd70d4e93e31b60d56e0 (plain) (blame)
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// Authors: Gumi, Jesusalva
function	script	SuperMenu	{
    do
    {
        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
            rif(is_gm(), 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_staff(), l("Referral Program Report")),
            rif(is_admin(), "Broken checks"),
            rif(is_admin() && $@GM_OVERRIDE && !$NIVALIS_LIBDATE && $NLIB_DAY, "Flush NLIB"),
            rif(is_gm(), l("Seasonal Drop Control")),
            "Debug",
            "Quit";

        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:
                donpcevent("The Monster King#NLib::OnReprocess");
                if ($NLIB_DAY == 7) {
                    setmapflag("023-2",mf_bexp,200);
                    donpcevent("The Monster King#NLib::OnBegin");
                }
                break;
            case 8: SeasonControl; break;
            case 9: GlobalDebugMenu 1; break;
            default: close; break;
        }
    } while (1);
}



-	script	@super	32767,{
    end;

OnCall:

    if (!is_gm()) {
        dispbottom l("You do not have the required access privileges to use the Super Menu.");
        end;
    }

    SuperMenu;
    closedialog;
    end;

OnInit:
    bindatcmd "super", "@super::OnCall", 80, 99, 0;

    // Special servers
    if (debug) {
        setbattleflag("mob_spawn_delay", $BCONFD_SPAWN);
        setbattleflag("monster_hp_rate", $BCONFD_MOBHP);
        donpcevent("@exprate::OnInheirtedReload");
    } else if ($HARDCORE) {
        setbattleflag("mob_spawn_delay", $BCONFD_SPAWN);
        setbattleflag("monster_hp_rate", $BCONFD_MOBHP);
        // FIXME's
        setbattleflag("mob_count_rate", 150);
        setbattleflag("no_spawn_on_player", 3);
        setbattleflag("zeny_from_mobs", true);
        setbattleflag("item_auto_get", true);
        setbattleflag("enable_perfect_flee", 3); // Mobs can now perfect-flee
        setbattleflag("mob_critical_rate", 100);
        setbattleflag("multi_level_up", true);
        setbattleflag("quest_exp_rate", 300);
        setbattleflag("death_penalty_type", 2); // Death causes total exp loss
        setbattleflag("homunculus_friendly_rate", 1000);
        setbattleflag("hom_bonus_exp_from_master", 30);
        //setbattleflag("pk_mode", 1);
        setbattleflag("party_even_share_bonus", 12); // Official: 9%
        setbattleflag("hp_rate", 200); // Official: 100%
        setbattleflag("player_invincible_time", 10000); // Official: 5s
        setbattleflag("natural_healhp_interval", 1500); // Official: 2.5s
        setbattleflag("natural_heal_weight_rate", 75); // Official: 50%
        setbattleflag("max_aspd", 193); // Official: 190
        setbattleflag("max_parameter", 150); // The Official Official is 150
        setbattleflag("pc_status_def_rate", 50); // 2x harder to get stat resist
        // Reload settings
        donpcevent("@exprate::OnInheirtedReload");
    }
    end;

// Servers with "debug" set are debug servers which must reset on their own
// They restart every sunday, at 03:00 UTC
OnSun0250:
    if (debug) kamibroadcast("WARNING: Test Server will go down for scheduled maintenance in 10 minutes!");
    end;
OnSun0255:
    if (debug) kamibroadcast("WARNING: Test Server will go down for scheduled maintenance in 5 minutes!");
    end;
OnSun0259:
    if (debug) kamibroadcast("WARNING: Imminent Test Server restart!");
    end;
OnSun0300:
    if (debug) atcommand("@serverexit 103");
    end;


// Hardcore Servers also need to reset, but with less frequency
// They restart on the first monday of the month, at 03:00 UTC
// Note: We can use gettimeparam - weeks since epoch - and restart every
// 2 weeks if needed. (weeks % 2 == 1)
OnMon0250:
    if (!$HARDCORE || gettime(GETTIME_DAYOFMONTH) > 7) end;
    kamibroadcast("WARNING: Hardcore Server will go down for scheduled maintenance in 10 minutes!");
    end;
OnMon0255:
    if (!$HARDCORE || gettime(GETTIME_DAYOFMONTH) > 7) end;
    kamibroadcast("WARNING: Hardcore Server will go down for scheduled maintenance in 5 minutes!");
    end;
OnMon0259:
    if (!$HARDCORE || gettime(GETTIME_DAYOFMONTH) > 7) end;
    kamibroadcast("WARNING: Imminent Hardcore Server restart!");
    end;
OnMon0300:
    if (!$HARDCORE || gettime(GETTIME_DAYOFMONTH) > 7) end;
    atcommand("@serverexit 103");
    end;

}