Formatter

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Do you use an economy plugin? Essentials, for instance, had an option in it's configuration for what the currency is displayed as.
If you want to just format numbers with skript, there was actually a whole contest based around this, so there's plenty of examples and ways to do it in that thread here.
 
You can use regex to split a number with commas (returns string).

function commas(value: text) :: text:
return regex replace "(?<=\d)(?=(\d\d\d)+(?!\d))" with "," in {_value}

command /test <number>:
trigger:
set {_value} to commas("%arg 1%")
broadcast "%{_value}%"

Requires TuSKe
 
You can use regex to split a number with commas (returns string).

function commas(value: text) :: text:
return regex replace "(?<=\d)(?=(\d\d\d)+(?!\d))" with "," in {_value}

command /test <number>:
trigger:
set {_value} to commas("%arg 1%")
broadcast "%{_value}%"

Requires TuSKe
Thanks, do you know how to multiply xp from killing a mob by 2x??
 
Thanks, do you know how to multiply xp from killing a mob by 2x??
try this, it worked for me

code_language.skript:
options:
    mob: zombie, skeleton, spider, cavespider, wither, creeper, enderman, enderdragon, slime, witch, ghast, silverfish, blaze, bat, pig, cow, chicken, squid, wolf, or sheep

on death of {@mob}:
    set {_drop} to the dropped xp
    add {_drop} to the dropped xp
 
try this, it worked for me

code_language.skript:
options:
    mob: zombie, skeleton, spider, cavespider, wither, creeper, enderman, enderdragon, slime, witch, ghast, silverfish, blaze, bat, pig, cow, chicken, squid, wolf, or sheep

on death of {@mob}:
    set {_drop} to the dropped xp
    add {_drop} to the dropped xp
Thanks do you have discord? I got 1 more thing I want to ask you <3
 
Status
Not open for further replies.