View difference between Paste ID: RziE6FAZ and TFWis28L
SHOW: | | - or go back to the newest paste.
1
on join:
2
	set {pvp.%player%} to 0
3-
3+
 
4
on damage:
5
	if attacker has permission "pvp.bypass":
6
		if {pvp.%victim%} is 0:
7
			if {pvp.%attacker%} is 0:
8
	 			stop			
9
	else:
10
		if {pvp.%victim%} is 0:
11
			if {pvp.%attacker%} is 0:
12
				set {pvp.%victim%} to 1
13
				set {pvp.%attacker%} to 1
14
				send "&cVoce entrou em combate com &c&l%victim%" to attacker
15
				send "&cVoce entrou em combate com &c&l%attacker%" to victim			
16
				wait 10 seconds
17
				send "&cVoce saiu de combate com &c&l%victim%" to attacker
18
				send "&cVoce saiu de combate com &c&l%attacker%" to victim
19
				set {pvp.%victim%} to 0
20
				set {pvp.%attacker%} to 0
21
on quit:
22
	if {pvp.%player%} is 1:
23
		kick player due to "&cBanido por fugir em pvp"
24
		broadcast "&c&l%player%&c levou ban por fugir em pvp por 1 minutp"		
25
		set {bantemp.%player%} to 1
26
		set {bantemp.agora.%player%} to now
27
on join:
28
	if {bantemp.%player%} is set:
29
		set {_tempban} to  difference between now and {bantemp.agora.%player%}
30
		reduce {_tempban} by  {bantemp.%player%}
31
		if difference between now and {bantemp.agora.%player%} is bigger than {bantemp.%player%}:
32
			stop
33
			clear {bantemp.%player%}
34
			clear {bantemp.agora.%player%}
35
		if difference between now and {bantemp.agora.%player%} is smaller than {bantemp.%player%}:
36
			wait 1 second
37
			kick player because "&c&lVoce esta banido por fugir em pvp por 1 minutp"