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

Solved Can someone help me in one little thing?

Discussion in 'Skript' started by St0medy, Dec 5, 2017.

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

    St0medy Member

    Joined:
    Nov 26, 2017
    Messages:
    18
    Likes Received:
    1
    In this code, when I put the command, but it does not give me the money of all the items I have, that is, if I have 40 leather does not give me 25 x 40, it gives me only 25 for all

    Thanks so much.

    Code (Skript):
    1. command /FixerDevSKxe:
    2.     permission: porros.shop
    3.     trigger:
    4.         set {_amount} to 0
    5.         loop all items in player's inventory:
    6.             if loop-item is leather:
    7.                 set {_n} to "%loop-item%"
    8.                 set {_t::*} to {_n} split at " "
    9.                 if {_t::2} is not set:
    10.                     add 1 to {_amount}
    11.                 else:
    12.                     set {_final} to {_t::1} parsed as an integer
    13.                     add {_final} to {_amount}
    14.         if {_amount} is bigger than 0:
    15.             remove all leather from player's inventory
    16.             add 25 to player's balance
    17.             send player title "&5You get" with subtitle "&a25$ Dolars" for 3 seconds
    18.         else:
    19.             message "{@Prefix} {@MsgPorros}"
     
    #1 St0medy, Dec 5, 2017
    Last edited: Dec 5, 2017
  2. Best Answer:
    Post #2 by Wrong, Dec 5, 2017
  3. Wrong

    Admin

    Joined:
    Jan 22, 2017
    Messages:
    47
    Likes Received:
    6
    Code (Skript):
    1. add 25*{_amount} to player's balance
    This?
     
  4. St0medy

    St0medy Member

    Joined:
    Nov 26, 2017
    Messages:
    18
    Likes Received:
    1
    Yea Thanks, and u know this

    That is to say that in the title the money that has sold

    Code (Skript):
    1. send player title "&5You get" with subtitle "&a25$ Dolars" for 3 seconds
     
  5. Wrong

    Admin

    Joined:
    Jan 22, 2017
    Messages:
    47
    Likes Received:
    6
    Code (Skript):
    1. send player title "&5You get" with subtitle "&a%25*{_amount}%$ Dolars" for 3 seconds
     
  6. St0medy

    St0medy Member

    Joined:
    Nov 26, 2017
    Messages:
    18
    Likes Received:
    1
    Thank you very much, you doubt resolved, I'll leave the post like this, in case someone who has the same doubts, can be of help

    Can you close the section?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...