SimpleEconomy.sk

Created by JackTrowbridge

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.

#
#	JackTrowbridge(Jack Trowbridge#1348) © 2019
#	  			  SimpleEcomomy.sk
#

#	Help Command /simpleecomomy
#	Permissions: simpleecomomy.admin

options:
	
	prefix: &c&lEconomy&7

	currency: £

	permmessage: &c&lIncorrect permission!

	maxamount: 2000000000000 #2 Trillion

	#	ENABLED / DISABLED

	joinmessage: true # Messages the player when they join.

	othersbalance: true # If players can see other players balance.

#	DO NOT EDIT BELOW THIS LINE

on player join:
	if {database.ACCOUNT.balance::%player's uuid%} is not set:
		set {database.ACCOUNT.balance::%player's uuid%} to 0.00
	if {@joinmessage} is true:
		send " " to player
		send "&7This server is running &f&lSimple&c&lEconomy &8v0.1" to player
		send " " to player

command /balance [<offline player>]:
	executable by: players
	aliases: bal, cash, money
	trigger:
		if arg-1 is set:
			if {@othersbalance} is true:
				send "%arg-1%'s balance: &a{@currency}&f%{database.ACCOUNT.balance::%arg-1's uuid%}%" to player
				stop
			else:
				make player execute command "/balance"
		else:
			send "%player%'s balance: &a{@currency}&f%{database.ACCOUNT.balance::%player's uuid%}%" to player
			stop


command /economy [<offline player>] [<text>] [<number>]:
	executable by: console, players
	permission: simpleecomomy.admin
	permission message: {@permmessage}
	trigger:
		if arg-1 or arg-2 or arg-3 is not set:
			send "&cIncorrect usage! /economy (player) (set/add/remove) (amount)" to sender
			stop
		if arg-2 is "set":
			if arg-3<{@maxamount} and arg-3>-1:
				set {database.ACCOUNT.balance::%arg-1's uuid%} to arg-3
				send "{@prefix} %arg-1%'s balance is now &a{@currency}&f%{database.ACCOUNT.balance::%arg-1's uuid%}%" to sender
				stop
			else:
				send "&c&lERROR &7Amount is not in the parameters!" to sender
		if arg-2 is "add":
			if arg-3<{@maxamount} and arg-3>0:
				add arg-3 to {database.ACCOUNT.balance::%arg-1's uuid%}
				send "{@prefix} %arg-1%'s balance is now &a{@currency}&f%{database.ACCOUNT.balance::%arg-1's uuid%}%" to sender
				stop
			else:
				send "&c&lERROR &7Amount is not in the parameters!" to sender
		if arg-2 is "remove":
			if arg-3<{@maxamount} and arg-3>0:
				remove arg-3 from {database.ACCOUNT.balance::%arg-1's uuid%}
				send "{@prefix} %arg-1%'s balance is now &a{@currency}&f%{database.ACCOUNT.balance::%arg-1's uuid%}%" to sender
				stop
			else:
				send "&c&lERROR &7Amount is not in the parameters!" to sender

command /simpleecomomy:
	permission: simpleecomomy.admin
	permission message: {@permmessage}
	trigger:
		send " " to sender
		send "&f&lSimple &c&lEconomy &8(help)" to sender
		send "&7/economy &fSet/Add/Remove someones balance." to sender
		send "&7/balance &fMessages you someones/yourself balance." to sender
		send " " to sender