EcoBounty.sk

Created by WolfyGameYT

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.

#
# EcoBounty - made by WolfyGameYT
#



options:
	prefix: &6&lEcoBounty &e&l»
	pm: &6&lEcoBounty &e&l» &4You can't do that!
	
	startingbal: 0 #Change the amount of money people start with here!
	
# -+-/ Permissions \-+-
# - ecobounty.balance | /balance (shows player's balance)
# - ecobounty.admin | /ecobounty (admin commands such as setting a player's balance to $754565)
# - ecobounty.pay | /pay (pays money to other players)
# - ecobounty.bounty | /bounty (check or add to someone's bounty)

# ------------------------------------------------------------------------------------
  
on join:
	if {bal::%player's uuid%} is not set:
		set {bal::%player's uuid%} to {@startingbal}
	if {bounty::%player's uuid%} is not set:
		set {bounty::%player's uuid%} to 0

every second:
	loop all players:
		if {bal::%loop-player's uuid%} < 0:
			set {bal::%loop-player's uuid%} to 0
		if {bounty::%loop-player's uuid%} < 0:
			set {bounty::%loop-player's uuid%} to 0	
			
command /balance [<offline player>]:
	usage: {@prefix} &cUsage: /balance <player>
	aliases: /bal
	permission: ecobounty.balance
	permission message: {@pm}
	trigger:
		if arg-1 is not set:
			send "{@prefix} &7%player%&7's Balance: &8$%{bal::%player's uuid%}%"
		if arg-1 is set:
			send "{@prefix} &7%arg-1%&7's Balance: &8$%{bal::%arg-1's uuid%}%"
			
command /ecobounty <text> <text> <player> <number>:
	usage: {@prefix} &cUsage: /ecobounty <balance/bounty> <set/add/remove> <player> <amount>
	permission: ecobounty.admin
	permission message: {@pm}
	trigger:
		if arg-1 is not "balance" or "bounty":
			send "{@prefix} &cPlease put &c&lbalance &cor &c&lbounty &conly!"
		if arg-1 is "balance":
			if arg-4 is set:
				if arg-3 is set:
					if arg-2 is not "set" or "add" or "remove":
						send "{@prefix} &cPlease put &c&lset&c, &c&ladd&c, or &c&lremove &conly!"
			if arg-2 is "set":
				if arg-3 is set:
					if arg-4 < 0:
						send "{@prefix} &cYou can't set the player's money lower then $0!"
					if arg-4 >= 0:
						set {bal::%arg-3's uuid%} to arg-4
						send "{@prefix} &8%player% &7set you're balance to &8$%arg-4%" to arg-3
						send "{@prefix} &7You set &8%arg-3%&8&8's &7balance to &8$%arg-4%" to player
			if arg-2 is "add":
				if arg-3 is set:
					if arg-4 is set:
						add arg-4 to {bal::%arg-3's uuid%}
						send "{@prefix} &8%player% &7added &8$%arg-4% &7to you're balance" to arg-3
						send "{@prefix} &7You added &8$%arg-4% &7to &8%arg-3%&8's &7balance" to player
			if arg-2 is "remove":
				if arg-3 is set:
					if arg-3 is set:
						if {bal::%arg-3's uuid%} <= 0:
							send "{@prefix} &cYou can't remove money from a player with no money!"
						else:
							subtract arg-4 from {bal::%arg-3's uuid%}
							send "{@prefix} &8%player% &7removed &8$%arg-4% &7from you're balance" to arg-3
							send "{@prefix} &7You removed &8$%arg-4% &7from &8%arg-3%&8's balance" to player
		if arg-1 is "bounty":
			if arg-2 is not "set" or "add" or "remove":
				send "{@prefix} &cPlease put &c&lset&c, &c&ladd&c, or &c&lremove &conly!"
			if arg-2 is not set:
				if arg-3 is not set:
					if arg-4 is not set:
						send "{@prefix} &cUsage: /ecobounty <balance/bounty> <set/add/remove> <player> <amount>"	
			if arg-2 is "set":
				if arg-3 is set:
					if arg-4 < 0:
						send "{@prefix} &cYou can't set the player's bounty lower then $0!"		
					if arg-4 >= 0:
						set {bounty::%arg-3's uuid%} to arg-4
						send "{@prefix} &8%player% &7set you're bounty to &8$%arg-4%" to arg-3
						send "{@prefix} &7You set &8%arg-3%&8&8's &7bounty to &8$%arg-4%" to player
			if arg-2 is "add":
				if arg-3 is set:
					if arg-4 is set:
						add arg-4 to {bounty::%arg-3's uuid%}
						send "{@prefix} &8%player% &7added &8$%arg-4% &7to you're bounty" to arg-3
						send "{@prefix} &7You added &8$%arg-4% &7to &8%arg-3%&8's &7bounty" to player	
			if arg-2 is "remove":
				if arg-3 is set:
					if arg-3 is set:
						if {bounty::%arg-3's uuid%} <= 0:
							send "{@prefix} &cYou can't remove money from a player with no bounty!"
						else:
							subtract arg-4 from {bounty::%arg-3's uuid%}
							send "{@prefix} &8%player% &7removed &8$%arg-4% &7from you're bounty" to arg-3
							send "{@prefix} &7You removed &8$%arg-4% &7from &8%arg-3%&8's bounty" to player			
						
					
command /pay <player> <number>:
	usage: {@prefix} &cUsage: /pay <player> <amount>
	permission: ecobounty.pay
	permission message: {@pm}
	trigger:
		if arg-1 is set:
			if arg-2 is set:
				if arg-1 is not player:
					if {bal::%player's uuid%} <= 0:
						send "{@prefix} &cYou don't have enough money!"
					if {bal::%player's uuid%} >= arg-2:	
						subtract arg-2 from {bal::%player's uuid%}
						send "{@prefix} &8%arg-1% &7paid you &8$%arg-2%" to arg-1
						send "{@prefix} &7You paid &8$%arg-2% &7to &8%arg-1%" to player
				if arg-1 is player:
					send "{@prefix} &cYou can't pay yourself!"

command /bounty <player> [<number>]:
	usage: {@prefix} &cUsage: /bounty <player> <amount>
	permission: ecobounty.bounty
	permission message: {@pm}
	trigger:
		if arg-1 is set:
			if arg-2 is set:
				if arg-1 is not player:
					if {bal::%player's uuid%} < arg-2:
						send "{@prefix} &cYou don't have enough money to bounty %arg-2% &c$%arg-1%"
					else if {bal::%player's uuid%} >= arg-2:
						subtract arg-2 from {bal::%player's uuid%}
						add arg-2 to {bounty::%arg-1's uuid%}
						broadcast "{@prefix} &8%arg-1% &7was just bountied &8$%arg-2% &7by &8%player%&7!"
				else if arg-1 is player:
					send "{@prefix} &cYou can't bounty yourself!"
		if arg-1 is set:
			if arg-2 is not set:
				send "{@prefix} &8%arg-1%&7's bounty is &8$%{bounty::%arg-1's uuid%}%"

on death:
	if victim is a player:
		if attacker is a player:
			if victim is not attacker:
				if {bounty::%victim's uuid%} > 0:
					add {bounty::%victim's uuid%} to {bal::%attacker's uuid%}
					broadcast "{@prefix} &8%attacker% &7got &8%victim%&7's bounty of &8%{bounty::%victim's uuid%}%&7!"
					wait 4 ticks
					set {bounty::%victim's uuid%} to 0
					
					
# This is here to set the amount of lines to 160 :D - WolfyGameYT (creator of this script)