Skip to main content

39. Basic TOP by Variable

[VARIABLES] 39. BASIC TOP BY VARIABLE

Basic variant allows you to show TOP charts based on any Numeric variable. Allows to show in message up to 10 names of users with the most large sum in chosen variable. Creates Top charts with statistics update performed once a day (24 hours).

❗️ The size of the TOP and the frequency of update you can change using plugins.
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
🔌 Plugins:
➕ 40. TOP by Variable Size of Chart
➕ 41. TOP by Variable Update Rate
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️

▪️ TOP purchased for one bot and can be activated for any (one) numeric variable.
▪️ The price of every individual TOP varies depending on the amount of currently active plugins.
▪️ TOP can be moved from one variable to another and deactivate if need be.
▪️ Up on deleting variable with active TOP, this TOP can be added to another variable.
▪️ Basic TOP updated one time a day (24 hours)(can be changed by plugins).
▪️ Basic maximum level number is 10 (can be changed by plugins).

▪️ The following macros should be used for showing data to users:
%topvarname1u%
▫️ Macros will show Name of the user in corresponding position.
%topvarname1v%
▫️ Macros will show the variable state in corresponding position.
▫️ Each Macros is a composition of:
varname - variable name
1 - number if position in chart
u - user name
v - state of variable
➠ Example:
%topbalance1v%
State of balance variable on the first place.
%topinvest9u%
The Name of user with "invest" variable on a ninth place.

▪️ The following command should be used by admin for viewing chart's data:
/vartop var_name
Available only for admins.
➠ Example:
/vartop balance
Will show chart for balance variable.

▪️ Additional macros:
%topvarh%
will show amount of hours before next chart update.
%topvarm%
will show amount of minutes before next chart update.
❗️ Where "var" is the name if your variable.

▪️ To round variable values, use the syntax:
{round("%yourmacros%")} - with quotes

▪️ To turn on TOP for variables go:
☞ 🔐Admin | 🗄Variables
📙Numeric
⚪️ Choose variable
«Top by Variable»

▪️ To show "0" (zero) instead of dashes "---" - in the variable settings (see above) enable the option: «Zero if Empty».

➠ Example of the message to display Top-3 balances for users:

OUR RATING OF TOP-3 BALANCES!
Lvl. 1. %topbalance1u% - %topbalance1v%
Lvl. 2. %topbalance2u% - %topbalance2v%
Lvl. 3. %topbalance3u% - %topbalance3v%

To add feature go to your bot:
☞ 🔐Admin | 🧩Extensions | 📂Variables
〰️〰️〰️〰️〰️〰️〰️〰️〰️〰️
The price of every individual TOP varies depending on the amount of currently active plugins.
👾 On 1 Bot (Individually)