#colors / symbols depends of requirements

1 messages · Page 1 of 1 (latest)

lunar flare
#

Hello! Can someone tell me please how to make colors n symbols in my menu depends of requirements like on screenshot?

(I know I can made it via priorities but I have many requirements so there would be thousands of priority items...)

spiral belfry
#

Changeoutput might be what you are looking for. It can be also achieved with a single JS placeholder + easier to change

#
function run() {
  if (!args || args.length < 2) return "Missing arguments";
  let required = parseInt(args[0]);
  let progress = parseInt(args[1]);

 if (progress >= required) return "&a" + progress + "&f / &7" + required + "&a ✅️";
  else return "&c" + progress + "&f / &7" + required + "&c ❌️";
}

run();```
#

You need the javascript expansion and after you register this script you call it like this %javascript_<name>_<required-amount>,{placeholder for progress}%

e.g. &f- Mob Kills: %javascript_<name>_20,{statistic_mob_kills}%

#

@lunar flare

fallen valeBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

spiral belfry
#

@lunar flare

#

Try again, added a missing ;

lunar flare
spiral belfry
#

After my edit?

lunar flare
spiral belfry
#

Do /papi reload again, the error should not be the same..

lunar flare