Skip to content

Commit ad133c1

Browse files
authored
Create singlelinemulticonditional.sk
1 parent 1158a5e commit ad133c1

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import:
2+
ch.njol.skript.lang.Condition
3+
4+
condition <(.+)> (1:&&|2:\|\|) <(.+)>:
5+
check:
6+
set {_a} to first element of regex-1
7+
set {_b} to first element of regex-2
8+
set {_message} to "Can't understand this condition: "
9+
set {_bool1} to Condition.parse({_a}, "%{_message}%%{_a}%").check(event)
10+
set {_bool2} to Condition.parse({_b}, "%{_message}%%{_b}%").check(event)
11+
if parse mark is 1:
12+
if all:
13+
{_bool1} is true
14+
{_bool2} is true
15+
then:
16+
continue
17+
else:
18+
if any:
19+
{_bool1} is true
20+
{_bool2} is true
21+
then:
22+
continue
23+
24+
expression boolean value of condition <(.+)>:
25+
get:
26+
set {_b} to first element of regex-1
27+
set {_message} to "Can't understand this condition: "
28+
return Condition.parse({_b}, "%{_message}%%{_b}%").check(event)

0 commit comments

Comments
 (0)