Skript Version: dev24b
Skript Author: bensku
Minecraft Version: 1.11
---
Full Code:
Errors on Reload:
Other Useful Info:
What I'm trying to achieve is to disable attacker from attacking players in region, if victim is member of region currently standing in. Members of the region should be able to attack outsiders to defend their region.
Troubleshooting:
Have you tried searching the docs?
Yes
Have you tried searching the forums?
Yes
What other methods have you tried to fix it?
Googling similar problems, trying to parse victim as player to variable first
Skript Author: bensku
Minecraft Version: 1.11
---
Full Code:
code_language.skript:
Options:
Prefix: &e&lprefix&6&l>
Res_defense_attacker: &ccannot attack member of res
Res_defense_victim: &ccannot be attacked in res
on damage:
victim is a player
victim is online
victim is the member of the region
attacker is not the victim
attacker is online
cancel event
if {res_defense_attacker.%attacker%} is not set:
message "{@Prefix} {@Res_defense_attacker}" to attacker
set {res_defense_attacker.%attacker%} to true
wait 5 seconds
delete {res_defense_attacker.%attacker%}
if {res_defense_victim.%victim%} is not set:
message "{@Prefix} {@Res_defense_victim}" to victim
set {res_defense_victim.%victim%} to true
wait 5 seconds
delete {res_defense_victim.%victim%}
Errors on Reload:
code_language.skript:
Can't compare an entity with 'the member of the region' (skript.sk, line 9: victim is the member of the region')
Other Useful Info:
What I'm trying to achieve is to disable attacker from attacking players in region, if victim is member of region currently standing in. Members of the region should be able to attack outsiders to defend their region.
Troubleshooting:
Have you tried searching the docs?
Yes
Have you tried searching the forums?
Yes
What other methods have you tried to fix it?
Googling similar problems, trying to parse victim as player to variable first