ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/quest_master.ext
(Generate patch)

Comparing deliantra/server/ext/quest_master.ext (file contents):
Revision 1.3 by root, Thu May 1 06:47:03 2008 UTC vs.
Revision 1.9 by root, Sun Jan 29 02:47:04 2017 UTC

11 }, 11 },
12 { 12 {
13 name => "Gramp Malone Earhorn", 13 name => "Gramp Malone Earhorn",
14 match => ['flag', 'quest_gramp_malones_earhorn'], 14 match => ['flag', 'quest_gramp_malones_earhorn'],
15 difficulty => 'be observant', 15 difficulty => 'be observant',
16 start => 'Go to the hoves in the south west of scorn, go into the south east house from the four houses and ask the woman and/or grandpa malone about his earhorn. H<you will have to find it, maybe it\'s not even on the same map>', 16 start => 'Go to the hoves in the south of scorn, go into the south east house from the four houses and ask the woman and/or grandpa malone about his earhorn. H<You will have to find it, maybe it\'s not even on the same map>',
17 spoiler_cost => 50000, 17 spoiler_cost => 50000,
18 spoiler => "You will find his earhorn in the tavern \"The Barking Mule\", he left it in a workbench there.", 18 spoiler => "You will find his earhorn in the tavern \"The Barking Mule\", he left it in a workbench there.",
19 }, 19 },
20 { 20 {
21 name => "Gramp Malone Walkingstick", 21 name => "Gramp Malone Walkingstick",
22 match => ['flag', 'quest_gramp_malones_walking_stick'], 22 match => ['flag', 'quest_gramp_malones_walking_stick'],
23 difficulty => 'be observant', 23 difficulty => 'be observant',
24 start => 'Go to the hoves in the south west of scorn, go into the south east house from the four houses and ask the woman and/or grandpa malone about his walking stick. H<you will have to find it, maybe it\'s not even on the same map>', 24 start => 'Go to the hoves in the south of scorn, go into the south east house from the four houses and ask the woman and/or grandpa malone about his walking stick. H<You will have to find it, maybe it\'s not even on the same map>',
25 spoiler_cost => 50000, 25 spoiler_cost => 50000,
26 spoiler => "The walking stick was lost in the four houses called the \"Riverside Manor\" in the south of Scorn. The House to the very south east has a table, beneath it you will find gramps walking stick." 26 spoiler => "The walking stick was lost in the four houses called the \"Riverside Manor\" in the south east of Scorn. The House to the very south east has a table, beneath it you will find gramps walking stick."
27 }, 27 },
28 { 28 {
29 name => 'Hero of Scorn', 29 name => 'Hero of Scorn',
30 match => ['marker', 'hero_of_scorn'], 30 match => ['marker', 'hero_of_scorn'],
31 difficulty => 'easy', 31 difficulty => 'easy',
36 }, 36 },
37 { 37 {
38 name => "Wizard Yarid House", 38 name => "Wizard Yarid House",
39 match => ['marker', 'quest_wizard_yarid_house'], 39 match => ['marker', 'quest_wizard_yarid_house'],
40 difficulty => 'tricky', 40 difficulty => 'tricky',
41 start => "Near the mad mages tower, in the eastern part of Scorn you will find a house with a red roof. It's wizard Yarid's house, he died while experimenting in his basement. Ask his house keeper for more information and explore the dungeon.", 41 start => "Near the mad mages tower, in the western part of Scorn you will find a house with a red roof. It's wizard Yarid's house, he died while experimenting in his basement. Ask his house keeper for more information and explore the dungeon.",
42 }, 42 },
43 { 43 {
44 name => "Mike Miller House", 44 name => "Mike Miller House",
45 match => ['marker', 'quest_mike_millers_house'], 45 match => ['marker', 'quest_mike_millers_house'],
46 difficulty => 'tricky', 46 difficulty => 'tricky',
47 start => "In the north west of scorn you will find the 'West Scorn Trademarket', just south from the weapons shop. The first neighbour house to the east of the trademarket, just right next to the street, is Mike Miller's house. Speak to him. H<He wants the angry pixie's head, which you should drop right next to him.>", 47 start => "In the north west of scorn you will find the 'West Scorn Trademarket', just south from the weapons shop. The first neighbour house to the east of the trademarket, just right next to the street, is Mike Miller's house. Speak to him. H<He wants the angry pixie's head, which you should drop right next to him.>",
48 }, 48 },
49 {
50 name => "Jeweler Quest",
51 match => ['flag', 'jeweler_quest_1'],
52 difficulty => 'tough fighting',
53 start => "You have to travel to Valleynoy. You find a ship to Valleynoy in Navar. Take it and search the valley of the jeweler town. Go to the welcome house and speak to the old man there."
54 }
49); 55);
50 56
51sub name2quest { 57sub name2quest {
52 my ($n) = @_; 58 my ($n) = @_;
53 for my $q (@QUESTS) { 59 for my $q (@QUESTS) {
87 } else { 93 } else {
88 push @unfinished, $q; 94 push @unfinished, $q;
89 } 95 }
90 } 96 }
91 97
92 if ($cmd eq 'finished') { 98 if ($cmd eq 'finished') {
93 $who->reply ($npc, "You finished these quests: "); 99 $who->reply ($npc, "You finished these quests: ");
94 for (@finished) { 100 for (@finished) {
95 $who->reply ($npc, "- \"$_->{name}\""); 101 $who->reply ($npc, "- \"$_->{name}\"");
96 } 102 }
97 103
129 if ($arguments eq '') { 135 if ($arguments eq '') {
130 $who->reply ($npc, "If you want to have the spoiler for one the following quests enter this into the message entry: 'spoiler <name of quest>', for example: 'spoiler hero of scorn'."); 136 $who->reply ($npc, "If you want to have the spoiler for one the following quests enter this into the message entry: 'spoiler <name of quest>', for example: 'spoiler hero of scorn'.");
131 $who->reply ($npc, "I know spoilers for these quests:"); 137 $who->reply ($npc, "I know spoilers for these quests:");
132 for my $q (@QUESTS) { 138 for my $q (@QUESTS) {
133 next unless $q->{spoiler}; 139 next unless $q->{spoiler};
134 $who->reply ($npc, "- \"$q->{name}\", cost: " 140 $who->reply ($npc, "- \"$q->{name}\", cost: "
135 . cf::cost_string_from_value ($q->{spoiler_cost})); 141 . cf::cost_string_from_value ($q->{spoiler_cost}));
136 } 142 }
137 143
138 } else { 144 } else {
139 my $q = name2quest ($arguments); 145 my $q = name2quest ($arguments);
140 if ($q) { 146 if ($q) {
141 if ($who->pay_amount ($q->{spoiler_cost})) { 147 if ($who->pay_amount ($q->{spoiler_cost})) {
142 $who->reply ($npc, 148 $who->reply ($npc,
143 "Ok, I received ".cf::cost_string_from_value ($q->{spoiler_cost}) 149 "Ok, I received ".cf::cost_string_from_value ($q->{spoiler_cost})
144 ." from you. This is the spoiler for the quest " 150 . " from you. This is the spoiler for the quest "
145 ."'$q->{name}': $q->{spoiler}" 151 . "'$q->{name}': $q->{spoiler}"
146 ); 152 );
147 } else { 153 } else {
148 $who->reply ($npc, 154 $who->reply ($npc,
149 "I'm sorry, but you don't have enough money to pay the spoiler " 155 "I'm sorry, but you don't have enough money to pay the spoiler "
150 ."for the quest '$q->{name}', it would cost you " 156 . "for the quest '$q->{name}', it would cost you "
151 . cf::cost_string_from_value ($q->{spoiler_cost}) . "." 157 . cf::cost_string_from_value ($q->{spoiler_cost}) . "."
152 ); 158 );
153 } 159 }
154 160
155 } else { 161 } else {
162 168
163 if ($q->{match}->[0] eq 'marker') { 169 if ($q->{match}->[0] eq 'marker') {
164 my $force; 170 my $force;
165 ext::map_lib::rec_inv_by_slaying ($who, $q->{match}->[1], sub { $force = $_[0] }); 171 ext::map_lib::rec_inv_by_slaying ($who, $q->{match}->[1], sub { $force = $_[0] });
166 if ($force) { 172 if ($force) {
167 $force->remove;
168 $force->destroy (1); 173 $force->destroy;
169 $who->reply ($npc, "Successfully erased quest marker '$q->{name}' from you!"); 174 $who->reply ($npc, "Successfully erased quest marker '$q->{name}' from you!");
170 175
171 } else { 176 } else {
172 $who->reply ($npc, "I'm sorry, but you never had a quest marker for the '$q->{name}' quest!"); 177 $who->reply ($npc, "I'm sorry, but you never had a quest marker for the '$q->{name}' quest!");
173 } 178 }
178 } 183 }
179 184
180 } else { 185 } else {
181 $who->reply ($npc, <<REPL); 186 $who->reply ($npc, <<REPL);
182Welcome adventurer! What do you want to do? 187Welcome adventurer! What do you want to do?
188
183Do you want me to list your finished quests? 189Do you want me to list your finished quests?
184Or do you want a list of unfinished quests? 190Or do you want a list of unfinished quests?
185Or do you want a start point or even a spoiler to a quest? 191Or maybe you want a starting point, or even a spoiler, for a quest?
186REPL 192REPL
187 } 193 }
188 194
189 1 195 1
190}; 196};
191 197
1921;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines