Date: 2018/01/08 13:38:27 UTC-08: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
announcer:
type: world
debug: true
events:
on server start:
- yaml "load:/dAnnounce/Server_Announcements.yml" id:Server_Announcements
on server shutdown:
- yaml "savefile:/dAnnounce/Server_Announcements.yml" id:Server_Announcements
on reload scripts:
# - yaml "savefile:/dAnnounce/Server_Announcements.yml" id:Server_Announcements
- yaml "load:/dAnnounce/Server_Announcements.yml" id:Server_Announcements
on ann command:
- determine passively fulfilled
# - random 1:
# # - announce format:sAnnounce "<&5>Test Message"
# # - announce format:sAnnounce "<&5>Have a Question? Stuck in a hole? use <&d>/helpop to request assistance from staff"
# # - announce format:sAnnounce "<&5>Thanks for playing Exodus Realms :)"
# # - announce format:sAnnounce "<&5>Staff Applications can be submited by clicking <&d><&l>Here"
# # - announce format:sAnnounce "<&5>Join our Public <&d><&l>Discord Server"
# # - announce format:sAnnounce "<&5>Vote on our website for Crate Keys - <&d><&l>http://www.exodusrealms.com"
# # - announce format:sAnnounce "<&5>Consider donating for special perks, like Mobile Banking, Custom Warps & Much More!"
# # - announce format:sAnnounce "<&d><&l>LockPicking - <&5> Use an Iron Ingot on chests to unlock & loot in enemy faction territory (5% Chance)"
# # - announce format:sAnnounce "<&5>Dont forget to claim your Daily Reward!"
# # - announce format:sAnnounce "<&5>Want Free Loot?! Use <&d><&l>/cstorage <&5>command to discard or take other players unwanted items in Community Chests"
# # - announce format:sAnnounce "<&5>Use your Player Handbook or <&d><&l>/attributes<&5> command to add points to your class specific traits"
- define num 1
- while <yaml[Server_Announcements].list_deep_keys[Announcements].contains[<def[num]>]> {
- wait 1t
- define num <def[num].add[1]>
}
- choose <c.args.get[1].parse_color[]||<c.args.get[1]>>:
- case 'null':
- ^announce format:sAnnounce "<yaml[Server_Announcements].read[<yaml[Server_Announcements].list_deep_keys[].exclude[Announcements].get[<util.random.int[0].to[<def[num]>]>]>]>"
# - case 'remove':
# - define id 1
# - narrate "<&8>==== <&7>Server Announcements <&8>===="
# - foreach <yaml[Server_Announcements].list_deep_keys[].exclude[Announcements]> {
# - narrate "<proc[msgCommand].context[<&4>X| true|<&3>Click to Remove Annoucement <yaml[Server_Announcements].read[<yaml[Server_Announcements].list_deep_keys[].exclude[Announcements].get[<def[id]>]>]>"
# - define id <def[id].add[1]>
# }
- case 'new':
- if <c.args.get[2].is[==].to[null]||true> queue clear
- narrate <def[num]>
- yaml "savefile:/dAnnounce/Server_Announcements.yml" id:Server_Announcements
- if <yaml[Server_Announcements].contains[<c.args.get[2]>].not||false> {
- ^yaml id:Server_Announcements set Announcements.<def[num]>:<c.args.get[2].parse_color>
- ^yaml "savefile:/dAnnounce/Server_Announcements.yml" id:Server_Announcements
- narrate "<&a>Added: <c.args.get[2].parse_color> <&a>to the list of announcements.
}
- default:
- define annlist li@
- foreach <yaml[Server_Announcements].list_keys[Announcements]||null> {
- define annlist "<def[annlist].include[<yaml[Server_Announcements].read[Announcements.<def[value]>]>]>"
}
- narrate format:sAnnounce "<def[annlist].get[<def[annlist].find_partial[<c.args.get[1]||null>]>]||null>"
sAnnounce:
type: format
debug: false
format: <&6><&l>[<&9>Tip<&6><&l>] <text>