Other available versions. Ordered by newest to oldest versions:
Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.
#MoneyBank Skript v0.2c
#By MakLo1337
options:
prefix: &8[&6&lBank&8] #<-----Edit this to change prefix
noperm: &cYo! , You don't have permission to do this!
version: v0.1
moneysymbol: $ #<-----Edit this to change money symbol
#DON'T EDIT THIS FUNCTION BELOW UNLESS YOU HAVE KNOWLEDGE TO DO IT !
function createMoneyBank(p:player):
if {bank.%{_p}%} is set:
message "&7&l--------&8&l[&3%{_p}%&8&l]&7&l--------" to {_p}
message "&9Account Balance &8: &6{@moneysymbol}&a%{bank.balance.%{_p}%}%" to {_p}
message "&7&l---------{@prefix}&7&l---------" to {_p}
else:
message "{@prefix} &aWelcome to bank feature!" to {_p}
wait 2 second
message "{@prefix} &aWe're preparing your bank account, please wait...!" to {_p}
wait 2 second
set {bank.%{_p}%} to 1
set {bank.balance.%{_p}%} to 0
message "{@prefix} &aYour bank account is created, please do &b/bank &ato check it !" to {_p}
stop
function depositMoneyBank(p:player,m:number):
if {bank.%{_p}%} is not set:
createMoneyBank({_p})
else:
add {_m} to {_amount}
set {%{_p}%.balance} to 0
add {_p}'s balance to {%{_p}%.balance}
if {_amount} <= {%{_p}%.balance}:
add {_amount} to {bank.balance.%{_p}%}
subtract {_amount} from {_p}'s balance
message "{@prefix} &aSuccessfully deposited &6{@moneysymbol}&a%{_amount}% &ato bank account!" to {_p}
else:
message "{@prefix} &cInsufficient money to deposit!" to {_p}
stop
function withdrawMoneyBank(p:player,m:number):
if {bank.%{_p}%} is not set:
createMoneyBank({_p})
else:
add {_m} to {_amount}
if {_amount} <= {bank.balance.%{_p}%}:
subtract {_amount} from {bank.balance.%{_p}%}
add {_amount} to {_p}'s balance
message "{@prefix} &aSuccessfully withdrawn &6{@moneysymbol}&a%{_amount}% &afrom bank account!" to {_p}
else:
message "{@prefix} &cInsufficient bank balance to withdrawn!" to {_p}
stop
function depoallMoneyBank(p:player):
if {bank.%{_p}%} is not set:
createMoneyBank({_p})
else:
set {%{_p}%.balance} to 0
add {_p}'s balance to {%{_p}%.balance}
add {%{_p}%.balance} to {_total}
if {_total} <= 0:
message "{@prefix} &cInsufficient money to deposit!" to {_p}
stop
else:
set {_dall::*} to split "%{%{_p}%.balance}%" by "$"
set {_dall} to "%{_dall::1}%" parsed as num
add {_dall} to {bank.balance.%{_p}%}
subtract {%{_p}%.balance} from {_p}'s balance
message "{@prefix} &aSuccessfully deposited &6{@moneysymbol}&a%{_dall}% &ato bank account!" to {_p}
stop
function takeallMoneyBank(p:player):
if {bank.%{_p}%} is not set:
createMoneyBank({_p})
else:
if {bank.balance.%{_p}%} <= 0:
message "{@prefix} &cInsufficient bank balance to withdrawn!" to {_p}
else:
set {_tall} to {bank.balance.%{_p}%}
subtract {_tall} from {bank.balance.%{_p}%}
add {_tall} to {_p}'s balance
message "{@prefix} &aSuccessfully withdrawn &6{@moneysymbol}&a%{_tall}% &afrom bank account!" to {_p}
stop
command /bank [<text>] [<number>]:
usage: Unknown bank command or false usage, please do "/bank help"
permission: bank.player
permission message: {@noperm}
trigger:
arg-1 is not set:
arg-2 is not set:
createMoneyBank(player)
stop
arg-1 is "deposit":
arg-2 is not set:
send "{@prefix} &cPlease enter your deposit amount !"
else:
set {_arg2} to arg-2
depositMoneyBank(player,{_arg2})
arg-1 is "depoall":
arg-2 is not set:
depoallMoneyBank(player)
else:
depoallMoneyBank(player)
arg-1 is "withdraw":
arg-2 is not set:
send "{@prefix} &cPlease enter your withdraw amount !"
else:
set {_arg2} to arg-2
withdrawMoneyBank(player,{_arg2})
arg-1 is "takeall":
arg-2 is not set:
takeallMoneyBank(player)
else:
takeallMoneyBank(player)
arg-1 is "help":
message "&7&l---------{@prefix}&7&l---------"
message "&3/bank help : &8To see all bank commands"
message "&3/bank deposit <amount> : &8To deposit money to your bank account"
message "&3/bank depoall : &8To deposit all of your money to your bank account"
message "&3/bank withdraw <amount> : &8To withdrawn money from your bank account"
message "&3/bank takeall : &8To withdrawn all of your money from your bank account"
stop
command /bankreset [<text>]:
permission: bank.admin
permission message: {@noperm}
trigger:
arg-1 is not set:
send "{@prefix} &cEnter player name to reset his/her bank !"
else:
set {bank.balance.%arg-1%} to 0
send "{@prefix} &4Successfully reseting %arg-1% bank account !"
stop