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.

Custom Balance ATM

Discussion in 'Skript' started by Achterdochtig, Oct 14, 2021.

Tags:
  1. Achterdochtig

    Achterdochtig Member

    Joined:
    Sep 24, 2021
    Messages:
    4
    Likes Received:
    0
    Hi im making a custom ATM for a minecraft FiveM server where you can deposit money and take money. My problem is at the deposit, the money has a custom lore (&cOfficieel Minetopia bankbiljet!). I dont get any error when i reload the skript but it doesnt work.

    Code (Text):
    1. on inventory click:
    2.     if inventory name is "&3Selecteer het rekeningtype:":
    3.         if name of clicked item is "&cGeld storten":
    4.             set {_a} to (number of all ghast tear in player's inventory * 5000)
    5.             set {_b} to (number of all diamond in player's inventory * 2500)
    6.             set {_c} to (number of all redstone in player's inventory * 1000)
    7.             set {_d} to (number of all emerald in player's inventory * 500)
    8.             set {_e} to (number of all coal in player's inventory * 250)
    9.             set {_f} to (number of all iron ingot in player's inventory * 100)
    10.             set {_g} to (number of all quartz in player's inventory * 50)
    11.             set {_h} to (number of all gold ingot in player's inventory * 10)
    12.             set {_i} to (number of all gold nugget in player's inventory * 1)
    13.  
    14.             remove all ghast tear from player's inventory
    15.             remove all diamond from player's inventory
    16.             remove all redstone from player's inventory
    17.             remove all emerald from player's inventory
    18.             remove all coal from player's inventory
    19.             remove all iron ingot from player's inventory
    20.             remove all quartz from player's inventory
    21.             remove all gold ingot from player's inventory
    22.             remove all gold nugget from player's inventory
    23.  
    24.             set {_totaal} to ({_a} + {_b} + {_c} + {_d} + {_e} + {_f} + {_g} + {_h} + {_i})
    25.             add {_totaal} to player's balance
    26.             send "&3➡ Je hebt {totaal} gestort op je rekening."
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    597
    Likes Received:
    37
    Three solutions… Try:

    1)
    Code (Text):
    1. amount of all ...
    2)
    Code (Text):
    1. set {_a} to ghast tear named "xx" with lore "xx"
    2. ...
    3.  
    4. add {_a}*5000 to {_total}
    5. ....
    6.  
    7. remove every {_a} from player's inventory
    3) using loops
     

Share This Page

Loading...