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.1 by elmex, Thu Apr 24 21:36:21 2008 UTC vs.
Revision 1.7 by elmex, Thu Nov 27 23:22:14 2008 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',
33 ."find the Hall of Quests and finish the first quest.", 33 ."find the Hall of Quests and finish the first quest.",
34 spoiler_cost => 100000, 34 spoiler_cost => 100000,
35 spoiler => "You have to find the cave where the Goblin Chief hides. You can find that cave by leaving Scorn through the eastern gate, following the road to the east until see a small footpath going to the north. Follow it and you will find a cave. After some levels of fighting you will come to the final level where you will find the Goblin Chief, which usually looks very similar to usual Goblins. Kill him and grab his head, but be careful not to burn it accidentally. Bring that head to the Hall of Quests in the king's castle in scorn, and enter the first teleporter, where you will be awardened with the rank of 'Hero of Scorn'.", 35 spoiler => "You have to find the cave where the Goblin Chief hides. You can find that cave by leaving Scorn through the eastern gate, following the road to the east until see a small footpath going to the north. Follow it and you will find a cave. After some levels of fighting you will come to the final level where you will find the Goblin Chief, which usually looks very similar to usual Goblins. Kill him and grab his head, but be careful not to burn it accidentally. Bring that head to the Hall of Quests in the king's castle in scorn, and enter the first teleporter, where you will be awardened with the rank of 'Hero of Scorn'.",
36 }, 36 },
37 { 37 {
38 name => "Wizard Yarid House",
39 match => ['marker', 'quest_wizard_yarid_house'],
40 difficulty => 'tricky',
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 },
43 {
38 name => "Mike Miller House", 44 name => "Mike Miller House",
39 match => ['marker', 'quest_mike_millers_house'], 45 match => ['marker', 'quest_mike_millers_house'],
40 difficulty => 'tricky', 46 difficulty => 'tricky',
41 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.>",
42 }, 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 }
43); 55);
44 56
45sub name2quest { 57sub name2quest {
46 my ($n) = @_; 58 my ($n) = @_;
47 for my $q (@QUESTS) { 59 for my $q (@QUESTS) {
50 } 62 }
51 } 63 }
52 return undef; 64 return undef;
53} 65}
54 66
55# this is the main command interface for the IPO NPC 67# this is the main command interface for the NPC
56cf::register_script_function "quest_master::talk" => sub { 68cf::register_script_function "quest_master::talk" => sub {
57 my ($who, $msg, $npc) = @_; 69 my ($who, $msg, $npc) = @_;
58 my ($cmd, $arguments) = split /\s+/, $msg, 2; 70 my ($cmd, $arguments) = split /\s+/, $msg, 2;
59 $cmd = lc $cmd; 71 $cmd = lc $cmd;
60 72
133 my $q = name2quest ($arguments); 145 my $q = name2quest ($arguments);
134 if ($q) { 146 if ($q) {
135 if ($who->pay_amount ($q->{spoiler_cost})) { 147 if ($who->pay_amount ($q->{spoiler_cost})) {
136 $who->reply ($npc, 148 $who->reply ($npc,
137 "Ok, I received ".cf::cost_string_from_value ($q->{spoiler_cost}) 149 "Ok, I received ".cf::cost_string_from_value ($q->{spoiler_cost})
138 ." from you. This is the spoiler for the quest " 150 . " from you. This is the spoiler for the quest "
139 ."'$q->{name}': $q->{spoiler}" 151 . "'$q->{name}': $q->{spoiler}"
140 ); 152 );
141 } else { 153 } else {
142 $who->reply ($npc, 154 $who->reply ($npc,
143 "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 "
144 ."for the quest '$q->{name}', it would cost you " 156 . "for the quest '$q->{name}', it would cost you "
145 . cf::cost_string_from_value ($q->{spoiler_cost}) . "." 157 . cf::cost_string_from_value ($q->{spoiler_cost}) . "."
146 ); 158 );
147 } 159 }
148 160
149 } else { 161 } else {
156 168
157 if ($q->{match}->[0] eq 'marker') { 169 if ($q->{match}->[0] eq 'marker') {
158 my $force; 170 my $force;
159 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] });
160 if ($force) { 172 if ($force) {
161 $force->remove;
162 $force->destroy (1); 173 $force->destroy;
163 $who->reply ($npc, "Successfully erased quest marker '$q->{name}' from you!"); 174 $who->reply ($npc, "Successfully erased quest marker '$q->{name}' from you!");
164 175
165 } else { 176 } else {
166 $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!");
167 } 178 }
172 } 183 }
173 184
174 } else { 185 } else {
175 $who->reply ($npc, <<REPL); 186 $who->reply ($npc, <<REPL);
176Welcome adventurer! What do you want to do? 187Welcome adventurer! What do you want to do?
188
177Do you want me to list your finished quests? 189Do you want me to list your finished quests?
178Or do you want a list of unfinished quests? 190Or do you want a list of unfinished quests?
179Or 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?
180REPL 192REPL
181 } 193 }
182 194
183 1 195 1
184}; 196};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines