summaryrefslogtreecommitdiff
path: root/npc/custom/woe_controller.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/custom/woe_controller.txt')
-rw-r--r--npc/custom/woe_controller.txt44
1 files changed, 22 insertions, 22 deletions
diff --git a/npc/custom/woe_controller.txt b/npc/custom/woe_controller.txt
index 609b7942c..c21018d60 100644
--- a/npc/custom/woe_controller.txt
+++ b/npc/custom/woe_controller.txt
@@ -163,9 +163,9 @@ OnReward:
freeloop(1);
for(set .@i,0; .@i<30; set .@i,.@i+1)
if (getarg(0)&(1<<.@i)) {
- set .@gid, getcastledata(.Castles$[.@i],1);
- if (!.@gid) continue;
- set .@size, query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"+.@gid+"' AND "+.@sql$,.@aid,.@cid);
+ set .@GID, getcastledata(.Castles$[.@i],1);
+ if (!.@GID) continue;
+ set .@size, query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"+.@GID+"' AND "+.@sql$,.@aid,.@cid);
for(set .@j,0; .@j<.@size; set .@j,.@j+1) {
if (.Options&8 && !(.Options&4)) {
set .@ip$, replacestr(getcharip(.@aid[.@j]),".","a");
@@ -297,26 +297,26 @@ while(1) {
}
mes "Select a day.";
next;
- set .@Day, select(" ~ "+implode(.Days$,": ~ "))-1;
+ set .@day, select(" ~ "+implode(.Days$,": ~ "))-1;
mes "[New Session]";
- mes "Select a start time for ^0055FF"+.Days$[.@Day]+"^000000.";
+ mes "Select a start time for ^0055FF"+.Days$[.@day]+"^000000.";
next;
set .@menu$,"";
for(set .@i,0; .@i<23; set .@i,.@i+1)
set .@menu$, .@menu$+" ~ "+Add_Zero(.@i,1)+":";
- set .@Start, select(.@menu$)-1;
+ set .@start, select(.@menu$)-1;
mes "[New Session]";
- mes "Select an end time for ^0055FF"+.Days$[.@Day]+"^000000.";
+ mes "Select an end time for ^0055FF"+.Days$[.@day]+"^000000.";
next;
set .@menu$,"";
- for(set .@i,.@Start+1; .@i<24; set.@i,.@i+1)
+ for(set .@i,.@start+1; .@i<24; set.@i,.@i+1)
set .@menu$, .@menu$+" ~ "+Add_Zero(.@i,1)+":";
- set .@End, select(.@menu$)+.@Start;
+ set .@end, select(.@menu$)+.@start;
for(set .@i,0; .@i<.Size; set .@i,.@i+4)
- if (.@Day == $WOE_CONTROL[.@i] &&
- ((.@Start >= $WOE_CONTROL[.@i+1] && .@Start < $WOE_CONTROL[.@i+2]) ||
- (.@End > $WOE_CONTROL[.@i+1] && .@End <= $WOE_CONTROL[.@i+2]) ||
- (.@Start <= $WOE_CONTROL[.@i+1] && .@End >= $WOE_CONTROL[.@i+2]))) {
+ if (.@day == $WOE_CONTROL[.@i] &&
+ ((.@start >= $WOE_CONTROL[.@i+1] && .@start < $WOE_CONTROL[.@i+2]) ||
+ (.@end > $WOE_CONTROL[.@i+1] && .@end <= $WOE_CONTROL[.@i+2]) ||
+ (.@start <= $WOE_CONTROL[.@i+1] && .@end >= $WOE_CONTROL[.@i+2]))) {
mes "[New Session]";
mes "The chosen times overlap with an existing session.";
next;
@@ -324,22 +324,22 @@ while(1) {
break;
}
if (.@d) { set .@d,0; break; }
- set .@Castle,0;
+ set .@castle,0;
while(1) {
mes "[New Session]";
- mes "^0055FF"+.Days$[.@Day]+" ("+Add_Zero(.@Start)+"-"+Add_Zero(.@End)+")^000000";
+ mes "^0055FF"+.Days$[.@day]+" ("+Add_Zero(.@start)+"-"+Add_Zero(.@end)+")^000000";
mes " > Castles:";
- if (!.@Castle)
+ if (!.@castle)
mes " ~ ^777777(none selected)^000000";
else for(set .@i,0; .@i<30; set .@i,.@i+1)
- if (.@Castle&(1<<.@i)) mes " ~ "+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")";
+ if (.@castle&(1<<.@i)) mes " ~ "+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")";
next;
- set .@menu$,((.@Castle)?" ~ ^FF0000Finished...^000000":"")+":";
+ set .@menu$,((.@castle)?" ~ ^FF0000Finished...^000000":"")+":";
for(set .@i,0; .@i<30; set .@i,.@i+1)
- set .@menu$, .@menu$+" ~ "+((.@Castle&(1<<.@i))?"^0055FF":"")+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")^000000:";
+ set .@menu$, .@menu$+" ~ "+((.@castle&(1<<.@i))?"^0055FF":"")+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")^000000:";
set .@i, select(.@menu$)-1;
if (.@i)
- set .@Castle, .@Castle^(1<<(.@i-1));
+ set .@castle, .@castle^(1<<(.@i-1));
else {
mes "[New Session]";
mes "Are you sure?";
@@ -347,13 +347,13 @@ while(1) {
switch(select(" ~ ^0055FFAdd session...^000000: ~ Continue selecting castles...: ~ ^777777Cancel^000000")) {
case 1:
for(set .@i,0; .@i<.Size; set .@i,.@i+4)
- if ((.@Day == $WOE_CONTROL[.@i] && .@End <= $WOE_CONTROL[.@i+1]) || .@Day < $WOE_CONTROL[.@i]) {
+ if ((.@day == $WOE_CONTROL[.@i] && .@end <= $WOE_CONTROL[.@i+1]) || .@day < $WOE_CONTROL[.@i]) {
set .@d,1;
break;
}
if (!.@d) { set .@d,1; set .@i,.Size; }
copyarray $WOE_CONTROL[.@i+4], $WOE_CONTROL[.@i], .Size-.@i;
- setarray $WOE_CONTROL[.@i], .@Day, .@Start, .@End, .@Castle;
+ setarray $WOE_CONTROL[.@i], .@day, .@start, .@end, .@castle;
set .Size, getarraysize($WOE_CONTROL);
case 3:
mes "[New Session]";