… | |
… | |
60 | or return; |
60 | or return; |
61 | my $x = $ob->x; |
61 | my $x = $ob->x; |
62 | my $y = $ob->y; |
62 | my $y = $ob->y; |
63 | |
63 | |
64 | # never happens normally, but helps when shell users make mistakes |
64 | # never happens normally, but helps when shell users make mistakes |
65 | $m->in_memory == cf::MAP_ACTIVE |
65 | $m->linkable |
66 | or return 1; |
66 | or return 1; |
67 | |
67 | |
68 | # return 0;#d# |
68 | # return 0;#d# |
69 | # warn join ":", $m->at ($x, $y);#d# |
69 | # warn join ":", $m->at ($x, $y);#d# |
70 | # warn "FOO$m { ".scalar ($m->at ($x, $y))." }\n"; |
70 | # warn "FOO$m { ".scalar ($m->at ($x, $y))." }\n"; |
… | |
… | |
288 | ); |
288 | ); |
289 | next; |
289 | next; |
290 | } |
290 | } |
291 | } else { |
291 | } else { |
292 | # unable to load the playerfile: |
292 | # unable to load the playerfile: |
293 | # check wether the player dir exists, which means the file is corrupted or |
293 | # check whether the player dir exists, which means the file is corrupted or |
294 | # something very similar. |
294 | # something very similar. |
295 | if (!aio_stat cf::player::playerdir $user) { |
295 | if (!aio_stat cf::player::playerdir $user) { |
296 | $ns->send_drawinfo ( |
296 | $ns->send_drawinfo ( |
297 | "Unable to retrieve this player. It might be a locked or broken account. " |
297 | "Unable to retrieve this player. It might be a locked or broken account. " |
298 | . "If this is your account, ask a dungeon master for assistance. " |
298 | . "If this is your account, ask a dungeon master for assistance. " |
… | |
… | |
495 | |
495 | |
496 | $pl->save; |
496 | $pl->save; |
497 | |
497 | |
498 | $ob->send_msg ($cf::SAY_CHANNEL => "In the future, you will wake up here when you die.", cf::NDI_DEF | cf::NDI_REPLY); |
498 | $ob->send_msg ($cf::SAY_CHANNEL => "In the future, you will wake up here when you die.", cf::NDI_DEF | cf::NDI_REPLY); |
499 | |
499 | |
|
|
500 | my $ns = $pl->ns |
|
|
501 | or return; |
|
|
502 | |
500 | $pl->ns->query (cf::CS_QUERY_SINGLECHAR, "Do you want to continue playing (y/n)?", sub { |
503 | $ns->query (cf::CS_QUERY_SINGLECHAR, "Do you want to continue playing (y/n)?", sub { |
501 | if ($_[0] !~ /^[yY]/) { |
504 | if ($_[0] !~ /^[yY]/) { |
502 | $pl->invoke (cf::EVENT_PLAYER_LOGOUT, 1); |
505 | $pl->invoke (cf::EVENT_PLAYER_LOGOUT, 1); |
503 | $pl->deactivate; |
506 | $pl->deactivate; |
504 | $pl->ns->destroy; |
507 | $pl->ns->destroy; |
505 | } |
508 | } |