diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-02-05 20:59:15 +0100 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-02-05 20:59:15 +0100 |
commit | 89cf709af3121b2792ddf95077010c43f4718519 (patch) | |
tree | a9c4f951ada92c45753e2d868f38877a28dc003d /world | |
parent | ecad3392ea43599e7a7d87711d747d3484be8b8c (diff) | |
download | classic-serverdata-workbench.tar.gz classic-serverdata-workbench.tar.bz2 classic-serverdata-workbench.tar.xz classic-serverdata-workbench.zip |
Add ability to modify bp rate and show current rate when @bp are checked.workbench
Diffstat (limited to 'world')
-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; } |