Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Changelog V1.0.1 By Enrico
- #
- # Bug Pencurian Kepala saat /vb stats - Fixed
- # Ceks Feature Added
- # Variable Optimize
- #
- #
- options:
- Prefix: &7[&6V-Bank&7]
- Logo: &6&lVirtual Bank
- # --- About --- #
- Author: &dYusrilTakeuchi
- Version: &dV1.0.1
- # --- Max Saldo Nasabah --- #
- MaxSaldo: 1000000
- # --- Permission --- #
- PermAdm: virtualbank.admin
- # --- Variable Page --- #
- variables:
- {vbsaldo::%player%} = 0
- # --- Command Page --- #
- command /virtualbank [<text>] [<integer>] [<offlineplayer>]:
- aliases: /vb
- trigger:
- if arg 1 is not set:
- message "&a//&a&m----------&7[ {@Logo} &7]&a&m----------&a\\"
- message "&a/vb withdraw <value> &7- &eMengambil uang dalam bank"
- message "&a/vb deposit <value> &7- &eMenabung uang kedalam bank"
- message "&a/vb transfer <value> <player> &7- &eMengirim uang ke player"
- message "&a/vb stats &7- &eMelihat jumlah saldo uang"
- message "&a/vb top &7- &eMelihat top nasabah"
- message "&a/vb ceks <value> &7- &eMembuat sebuah ceks"
- player has permission "{@PermAdm}":
- message "&a/vb give <value> <player> &7- &eMengirim saldo pada player"
- message " "
- message "&6Author&7: {@Author}"
- message "&6Version&7: {@Version}"
- if arg 1 is "help":
- message "&a//&a&m----------&7[ {@Logo} &7]&a&m----------&a\\"
- message "&a/vb withdraw <value> &7- &eMengambil uang dalam bank"
- message "&a/vb deposit <value> &7- &eMenabung uang kedalam bank"
- message "&a/vb transfer <value> <player> &7- &eMengirim uang ke player"
- message "&a/vb stats &7- &eMelihat jumlah saldo uang"
- message "&a/vb top &7- &eMelihat top nasabah"
- message "&a/vb ceks <value> &7- &eMembuat sebuah ceks"
- player has permission "{@PermAdm}":
- message "&a/vb give <value> <player> &7- &eMengirim saldo pada player"
- message " "
- message "&6Author&7: {@Author}"
- message "&6Version&7: {@Version}"
- # --- Withdraw Page --- #
- if arg 1 is "withdraw":
- if arg 2 is set:
- if {vbsaldo::%player%} is greater than 0:
- if arg-2 is less than or equal to {vbsaldo::%player%}:
- remove arg-2 from {vbsaldo::%player%}
- add arg-2 to player's account
- message "{@Prefix} &bBerhasil mengambil uang sebanyak &a$%arg 2%!"
- stop
- else:
- message "{@Prefix} &cJumlah saldo tidak cukup!"
- stop
- else:
- message "{@Prefix} &cJumlah saldo tidak cukup!"
- stop
- else:
- message "{@Prefix} &cMasukkan jumlah saldo!"
- stop
- # --- Deposit Page --- #
- if arg 1 is "deposit":
- if arg 2 is set:
- if {vbsaldo::%player%} is less than or equal to {@MaxSaldo}:
- if player's balance is greater than or equal to arg-2:
- add arg-2 to {vbsaldo::%player%}
- remove arg-2 from player's account
- message "{@Prefix} &bBerhasil menabung uang sebanyak &a$%arg 2%!"
- stop
- message "{@Prefix} &cJumlah uang tidak cukup untuk mengisi saldo!"
- else:
- message "{@Prefix} &cJumlah saldo telah mencapai maksimum!"
- stop
- else:
- message "{@Prefix} &cMasukkan jumlah saldo!"
- stop
- # --- Transfer Page --- #
- if arg 1 is "transfer":
- if arg 2 is set:
- if arg 3 is online:
- if arg-2 is less than or equal to {vbsaldo::%player%}:
- add arg-2 to {vbsaldo::%arg 3%}
- remove arg-2 from {vbsaldo::%player%}
- message "{@Prefix} &bBerhasil transfer saldo sebanyak &a$%arg 2%!"
- message "{@Prefix} &bKamu telah mendapatkan saldo sebesar &a$%arg 2% &bdari %player%" to arg-3
- stop
- else:
- message "{@Prefix} &cJumlah saldo tidak cukup!"
- stop
- else:
- message "{@Prefix} &cPlayer tidak online!"
- stop
- else:
- message "{@Prefix} &cMasukkan jumlah saldo!"
- if arg 1 is "give":
- if arg 2 is set:
- if arg 3 is online:
- player has permission "{@PermAdm}":
- add arg-2 to {vbsaldo::%arg 3%}
- message "{@Prefix} &bBerhasil transfer saldo sebanyak &a$%arg 2%!"
- message "{@Prefix} &bKamu telah mendapatkan saldo sebesar &a$%arg 2% &bdari %player%" to arg-3
- stop
- else:
- message "{@Prefix} &cKamu tidak punya izin!"
- stop
- else:
- message "{@Prefix} &cPlayer tidak online!"
- stop
- else:
- message "{@Prefix} &cMasukkan jumlah saldo!"
- if arg 1 is "top":
- set {_Topstats::*} to sorted {vbsaldo::*} from highest to lowest with output "&d@index &aSaldo&7: &c@value"
- message "&a//&a&m----------&7[ &a&lTop Nasabah &7]&a&m----------&a\\"
- if {_Topstats::1} is set:
- send "&a1. %{_Topstats::1}%"
- if {_Topstats::2} is set:
- send "&a2. %{_Topstats::2}%"
- if {_Topstats::3} is set:
- send "&a3. %{_Topstats::3}%"
- if {_Topstats::4} is set:
- send "&a4. %{_Topstats::4}%"
- if {_Topstats::5} is set:
- send "&a5. %{_Topstats::5}%"
- if {_Topstats::6} is set:
- send "&a6. %{_Topstats::6}%"
- if {_Topstats::7} is set:
- send "&a7. %{_Topstats::7}%"
- if {_Topstats::8} is set:
- send "&a8. %{_Topstats::8}%"
- if {_Topstats::9} is set:
- send "&a9. %{_Topstats::9}%"
- if {_Topstats::10} is set:
- send "&a10. %{_Topstats::10}%"
- if arg 1 is "stats":
- wait 5 tick
- open chest with 1 rows named "&6-Bank Stats-" to player
- format slot 0 of player with player's skull named "&a&m----------&7[ Status Nasabah &7]&a&m----------" with lore " ||&3Name&7: &6%player%||&3Saldo&7: &a$%{vbsaldo::%player%}%" to close then run "sudo %player% vb stats"
- if arg 1 is "Ceks":
- set {_nominal} to arg 2
- set {_rumus} to arg 2 + (arg 2 * 0.1)
- if player's balance is more than {_rumus}:
- give paper named "&f&lCEK &bBank&r &7[&6%{_nominal}%&7]" with lore "&6> &fCek Balance||&6> &fNominal: %{_nominal}%||&6> &fCommand /cairkan||&6> &fUntuk Menambahkan ke akun Bankmu||" to player
- subtract {_rumus} from player's balance
- send "&7[&fCeks&7]&fKamu Menulis Ceks Dengan Nominal %arg 2%"
- send "&7[&fCeks&7]&fUangmu Berkurang %{_rumus}% sebagai Biaya"
- if player's balance is equal to {_rumus}:
- send "&7[&fCeks&7]&fSetidaknya uangmu harus tersisa 1"
- if player's balance is less than {_rumus}:
- send "&7[&fCeks&7]&fUangmu tidak cukup"
- send "&7[&fCeks&7]&fKamu Membutuhkan %{_rumus}%"
- send "&7[&fCeks&7]&fSedangkan uangmu hanya %player's balance%"
- command /cairkan:
- trigger:
- if player tool is paper:
- if name of player's tool contains "BALANCE":
- if lore of player's tool is set:
- set {_lore::*} to lore of player's tool split at "||"
- set {_nominal} to uncolored {_lore::2}
- replace all "> Nominal: " with "" in {_nominal}
- set {_akhir} to {_nominal} parsed as number
- remove 1 of tool from tool
- wait 1 tick
- add {_akhir} to player's balance
- send "&7[&fCeks&7]&fSaldo Bank mu bertambah &l%{_akhir}%"
- send "&7[&fCeks&7]&fSaldo Bank mu menjadi &l%{vbsaldo::%player%}%"
- stop
- on inventory close:
- loop items in player's inventory:
- if name of loop-item is "&a&m----------&7[ Status Nasabah &7]&a&m----------":
- remove loop-item from player
Add Comment
Please, Sign In to add comment