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

Comparing deliantra/server/ext/ipo.ext (file contents):
Revision 1.5 by elmex, Sun Jan 14 11:00:48 2007 UTC vs.
Revision 1.9 by root, Wed Sep 19 21:56:30 2007 UTC

19 literacy => [ 19 literacy => [
20 1000, 'scroll_literacy', 20 1000, 'scroll_literacy',
21 sub { $_[0]->value (1000 * $price_fact) } 21 sub { $_[0]->value (1000 * $price_fact) }
22 ], 22 ],
23 mailscroll => [ 23 mailscroll => [
24 1, 'scroll', 24 1, 'mailscroll_empty',
25 sub { 25 sub {
26 $_[0]->name ("mailscroll T: $_[2] F: $_[1]"); 26 $_[0]->name ("mailscroll T: $_[2] F: $_[1]");
27 $_[0]->name_pl ("mailscrolls T: $_[2] F: $_[1]"); 27 $_[0]->name_pl ("mailscrolls T: $_[2] F: $_[1]");
28 $_[0]->value (1 * $price_fact); 28 $_[0]->value (1 * $price_fact);
29 }, 29 },
185 $who->reply ($npc, "Here is your $cmd"); 185 $who->reply ($npc, "Here is your $cmd");
186 } 186 }
187 187
188 } elsif ($cmd eq 'receive') { 188 } elsif ($cmd eq 'receive') {
189 cf::async { 189 cf::async {
190 $Coro::current->{desc} = "ipo receive";
191
190 my $storage = cf::map::find ("/planes/IPO_storage"); 192 my $storage = cf::map::find ("/planes/IPO_storage");
191 unless ($storage) { 193 unless ($storage) {
192 $who->reply ($npc, "Sorry, our package delivery service is currently in strike. Please come back later."); 194 $who->reply ($npc, "Sorry, our package delivery service is currently in strike. Please come back later.");
193 return 1; 195 return 1;
194 } 196 }
201 $cnt++; 203 $cnt++;
202 } 204 }
203 } 205 }
204 206
205 if ($cnt) { 207 if ($cnt) {
206 $who->reply ($npc, $cnt == 1 ? "Here is your pakage." : "Here are your packages."); 208 $who->reply ($npc, $cnt == 1 ? "Here is your package." : "Here are your packages.");
207 } else { 209 } else {
208 $who->reply ($npc, "Sorry, no deliverys for you sir."); 210 $who->reply ($npc, "Sorry, no deliveries for you sir.");
209 } 211 }
210 } 212 }
211 213
212 } elsif ($cmd eq 'send') { 214 } elsif ($cmd eq 'send') {
213 unless ($arguments =~ /^\S+$/) { 215 unless ($arguments =~ /^\S+$/) {
214 $who->reply ($npc, "Send to who?"); 216 $who->reply ($npc, "Send to who?");
215 return 1; 217 return 1;
216 } 218 }
217 219
218 cf::async { 220 cf::async {
221 $Coro::current->{desc} = "ipo send";
222
219 my $storage = cf::map::find ("/planes/IPO_storage"); 223 my $storage = cf::map::find ("/planes/IPO_storage");
220 unless ($storage) { 224 unless ($storage) {
221 $who->reply ($npc, "Sorry, our package delivery service is currently in strike. Please come back later."); 225 $who->reply ($npc, "Sorry, our package delivery service is currently in strike. Please come back later.");
222 return 1; 226 return 1;
223 } 227 }
262package CFMail; 266package CFMail;
263 267
264use POSIX qw/strftime/; 268use POSIX qw/strftime/;
265use CFDB; 269use CFDB;
266 270
267my $MAILDB = CFDB->new (db_file => cf::localdir . "/crossfiremail"); 271my $MAILDB = CFDB->new (db_file => "$LOCALDIR/crossfiremail");
268 272
269sub get_mail { 273sub get_mail {
270 my ($toname) = @_; 274 my ($toname) = @_;
271 $MAILDB->get ($toname); 275 $MAILDB->get ($toname);
272} 276}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines