-
Notifications
You must be signed in to change notification settings - Fork 0
/
campaign_logs_mob.php
98 lines (84 loc) · 4.33 KB
/
campaign_logs_mob.php
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
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
// ------------------------- //
// --- LABYRINTH OF RUIN --- //
// ------------------------- //
// If the current act is Act 1
if ($currentAct == "Act 1" && $aqs['quest_act'] == "Act 1"){
// If the introduction has been completed
if (count($questsCompleted) == 1){
// In 'The Labyrinth of Ruin' the players have 2 quests to chose from after the Introduction quest, quests 26 and 27
if($aqs['quest_id'] == "109" || $aqs['quest_id'] == "110"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 1;
setQuestMessage("available-after", $aqs['quest_id'], $aqs['quest_req'], NULL, NULL);
// other quests
} else {
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 2;
setQuestMessage("available-after", $aqs['quest_id'], $aqs['quest_req'], NULL, NULL);
}
}
// If the introduction has been completed
if (count($questsCompleted) == 2){
// In 'The Labyrinth of Ruin' the players have 2 quests to chose from after the Introduction quest, quests 26 and 27
if($aqs['quest_id'] == "111" || $aqs['quest_id'] == "112"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 1;
setQuestMessage("available-after", $aqs['quest_id'], $aqs['quest_req'], NULL, NULL);
// other quests
} else {
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 2;
setQuestMessage("available-after", $aqs['quest_id'], $aqs['quest_req'], NULL, NULL);
}
}
if (count($questsCompleted) == 3){
// In 'The Labyrinth of Ruin' the players have 2 quests to chose from after the Introduction quest, quests 26 and 27
if($aqs['quest_id'] == "113" || $aqs['quest_id'] == "114"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 1;
setQuestMessage("available-after", $aqs['quest_id'], $aqs['quest_req'], NULL, NULL);
// other quests
} else {
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 2;
setQuestMessage("available-after", $aqs['quest_id'], $aqs['quest_req'], NULL, NULL);
}
}
// If the first Act 1 quest has been completed
if(count($questsCompleted) > 1){
// if Gathering Foretold was chosen, update message for Honor Among Thieves
if($aqs['quest_id'] == "109" && !in_array($aqs['quest_id'], $questsCompleted)){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 0;
setQuestMessage("other-quest", $aqs['quest_id'], $aqs['quest_req'], NULL, 110);
}
// if Honor Among Thieves was chosen, update message for Gathering Foretold
if($aqs['quest_id'] == "110" && !in_array($aqs['quest_id'], $questsCompleted)){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 0;
setQuestMessage("other-quest", $aqs['quest_id'], $aqs['quest_req'], NULL, 109);
}
}
if(count($questsCompleted) > 2){
// if Gathering Foretold was chosen, update message for Honor Among Thieves
if($aqs['quest_id'] == "111" && !in_array($aqs['quest_id'], $questsCompleted)){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 0;
setQuestMessage("other-quest", $aqs['quest_id'], $aqs['quest_req'], NULL, 112);
}
// if Honor Among Thieves was chosen, update message for Gathering Foretold
if($aqs['quest_id'] == "112" && !in_array($aqs['quest_id'], $questsCompleted)){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 0;
setQuestMessage("other-quest", $aqs['quest_id'], $aqs['quest_req'], NULL, 111);
}
}
} else if ($currentAct == "Interlude"){
if($aqs['quest_act'] == "Finale"){
if(!empty($intersection1)){
if($aqs['quest_req_type'] == "Heroes"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 1;
setQuestMessage("heroes-won", $aqs['quest_id'], $aqs['quest_req'], NULL, NULL);
} else if($aqs['quest_req_type'] == "Overlord") {
setQuestMessage("overlord-lost", $aqs['quest_id'], $aqs['quest_req'], NULL, NULL); }
} else if(empty($intersection1)){
if($aqs['quest_req_type'] == "Overlord"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 1;
setQuestMessage("overlord-won", $aqs['quest_id'], $aqs['quest_req'], NULL, NULL);
} else if($aqs['quest_req_type'] == "Heroes") {
setQuestMessage("heroes-lost", $aqs['quest_id'], $aqs['quest_req'], NULL, NULL);
}
}
}
}