summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-10-14 23:54:58 -0300
committerJesusaves <cpntb1@ymail.com>2022-10-14 23:54:58 -0300
commitaec48a9a849d8b5b092d41fb483aedef1f756d7e (patch)
tree30eee8de0be26062cd558e2d4f7ae2e3f1b1d217
parentd020132b81010a397d61f6e1f01503c32c64bd62 (diff)
downloadserverdata-aec48a9a849d8b5b092d41fb483aedef1f756d7e.tar.gz
serverdata-aec48a9a849d8b5b092d41fb483aedef1f756d7e.tar.bz2
serverdata-aec48a9a849d8b5b092d41fb483aedef1f756d7e.tar.xz
serverdata-aec48a9a849d8b5b092d41fb483aedef1f756d7e.zip
Add boundaries: The account conversion feature will never put you above the TOP 3
average level.
-rw-r--r--npc/functions/clientversion.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt
index 78e81feed..87ff89f9f 100644
--- a/npc/functions/clientversion.txt
+++ b/npc/functions/clientversion.txt
@@ -1135,18 +1135,22 @@ function script clientupdater {
// Permanent Level Boost
// #ADD_LVL means the user have to right to get some levels. This is a sketch. The code might be deleted.
if (#ADD_LVL) {
+ //logmes "[Merger] EXP +"+#ADD_LVL, LOGMES_ATCOMMAND;
if ((readparam(BaseExp)+#ADD_LVL > readparam(NextBaseExp))) {
do {
+ if (BaseLevel >= TOP3AVERAGELVL()) break; // Boundaries
.@v=readparam(NextBaseExp)-readparam(BaseExp);
getexp .@v, 0;
#ADD_LVL-=.@v;
} while (readparam(BaseExp)+#ADD_LVL > readparam(NextBaseExp));
}
- logmes "[Merger] EXP +"+#ADD_LVL, LOGMES_ATCOMMAND;
- getexp #ADD_LVL, 0;
- #ADD_LVL=0;
+ // Only give remaining EXP if you did not hit the boundary
+ if (BaseLevel < TOP3AVERAGELVL()) {
+ getexp #ADD_LVL, 0;
+ #ADD_LVL=0;
+ }
//rodex_sendmail(getcharid(0), "TMW2 Team", "Welcome to Moubootaur Legends", "Hey, thanks for believing on us! We hope to have a great time together. Any problem, ask for help in #world - the Discord bridge! Enjoy our game!", 20);
- // TODO: Maybe an item which lets you open the storage anywhere?
+ // TODO: Maybe give an item which lets you open the storage anywhere?
}
if (.@dg) {