1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Formatter

Discussion in 'Skript' started by skanto123, Mar 17, 2018.

Thread Status:
Not open for further replies.
  1. s

    skanto123 Well-Known Member

    Joined:
    Jan 8, 2018
    Messages:
    70
    Likes Received:
    0
    How do I make it so instead of "$10000" it says "&10,000"
     
  2. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    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.
     
  3. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    128
    Likes Received:
    13
    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
     
  4. s

    skanto123 Well-Known Member

    Joined:
    Jan 8, 2018
    Messages:
    70
    Likes Received:
    0
    Thanks, do you know how to multiply xp from killing a mob by 2x??
     
  5. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    128
    Likes Received:
    13
    I will look into it and let you know if I come up with anything.
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,010
    Likes Received:
    138
    try this, it worked for me

    Code (Skript):
    1. options:
    2.     mob: zombie, skeleton, spider, cavespider, wither, creeper, enderman, enderdragon, slime, witch, ghast, silverfish, blaze, bat, pig, cow, chicken, squid, wolf, or sheep
    3.  
    4. on death of {@mob}:
    5.     set {_drop} to the dropped xp
    6.     add {_drop} to the dropped xp
     
  7. s

    skanto123 Well-Known Member

    Joined:
    Jan 8, 2018
    Messages:
    70
    Likes Received:
    0
    Thanks do you have discord? I got 1 more thing I want to ask you <3
     
  8. Revelationage

    Revelationage Well-Known Member

    Joined:
    Jan 27, 2017
    Messages:
    128
    Likes Received:
    13
    This is mine if you need any help: TeamSoloDev#0714
     
  9. s

    skanto123 Well-Known Member

    Joined:
    Jan 8, 2018
    Messages:
    70
    Likes Received:
    0
    Sent a friend request!
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,010
    Likes Received:
    138
    yeah my discord is ShaneBolenback#5925
     
Thread Status:
Not open for further replies.
Loading...