-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
bounties.sk
58 lines (53 loc) · 1.78 KB
/
bounties.sk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
options:
currency: $
P: &6&lBOUNTY&7
on join:
if {bounty::%player's uuid%} is not set:
set {bounty::%player's uuid%} to 0
command /bounty [<text>] [<player>] [<integer>]:
trigger:
if arg-1 is "add":
if arg-2 is set:
if arg-3 is set:
if arg-3 > 0:
if executor's balance >= arg-3:
remove arg-3 from executor's balance
add arg-3 to {bounty::%arg-2's uuid%}
send "{@P} Added {@currency}&3%arg-3%&7 to &3%arg-2%&7's bounty."
else:
send "{@P} Invalid Amount. You do not have enough money."
else:
send "{@P} Invalid Amount. You can not use negatives."
else:
send "{@P} Invalid Syntax. &3/bounty add (player) (amount)&7."
else:
send "{@P} Invalid Syntax. &3/bounty add (player) (amount)&7."
else if arg-1 is "reset":
if player has permission "bounty.reset":
if arg-2 is set:
set {bounty::%arg-2's uuid%} to 0
send "{@P} Deleted &3%arg-2%&7's bounty."
else:
send "{@P} Invalid Syntax. &3/bounty reset (player)&7."
else:
send "{@P} Invalid permission. &3bounty.reset&7."
else if arg-1 is "check":
if arg-2 is set:
send "{@P} &3%arg-2%&7's bounty is currently {@currency}&3%{bounty::%arg-2's uuid%}%&7."
else:
send "{@P} Invalid Syntax. &3/bounty check (player)&7."
else:
send "{@P} Commands."
send ""
send "&7/bounty &3add (player) (amount)"
send "&7/bounty &3reset (player) &7&o(bounty.reset)"
send "&7/bounty &3check (player)"
send ""
on death:
if victim is a player:
if attacker is a player:
if {bounty::%victim's uuid%} > 0:
add {bounty::%victim's uuid%} to attacker's balance
broadcast "{@P} &3%attacker%&7 has claimed &3%victim%&7's bounty of {@currency}&3%{bounty::%victim's uuid%}%&7."
wait 3 ticks
set {bounty::%victim's uuid%} to 0