diff options
Diffstat (limited to 'world/map/npc')
-rw-r--r-- | world/map/npc/commands/bosspoints.txt | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/world/map/npc/commands/bosspoints.txt b/world/map/npc/commands/bosspoints.txt index 3b0485b3..1cfb1e56 100644 --- a/world/map/npc/commands/bosspoints.txt +++ b/world/map/npc/commands/bosspoints.txt @@ -1,14 +1,36 @@ -|script|@bosspoints|32767 { - message strcharinfo(0), "Boss Points : You currently have " + BOSS_POINTS + " Boss Points."; + message strcharinfo(0), "Boss Points : You currently have " + BOSS_POINTS + " Boss Points. Boss point rate: " + $@BOSS_POINT_RATE + "%"; close; +OnBPRate: + if (GM < G_GM) + goto OnBPRate_Denied: + + callfunc "argv_splitter"; + set .@new_rate, @argv[0]; // TODO: ensure this is an int? + + // Limit to 300 for when Led needs to prove a point. + set $@BOSS_POINT_RATE, max(0, min(.@new_rate, 300)); + + message strcharinfo(0), "Boss Points : repeatable quest rate modified to " + $@BOSS_POINT_RATE + "." + + if_then_else(.@new_rate >= 125, "This is" + if_then_else(.@new_rate < 150, " bordering on", "") + " abuse!", ""); + + set .@new_rate, 0; + end; + +OnBPRate_Denied: + message strcharinfo(0), "Ewwww! When was the last time you took a shower?!"; + end; + OnInit: set $@BOSS_POINT_RATE, 100; // TODO: allow event managers to give and take boss points registercmd chr(ATCMD_SYMBOL) + "bosspoints", strnpcinfo(0); registercmd chr(ATCMD_SYMBOL) + "bosspoint", strnpcinfo(0); // for typos registercmd chr(ATCMD_SYMBOL) + "bp", strnpcinfo(0); // shortcut + + registercmd chr(ATCMD_SYMBOL) + "bprate", strnpcinfo(0) + "::OnBPRate"; end; } |