Solved Check part of name of item

  • 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.

Ethereum1

Member
Jul 2, 2017
2
0
0
25
code_language.skript:
on right click with paper:
    if "%lore of player's tool%" contains "Right click to deposit":
        set {_banknote::*} to name of player's tool split at "$"
        add {_banknote::1} to {balance::%player%}
        remove player's held item from player's inventory
        message "&a$%{_banknote::2}% &7has been added to your account"
        play "ORB_PICKUP" to player at volume 1 and pitch 10

Essentially I want to deposit the amount inside the parenthesis on the bank note but I'm not sure how to get that number.

https://gyazo.com/2d2f9a4c629833af0efbb56bfd7c5d2b
https://gyazo.com/11162ee938add05f19694843d955104a
 
Last edited:
code_language.skript:
set {_test::*} to uncolored name of player's tool split at "$"
set {_test2::*} to {_test::2} split at ")"
add "%{_test2::1}%" parsed as an integer to {balance::%player%}
send "You received $%{_test2::1}%"
 
  • Like
Reactions: Ethereum1
Status
Not open for further replies.