Date: 2015/03/14 12:35:50 UTC-07:00
Type: Denizen Script
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
CuboiderMenu:
type: world
events:
on cuboider command:
- narrate ""
- if <context.args.get[1]> == null {
- narrate "<yellow>Cuboider od Maweja"
- narrate "<white> Cuboider je system na pridavanie regionov (cuboidov), a nasledne pridavania akcie pri vstupe"
- narrate "<yellow> Prikazy<&co>"
- narrate "<red> /cu p1<&pipe>2 <white> - oznaci 1/2 bod cuboidu, na zaklade polohy"
- narrate "<red> /cu vytvorit nazov<white> - vytvori cuboid na zaklade bodov"
- narrate "<red> /cu akcia nazov_cuboidu nazov_akcie hodnota_akcie"
- narrate "<dark_gray> Dostupne akcie<&co> title, subtitle"
- narrate "<red> /cu vymazat nazov<white> - vymaze cuboid"
- narrate "<red> /cu zoznam <white> - vypise zoznam cuboidov"
}
else if <context.args.get[1]> == p1 {
- flag Cuboider_p1:<player.location.simple>
- narrate "Prva pozicia nastavena na <player.flag[Cuboider_p1]>"
}
else if <context.args.get[1]> == p2 {
- flag Cuboider_p2:<player.location.simple>
- narrate "Druha pozicia nastavena na <player.flag[Cuboider_p2]>"
}
else if <context.args.get[1]> == vytvorit {
- if <player.has_flag[Cuboider_p1]> && <player.has_flag[Cuboider_p2]> {
- if <context.args.get[2]> != null {
- note cu@<player.flag[Cuboider_p1]>|<player.flag[Cuboider_p2]> as:<context.args.get[2]>
- yaml set Cuboidy.<player.world.replace[w@]>.<context.args.get[2]>.pozicia:<player.flag[Cuboider_p1]>|<player.flag[Cuboider_p2]> id:cuboider
- yaml set Cuboidy.<player.world.replace[w@]>.<context.args.get[2]>.akcia.title:xxx id:cuboider
- yaml set Cuboidy.<player.world.replace[w@]>.<context.args.get[2]>.akcia.subtitle:xxx id:cuboider
- flag Cuboider_p1:!
- flag Cuboider_p2:!
- narrate "<yellow>Region <c.args.get[2]> vytvoreny"
} else {
- narrate "<red>Prosim upresni nazov cuboidu"
}
} else {
- narrate "<red>Pred vytvorenim cuboidu najprv definuj body (/cu)"
}
}
else if <context.args.get[1]> == akcia {
- if <c.args.get[2]> != null {
- if <c.args.get[3]> != null {
- if <c.args.get[4]> != null {
- yaml set 'Cuboidy.<player.world.replace[w@]>.<c.args.get[2]>.akcia.<c.args.get[3]>:<c.args.get[4].to[20].replace[li@].replace[|].with[ ]>' id:Cuboider
- narrate "<yellow>Hodnota uspesne nastavena!"
} else {
- narrate "<red>Prosim upresni hodnotu akcie"
}
} else {
- narrate "<red>Prosim upresni nazov akcie"
}
} else {
- narrate "<yellow>Prosim upresni nazov cuboidu"
}
}
else if <c.args.get[1]> == zoznam {
- if <context.args.get[2]> == null {
- narrate "<yellow>Prosim upresni svet <white>(<yaml[cuboider].list_keys[Cuboidy].formatted.replace[and].with[a]>)"
- narrate "<red>/cu zoznam svet"
} else if <yaml[cuboider].contains[Cuboidy.<context.args.get[2]>]> {
- narrate "Zoznam cuboidov pre <c.args.get[2]>: <yellow><yaml[cuboider].list_keys[Cuboidy.<c.args.get[2]>].formatted.replace[and].with[a]>"
- narrate ""
- narrate "<dark_gray>Kompletny zaznam: <yaml[cuboider].read[Cuboidy.<c.args.get[2]>]>"
} else narrate "<yellow>Taky svet sa nenachadza v databazi"
}
else if <c.args.get[1]> == vymazat {
- if <c.args.get[2]> == null narrate "<yellow>Prosim upresni cuboid"
else {
- yaml set Cuboidy.<player.world.replace[w@]>.<c.args.get[2]>:! id:cuboider
- note remove as:<c.args.get[2]>
- narrate "<yellow>Cuboid <c.args.get[2]> vymazany"
}
}
}
else {
- narrate "<yellow>Zly prikaz. Pre zoznam prikazov napis /cu"
}
- determine fulfilled