CPJiNan / AkariLevel

Advanced Level System for RPG Server
Creative Commons Zero v1.0 Universal
9 stars 4 forks source link

Feature: add customizable message condition #8

Closed Zarkness closed 5 months ago

Zarkness commented 5 months ago

add that the message when you set a condition or you can't go up a level can be customizable for each level.

Zarkness commented 5 months ago

add that the message when you receive exp to use the display instead of the one you are currently using.

Since for when the name takes space to use the current one is ugly because in my case Paradox_Hierarchy instead of Paradox Hierarchy that is the display, besides it would be nice to be able to edit that message by level system.

I have to use the command /akarilevel exp add %player_name% , because in the lobby is the only way I can give them xp.

CPJiNan commented 5 months ago

It seems you might want to use the display name of the level groups instead of their edit names in these messages.

Lang

In the latest build, the default language files have been changed. Please regenerate them or refer to this to avoid variable confusion in the messages.

Zarkness commented 5 months ago

add that the message when you set a condition or you can't go up a level can be customizable for each level.

Okay, and this? @CPJiNan

to be able to make this message more customizable that it is possible that in each level after setting the condition you can put a custom message for that level etc...

image

Zarkness commented 5 months ago

I just found that the maximum experience is 2147483647, is it possible to increase the limit?

it would also be nice to be able to use advanced formulas

CPJiNan commented 5 months ago

I just found that the maximum experience is 2147483647, is it possible to increase the limit?

it would also be nice to be able to use advanced formulas

The variable type for level and experience has been changed from Int to Long in the latest build.

CPJiNan commented 5 months ago

Regarding your request to "separately check if different conditions are met and execute different actions," here is an example:

Example-1

Example-2

The "Condition" config item will evaluate the Kether script and check its return values. This allows you to use if-else statements to send messages to players based on the conditions.

Zarkness commented 5 months ago

I just found that the maximum experience is 2147483647, is it possible to increase the limit? it would also be nice to be able to use advanced formulas

The variable type for level and experience has been changed from Int to Long in the latest build.

okey, thx

Zarkness commented 5 months ago

Regarding your request to "separately check if different conditions are met and execute different actions," here is an example:

Example-1

Example-2

The "Condition" config item will evaluate the Kether script and check its return values. This allows you to use if-else statements to send messages to players based on the conditions.

ok and with that it does not send me the message of the en_US file that I told you about? the levelup-fail

Zarkness commented 5 months ago

I don't know how to do the math but I have this formula for level 5 Exp: "20 / %level% + 100 * 2" and the result it gives is

I already found the problem is that in operations like that one that gives decimals it takes them as integer.

another thing you could add to be able to use more complex operations to part of the basic ones as it would be to use sin() etc...?

image

CPJiNan commented 5 months ago

Regarding your request to "separately check if different conditions are met and execute different actions," here is an example:

Example-1

Example-2

The "Condition" config item will evaluate the Kether script and check its return values. This allows you to use if-else statements to send messages to players based on the conditions.

ok and with that it does not send me the message of the en_US file that I told you about? the levelup-fail

I tested using almost the same configuration as yours, and it seems that your experience formula rather than the upgrade condition is the problem.

When using the default formula, it seems that the custom message can be received normally.

Example-1

Example-2

Zarkness commented 5 months ago

Regarding your request to "separately check if different conditions are met and execute different actions," here is an example:

Example-1

Example-2

The "Condition" config item will evaluate the Kether script and check its return values. This allows you to use if-else statements to send messages to players based on the conditions.

ok and with that it does not send me the message of the en_US file that I told you about? the levelup-fail

I tested using almost the same configuration as yours, and it seems that your experience formula rather than the upgrade condition is the problem.

When using the default formula, it seems that the custom message can be received normally.

if I was testing and if it seems to be problem the formula since for example if I put a formula in which it gives decimals is where the problem is since for example this formula (100 2 ) (21 / 7) gave me well osea 600, but if I change 7 by 8 or %level% and gives me the value of the image that you pass before, as it gives decimals and gives error and then when you level up having this formula (100 2 ) (21 / %level%) does not update well and does not allow level up even if you have 10000000000 exp points.

Zarkness commented 5 months ago

then how should be the formula using javascript and math.sin()?

CPJiNan commented 5 months ago

then how should be the formula using javascript and math.sin()?

Maybe you can try the JavaScript Number.toFixed() function.

For example:

(12.5).toFixed()

As for the sin value, I think you can try Math.sin().

(Math.sin(1)*100).toFixed()
Zarkness commented 5 months ago

ok, thank you very much, I will try the last snapshot with all this, and if I find any problem, I will let you know.

by the way the command to give exp the maximum that it allows to put is 1000000000 and now the limit of exp is greater, it would not be his serious that it allows to put the maximum that if I am not mistaken it is 9223372036854775807

CPJiNan commented 5 months ago

ok, thank you very much, I will try the last snapshot with all this, and if I find any problem, I will let you know.

by the way the command to give exp the maximum that it allows to put is 1000000000 and now the limit of exp is greater, it would not be his serious that it allows to put the maximum that if I am not mistaken it is 9223372036854775807

It has been fixed in the latest build.

Zarkness commented 5 months ago

okey, thx, then you can close the issue, so if you want anything else I will open another issue, by the way where is the repo of the wiki to help with the translation etc ...

CPJiNan commented 5 months ago

okey, thx, then you can close the issue, so if you want anything else I will open another issue, by the way where is the repo of the wiki to help with the translation etc ...

OK, thank you very much.

Here is the repository: https://github.com/CPJiNan/Wiki, and here is the plugin documentation: https://cpjinan.github.io/Wiki/.

I would greatly appreciate it if you could help with the translation.