Date: 2014/08/08 11:17:29 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
PlayerManuaddScriptDonator30D:
type: world
debug: false
events:
on add-donator command:
- if <context.server> == true {
- if <player.in_group[Dawnguard]> {
- flag p@<c.args.get[1]> oldrank:dawnguard
}
else if <player.in_group[ArchDuke]> {
- flag p@<c.args.get[1]> oldrank:ArchDuke
}
else if <player.in_group[King]> {
- flag p@<c.args.get[1]> oldrank:King
}
else if <player.in_group[Lord]> {
- flag p@<c.args.get[1]> oldrank:Lord
}
else if <player.in_group[Baron]> {
- flag p@<c.args.get[1]> oldrank:Baron
}
else if <player.in_group[Count]> {
- flag p@<c.args.get[1]> oldrank:Count
}
else if <player.in_group[Crusader]> {
- flag p@<c.args.get[1]> oldrank:Crusader
}
else if <player.in_group[Vanguard]> {
- flag p@<c.args.get[1]> oldrank:Vanguard
}
else if <player.in_group[Warden]> {
- flag p@<c.args.get[1]> oldrank:Warden
}
else if <player.in_group[Knight]> {
- flag p@<c.args.get[1]> oldrank:Knight
}
else if <player.in_group[Peasant]> {
- flag p@<c.args.get[1]> oldrank:Peasant
}
- if li@archduke|dawnguard|legend CONTAINS <c.args.get[2]> {
- if <player.flag[archduke]> == null {
- if <player.flag[dawnguard]> == null {
- if <player.flag[legend]> == null {
- flag p@<c.args.get[1]> rank:<c.args.get[2]>
- flag p@<c.args.get[1]> Peasant:!
- execute as_server "manuadd <c.args.get[1]> <c.args.get[2]>"
- define target <server.match_player[<c.args.get[1]>]>
- if %target% == null {
- narrate ""
- queue clear
}
}
}
}
}
}
else {
- narrate "<dark_red>You have insuffcient permissions to use this command."
}
- determine FULFILLED
on remove-donator command:
- if <context.server> == true {
- flag p@<c.args.get[1]> rank:!
- run s@RemoveDonatorCOmmandScript as:<c.args.get[1]>
- define target <server.match_player[<c.args.get[1]>]>
- if %target% == null {
- narrate ""
- queue clear
}
}
else {
- narrate "<dark_red>You have insuffcient permissions to use this command."
}
- determine FULFILLED
RemoveDonatorCOmmandScript:
type: task
debug: false
script:
- wait 5
- execute as_server "manuadd <player.name> <player.flag[oldrank]>"
- narrate "You have been demoted to your previous rank since your donator rank has expired."