Hey y'all,
I made a ATM system and I want it to refresh it every time you add a amount of money.
Can someone help me with this please?
I use Skript and SkQuery.
Information below
Skript Version: Skript 2.2-dev36
Minecraft Version: 1.12.2
---
[doublepost=1563983655,1563975350][/doublepost]Can someone help?
Please?
I made a ATM system and I want it to refresh it every time you add a amount of money.
Can someone help me with this please?
I use Skript and SkQuery.
Information below
Skript Version: Skript 2.2-dev36
Minecraft Version: 1.12.2
---
Code:
command /deposit:
trigger:
open chest with 3 rows named "&cDeposit" to player
wait 2 ticks
format slot 13 of player with 1 paper named "&cAccept" with lore "&8%{num_of_clicks::%player%}% ||" to close then run [make player execute "acceptatm"]
set slot 9 of current inventory of player to 1 green glass named "&2+100$"
set slot 10 of current inventory of player to 1 green glass named "&2+10$"
set slot 11 of current inventory of player to 1 green glass named "&2+1$"
set slot 15 of current inventory of player to 1 green glass named "&4-1$"
set slot 16 of current inventory of player to 1 green glass named "&4-10$"
set slot 17 of current inventory of player to 1 green glass named "&4-100$"
on inventory click:
if inventory name of current inventory of player is "&cDeposit":
if name of clicked item is "&2+1$":
add 1 to {num_of_clicks::%player%}
cancel event
on inventory click:
if inventory name of current inventory of player is "&cDeposit":
if name of clicked item is "&2+10$":
add 10 to {num_of_clicks::%player%}
cancel event
on inventory click:
if inventory name of current inventory of player is "&cDeposit":
if name of clicked item is "&2+100$":
add 100 to {num_of_clicks::%player%}
cancel event
on inventory click:
if inventory name of current inventory of player is "&cDeposit":
if name of clicked item is "&4-1$":
if {num_of_clicks::%player%} is greater than or equal to 1:
remove 1 from {num_of_clicks::%player%}
cancel event
else if {num_of_clicks::%player%} is smaller than 1:
set {num_of_clicks::%player%} to 0
cancel event
on inventory click:
if inventory name of current inventory of player is "&cDeposit":
if name of clicked item is "&4-10$":
if {num_of_clicks::%player%} is greater than or equal to 10:
remove 10 from {num_of_clicks::%player%}
cancel event
else if {num_of_clicks::%player%} is smaller than 10:
set {num_of_clicks::%player%} to 0
cancel event
on inventory click:
if inventory name of current inventory of player is "&cDeposit":
if name of clicked item is "&4-100$":
if {num_of_clicks::%player%} is greater than or equal to 100:
remove 100 from {num_of_clicks::%player%}
cancel event
else if {num_of_clicks::%player%} is smaller than 100:
set {num_of_clicks::%player%} to 0
cancel event
Please?