Skip to content

Commit 6da8fd7

Browse files
committed
Fix broken links and some formatting issues in customization/war of emperium
This is made in a best-effort approach, so not everything is perfectly formatted nor reviewed. But no more errors in mkdocs build, which should mean that at least all links are now functional.
1 parent 13bfbbf commit 6da8fd7

File tree

1 file changed

+96
-92
lines changed

1 file changed

+96
-92
lines changed

docs/customization/war-of-emperium.md

Lines changed: 96 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -5,129 +5,133 @@ are not accessible to people who are not in the residing guild.
55
## agit_controller.txt
66

77
Open
8-
\[\`npc/guild/agit_controller.txt\`\](https://github.com/HerculesWS/Hercules/blob/stable/npc/guild/agit_controller.txt)
8+
[`npc/guild/agit_controller.txt`](https://github.com/HerculesWS/Hercules/blob/stable/npc/guild/agit_controller.txt)
99
The body of the script should look similar to the following:
1010

11-
`- script Agit_Event -1,{`
12-
` end;`
13-
14-
[`OnClock`](OnClock "wikilink")`2100: //start time for Tues(2), Thurs(4)`
15-
[`OnClock`](OnClock "wikilink")`2300: //end time for Tues(2), Thurs(4)`
16-
[`OnClock`](OnClock "wikilink")`1600: //start time for Sat(6)`
17-
[`OnClock`](OnClock "wikilink")`1800: //end time for Sat(6)`
18-
19-
`OnAgitInit:`
20-
` // starting time checks`
21-
` `[`if`](if "wikilink")`((`[`gettime`](gettime "wikilink")`(4)==2) && (`[`gettime`](gettime "wikilink")`(3)>=21 && `[`gettime`](gettime "wikilink")`(3)<23) ||`
22-
`    (`[`gettime`](gettime "wikilink")`(4)==4) && (`[`gettime`](gettime "wikilink")`(3)>=21 && `[`gettime`](gettime "wikilink")`(3)<23) ||`
23-
`    (`[`gettime`](gettime "wikilink")`(4)==6) && (`[`gettime`](gettime "wikilink")`(3)>=16 && `[`gettime`](gettime "wikilink")`(3)<18)) {`
24-
`  `[`if`](if "wikilink")` (!`[`agitcheck`](agitcheck "wikilink")`()) {`
25-
`   `[`agitstart`](agitstart "wikilink")`;`
26-
`   `[`callsub`](callsub "wikilink")` S_DisplayOwners;`
27-
`  }`
28-
`  `[`end`](end "wikilink")`;`
29-
` }`
30-
31-
` // end time checks`
32-
` `[`if`](if "wikilink")` ((`[`gettime`](gettime "wikilink")`(4)==2) && (`[`gettime`](gettime "wikilink")`(3)==23) ||`
33-
`     (`[`gettime`](gettime "wikilink")`(4)==4) && (`[`gettime`](gettime "wikilink")`(3)==23) ||`
34-
`     (`[`gettime`](gettime "wikilink")`(4)==6) && (`[`gettime`](gettime "wikilink")`(3)==18)) { `
35-
`  `[`if`](if "wikilink")` (`[`agitcheck`](agitcheck "wikilink")`()) {`
36-
`   `[`agitend`](agitend "wikilink")`;`
37-
`   `[`callsub`](callsub "wikilink")` S_DisplayOwners;`
38-
`  }`
39-
`  `[`end`](end "wikilink")`;`
40-
` }`
41-
` `[`end`](end "wikilink")`;`
42-
43-
`S_DisplayOwners:`
44-
` `[`setarray`](setarray "wikilink")` .@maps$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05";`
45-
` `[`setarray`](setarray "wikilink")` .@maps$[5],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05";`
46-
` `[`setarray`](setarray "wikilink")` .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05";`
47-
` `[`setarray`](setarray "wikilink")` .@maps$[15],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";`
48-
` `[`for`](for "wikilink")``[`set`](set "wikilink")` .@i, 0; .@i <= 19; `[`set`](set "wikilink")` .@i, .@i+1 ) {`
49-
`  `[`if`](if "wikilink")` (`[`GetCastleData`](GetCastleData "wikilink")`(.@maps$[.@i],1)) {`
50-
`   `[`Announce`](Announce "wikilink")` "The [" + `[`GetCastleName`](GetCastleName "wikilink")`(.@maps$[.@i]) + "] castle has been conquered by the [" + `[`GetGuildName`](GetGuildName "wikilink")`(`[`GetCastleData`](GetCastleData "wikilink")`(.@maps$[.@i],1)) + "] guild.",bc_all|bc_woe;`
51-
`  }`
52-
`  `[`else`](else "wikilink")` {`
53-
`   `[`Announce`](Announce "wikilink")` "The [" + `[`GetCastleName`](GetCastleName "wikilink")`(.@maps$[.@i]) + "] castle is currently unoccupied.",bc_all|bc_woe;`
54-
`  }`
55-
` }`
56-
` `[`end`](end "wikilink")`;`
57-
`}`
11+
```C
12+
- script Agit_Event FAKE_NPC,{
13+
end;
5814

59-
### OnClock####
15+
OnClock2100: //start time for Tues(2), Thurs(4)
16+
OnClock2300: //end time for Tues(2), Thurs(4)
17+
OnClock1600: //start time for Sat(6)
18+
OnClock1800: //end time for Sat(6)
19+
OnAgitInit:
20+
// starting time checks
21+
if((gettime(GETTIME_WEEKDAY) == TUESDAY) && (gettime(GETTIME_HOUR) >= 21 && gettime(GETTIME_HOUR) < 23)
22+
|| (gettime(GETTIME_WEEKDAY) == THURSDAY) && (gettime(GETTIME_HOUR) >= 21 &&gettime(GETTIME_HOUR) < 23)
23+
|| (gettime(GETTIME_WEEKDAY) == SATURDAY) && (gettime(GETTIME_HOUR) >= 16 &&gettime(GETTIME_HOUR) < 18)
24+
) {
25+
if(!agitcheck()) {
26+
agitstart();
27+
callsub(S_DisplayOwners);
28+
}
29+
end;
30+
}
6031

61-
You need one of these labels for each time you want WoE to start or stop, so if you want the WoE to start at 9am and end
62-
at 11am you would need this
32+
// end time checks
33+
if((gettime(GETTIME_WEEKDAY) == TUESDAY) && (gettime(GETTIME_HOUR) == 23)
34+
|| (gettime(GETTIME_WEEKDAY) == THURSDAY) && (gettime(GETTIME_HOUR) == 23)
35+
|| (gettime(GETTIME_WEEKDAY) == SATURDAY) && (gettime(GETTIME_HOUR) == 18)
36+
) {
37+
if(agitcheck()) {
38+
agitend();
39+
callsub(S_DisplayOwners);
40+
}
41+
end;
42+
}
43+
end;
6344

64-
`OnClock0900:`
65-
`OnClock1100:`
45+
S_DisplayOwners:
46+
setarray(.@maps$[0], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05");
47+
setarray(.@maps$[5], "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05");
48+
setarray(.@maps$[10], "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05");
49+
setarray(.@maps$[15], "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05");
50+
for(set.@i, 0; .@i <= 19;set.@i, .@i+1 ) {
51+
if(GetCastleData(.@maps$[.@i],1)) {
52+
announce(sprintf("The [%s] castle has been conquered by the [%s] guild.", GetCastleName(.@maps$[.@i]), GetGuildName(GetCastleData(.@maps$[.@i],1))), bc_all|bc_woe);
53+
} else {
54+
announce(sprintf("The [%s] castle is currently unoccupied.", GetCastleName(.@maps$[.@i])), bc_all|bc_woe);
55+
}
56+
}
57+
end;
58+
}
59+
```
6660

67-
===if((gettime(4)==2) && (gettime(3)\>=21 && gettime(3)\<23)) goto L_Start;===
61+
1. `OnClock####`
6862

69-
`gettime(4)==2`
63+
You need one of these labels for each time you want WoE to start or stop, so if you want the WoE to start at 9am and end
64+
at 11am you would need this
7065

71-
Will check what the day is, 0 = Sun 1 = Mon 2 = Tue etc etc...
66+
`OnClock0900:`
67+
`OnClock1100:`
7268

73-
This is currentally day 2, so this would result in a success if it was a Tuesday
7469

75-
`gettime(3)>=21`
70+
2. `if (gettime(GETTIME_WEEKDAY) == TUESDAY) && (gettime(GETTIME_HOUR) >= 21 && gettime(GETTIME_HOUR) < 23)) goto L_Start;`
7671

77-
Will check the hour of the day, 00 = Midnight 01 = 1am etc...
72+
`gettime(GETTIME_WEEKDAY) == TUESDAY`
7873

79-
This is currentally 9pm (21:00) the \>= mean if the current time is after 9pm return a success
74+
Will check what the day is, 0 = Sun 1 = Mon 2 = Tue etc etc...
8075

81-
`gettime(3)<23`
76+
This is currentally day 2, so this would result in a success if it was a Tuesday
8277

83-
Work the same as above, but will be the end of your WoE, the \< means if the current time is before 11pm (23:00) it will
84-
return a success, if at any point the current time is equal to or more that 11pm it will return a fail
78+
`gettime(GETTIME_HOUR) >= 21`
8579

86-
`if((gettime(4)==2) && (gettime(3)>=21 && gettime(3)<23)) goto L_Start;`
80+
Will check the hour of the day, 00 = Midnight 01 = 1am etc...
8781

88-
Only if everything inside the outer bracket is a success will it goto "L_Start" and start the WoE
82+
This is currentally 9pm (21:00) the `>=` mean if the current time is after 9pm return a success
8983

90-
**Example 1**: It is tuesday, it is 10pm, you have just had to restart the server cause it has crash or whatever, it
91-
runs past that line of code
84+
`gettime(GETTIME_HOUR) < 23`
9285

93-
`if((gettime(4)==2[Hm yes it is `*`{1}`*`]) && (gettime(3)>=21[Yes it is after 21 `*`{1}`*`] && gettime(3)<23[oh and it is before 23 `*`{1}`*`])) goto L_Start; [I didnt detect any `*`{0}`*` I better goto L_Start]`
86+
Work the same as above, but will be the end of your WoE, the `<` means if the current time is before 11pm (23:00) it will
87+
return a success, if at any point the current time is equal to or more that 11pm it will return a fail
9488

95-
**Example 2**: It is Tuesday, it is 11:30pm
89+
`if (gettime(GETTIME_WEEKDAY) == TUESDAY) && (gettime(GETTIME_HOUR) >= 21 && gettime(GETTIME_HOUR) < 23)) goto L_Start;`
9690

97-
`if((gettime(4)==2[Hm yes it is `*`{1}`*`]) && (gettime(3)>=21[Yes it is after 21 `*`{1}`*`] && gettime(3)<23[wait no it is after 23 `*`{0}`*`])) goto L_Start; [I detected one or more `*`{0}`*` I better no run this action and let the script carry on]`
91+
Only if everything inside the outer bracket is a success will it goto "L_Start" and start the WoE
9892

99-
**Example 3**: It is Wednesday, it is 10pm
93+
**Example 1**: It is tuesday, it is 10pm, you have just had to restart the server cause it has crash or whatever, it
94+
runs past that line of code
10095

101-
`if((gettime(4)==2[Wait it is not day 2 `*`{0}`*`]) && (gettime(3)>=21[Yes it is after 21 `*`{1}`*`] && gettime(3)<23[oh and it is before 23 `*`{1}`*`])) goto L_Start; [I detected one or more `*`{0}`*` I better no run this action and let the script carry on]`
96+
`if((gettime(4)==2[Hm yes it is `*`{1}`*`]) && (gettime(3)>=21[Yes it is after 21 `*`{1}`*`] && gettime(3)<23[oh and it is before 23 `*`{1}`*`])) goto L_Start; [I didnt detect any `*`{0}`*` I better goto L_Start]`
10297

103-
===if((gettime(4)==2) && (gettime(3)==23)) goto L_End;===
98+
**Example 2**: It is Tuesday, it is 11:30pm
10499

105-
`gettime(4)==2`
100+
`if((gettime(4)==2[Hm yes it is `*`{1}`*`]) && (gettime(3)>=21[Yes it is after 21 `*`{1}`*`] && gettime(3)<23[wait no it is after 23 `*`{0}`*`])) goto L_Start; [I detected one or more `*`{0}`*` I better no run this action and let the script carry on]`
106101

107-
Same as above, used for checking the day, you will need one of these for everyday you make, that is unless you decide to
108-
have one everyday at the same time then I wont mind, you will need just one, and it wont need to check the day
102+
**Example 3**: It is Wednesday, it is 10pm
109103

110-
`gettime(3)==23`
104+
`if((gettime(4)==2[Wait it is not day 2 `*`{0}`*`]) && (gettime(3)>=21[Yes it is after 21 `*`{1}`*`] && gettime(3)<23[oh and it is before 23 `*`{1}`*`])) goto L_Start; [I detected one or more `*`{0}`*` I better no run this action and let the script carry on]`
111105

112-
This would be the hour you want the WoE to end at, again 1 is needed for every WoE day/time you set
113106

114-
**Example 1**: This query is reached after passing through the first "Example 2"
107+
3. `if((gettime(4)==2) && (gettime(3)==23)) goto L_End;`
115108

116-
It is the same, Tuesday and 11:30pm
109+
`gettime(4)==2`
117110

118-
\[Seems the arguments above me havent picked this query up yet\]
111+
Same as above, used for checking the day, you will need one of these for everyday you make, that is unless you decide to
112+
have one everyday at the same time then I wont mind, you will need just one, and it wont need to check the day
119113

120-
`if((gettime(4)==2[Why yes, it is day 2 `*`{1}`*`]) && (gettime(3)==23[and it is hour 23 `*`{1}`*`])) goto L_End;[I didnt see any `*`{0}`*` better run this`
114+
`gettime(3)==23`
121115

122-
This will then end your WoE
116+
This would be the hour you want the WoE to end at, again 1 is needed for every WoE day/time you set
123117

124-
**Example 2**: This query is reached after passing through the first "Example 3"
118+
**Example 1**: This query is reached after passing through the first "Example 2"
125119

126-
It is Wednesday, it is 10pm
120+
It is the same, Tuesday and 11:30pm
127121

128-
\[Seems the arguments above me havent picked this query up yet\]
122+
\[Seems the arguments above me havent picked this query up yet\]
129123

130-
`if((gettime(4)==2[Why no, it isnt day 2 `*`{0}`*`]) && (gettime(3)==23[and it is not hour 23 `*`{0}`*`])) goto L_End;[I see one or more `*`{0}`*` better not run this or stupid people will post bugs]`
124+
`if((gettime(4)==2[Why yes, it is day 2 `*`{1}`*`]) && (gettime(3)==23[and it is hour 23 `*`{1}`*`])) goto L_End;[I didnt see any `*`{0}`*` better run this`
125+
126+
This will then end your WoE
127+
128+
**Example 2**: This query is reached after passing through the first "Example 3"
129+
130+
It is Wednesday, it is 10pm
131+
132+
\[Seems the arguments above me havent picked this query up yet\]
133+
134+
`if((gettime(4)==2[Why no, it isnt day 2 `*`{0}`*`]) && (gettime(3)==23[and it is not hour 23 `*`{0}`*`])) goto L_End;[I see one or more `*`{0}`*` better not run this or stupid people will post bugs]`
131135

132136
## Setting WoE Times
133137

@@ -142,29 +146,29 @@ If you still don't understand this, try the WoE Setter NPC I made to guide you t
142146
your scripts_custom.conf and talk to the NPC in game with a GM level 99.
143147

144148
WoE Controller script -
145-
\[\`npc/custom/woe_controller.txt\`\](https://github.com/HerculesWS/Hercules/blob/stable/npc/custom/woe_controller.txt)
149+
[`npc/custom/woe_controller.txt`](https://github.com/HerculesWS/Hercules/blob/stable/npc/custom/woe_controller.txt)
146150

147151
Original guide can be found at
148-
\[\`doc/woe_time_explanation.txt\`\](https://github.com/HerculesWS/Hercules/blob/stable/doc/woe_time_explanation.txt)
152+
[`doc/woe_time_explanation.txt`](https://github.com/HerculesWS/Hercules/blob/stable/doc/woe_time_explanation.txt)
149153

150154
## Turn OFF WoE in Some Castles
151155

152156
WoE is a server-wide setting, so it's either ON everywhere, or OFF everywhere.
153157
To get around this and "turn off" woe in certain castles, this is what you can do:
154158

155-
1. Edit \[\`npc/scripts_guild.conf\`\](https://github.com/HerculesWS/Hercules/blob/stable/npc/scripts_guild.conf) and
159+
1. Edit [`npc/scripts_guild.conf`](https://github.com/HerculesWS/Hercules/blob/stable/npc/scripts_guild.conf) and
156160
comment out the castles you are NOT using for WoE (put // in front of the line). This turns of all woe functions for
157161
that castle.
158162
2. Optional: to remove the warp portal entrance, edit
159-
\[\`npc/warps/guildcastles.txt\`\](https://github.com/HerculesWS/Hercules/blob/stable/npc/warps/guildcastles.txt)
163+
[`npc/warps/guildcastles.txt`](https://github.com/HerculesWS/Hercules/blob/stable/npc/warps/guildcastles.txt)
160164
and comment-out the warps into the castles you are not using.
161165

162166
## Separate WoE Times in Separate Towns/Castles
163167

164168
WoE is a server-wide setting, so it's either ON everywhere, or OFF everywhere.
165169
(you can't have it on in one castle only).
166170
To get around this, you need to code 3 separate events in the
167-
\[\`npc/guild/agit_controller.txt\`\](https://github.com/HerculesWS/Hercules/blob/stable/npc/guild/agit_controller.txt)
171+
[`npc/guild/agit_controller.txt`](https://github.com/HerculesWS/Hercules/blob/stable/npc/guild/agit_controller.txt)
168172

169173
### StartWOE1:
170174

0 commit comments

Comments
 (0)