I am noob to skript, and i am trying to use list vars...
It seems to have error in the last part: if damaged block is in list variable,
cancel and do something..
Can you guys answer me please?
bad english ,,sorry
It seems to have error in the last part: if damaged block is in list variable,
cancel and do something..
Can you guys answer me please?
bad english ,,sorry
Code:
on block damage:
if block is red wool:
if {loc.nexus.red.hitbox::*} contain location of block:
cancel event
message "red nexus was attacked!"
else if block is blue wool:
if location of block is in {loc.nexus.blue.hitbox::*}:
cancel event
message "blue nexus was attacked!"
command /warset [<string>] [<string>] [<integer>]:
permission: iswar.setting
permission message: &c권한이 없습니다!
trigger:
if arg-1 is set:
if arg-2 is set:
if arg-1 is "nexus":
if arg-2 is "red":
message "&e레드팀의 넥서스를 설정합니다."
#set {warset.nexus.red.%player%} to true
set {loc.nexus.red} to target block's location
loop blocks in radius 2 around {loc.nexus.red}:
set loop-block to red wool
set {loc.nexus.red.hitbox::*} to loop-block's location
else if arg-2 is "blue":
message "&e블루팀의 넥서스를 설정합니다."
#set {warset.nexus.blue.%player%} to true
set {loc.nexus.blue} to target block's location
loop blocks in radius 2 around {loc.nexus.blue}:
set loop-block to blue wool
set {loc.nexus.blue.hitbox::*} to loop-block's location
else:
message "&c올바른 사용법: /warset nexus <red/blue>"
else if arg-1 is "tower":
if arg-3 < 3:
if arg-3 > 0:
if arg-2 is "red":
message "&e레드팀의 %arg-3%번 타워를 설정합니다."
#set {warset.tower.red.%arg-3%.%player%} to true
else if arg-2 is "blue":
message "&e블루팀의 %arg-3%번 타워를 설정합니다."
#set {warset.tower.blue.%arg-3%.%player%} to true
else:
message "&c타워는 1번부터 3번까지 설정할 수 있습니다."
else:
message "&c타워는 1번부터 3번까지 설정할 수 있습니다."
else:
if arg-1 is "reset":
if {warset.reset.confirm.%player%} is true:
clear {loc.nexus.red}
clear {loc.nexus.blue}
clear {loc.tower.red.1}
clear {loc.tower.blue.1}
clear {loc.tower.red.2}
clear {loc.tower.blue.2}
clear {loc.tower.red.3}
clear {loc.tower.blue.3}
clear {_warset.reset.confirm.%player%}
message "&a모든 변수가 초기화 되었습니다."
else:
message "&b확인을 위해, 다시 입력하세요."
set {warset.reset.confirm.%player%} to true