ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/nimbus.ext
(Generate patch)

Comparing deliantra/maps/perl/nimbus.ext (file contents):
Revision 1.8 by root, Tue Mar 28 16:08:19 2006 UTC vs.
Revision 1.11 by root, Sat Apr 8 14:53:12 2006 UTC

60 60
61 my $pl = $ob->contr; 61 my $pl = $ob->contr;
62 62
63 # save player stats and experience to restore it later 63 # save player stats and experience to restore it later
64 64
65 unless ($ob->{in_nimbus}) {
65 my $save = { 66 my $save = {
66 stats => stats_get $ob->stats, 67 stats => stats_get $ob->stats,
67 orig_stats => stats_get $pl->orig_stats, 68 orig_stats => stats_get $pl->orig_stats,
68 savebed => [$pl->get_savebed], 69 savebed => [$pl->get_savebed],
69 skill_exp => skills_get $ob, 70 skill_exp => skills_get $ob,
70 }; 71 };
71 72
72 $ob->{in_nimbus} ||= $save; 73 $ob->{in_nimbus} = $save;
74
75 $ob->message ("\n");
76 $ob->message ("You start to feel dizzy.\n");
77 $ob->message ("The world around you blurs.\n");
78 $ob->message ("\n");
79 }
73 80
74 my $path = sprintf "%s/%s/%s/%s", 81 my $path = sprintf "%s/%s/%s/%s",
75 cf::localdir, cf::playerdir, $ob->name, "nimbus"; 82 cf::localdir, cf::playerdir, $ob->name, "nimbus";
76 83
84 if ($ob->map->path ne $path) {
77 my $nimbus = cf::map::get_map "/schmorp/nimbus"; 85 my $nimbus = cf::map::get_map "/schmorp/nimbus";
78 $nimbus->set_path ($path); 86 $nimbus->set_path ($path);
79 $nimbus->set_unique (1); 87 $nimbus->set_unique (1);
80 88
81 $pl->set_savebed ($path, 24, 12); 89 $pl->set_savebed ($path, 24, 12);
82 90 }
83 $ob->message ("\n");
84 $ob->message ("You start to feel dizzy.\n");
85 $ob->message ("The world around you blurs.\n");
86 $ob->message ("\n");
87 91
88 0 92 0
89} 93}
90 94
91sub teleport { 95sub teleport {
105 109
106 $portal->free; 110 $portal->free;
107} 111}
108 112
109sub on_trigger { 113sub on_trigger {
110 my ($event) = @_; 114 my ($event, $porter, $ob) = @_;
115
111 my $options = $event->{options}; 116 my $options = $event->options;
112 my $ob = $event->{activator};
113 my $pl = $ob->contr; 117 my $pl = $ob->contr;
114 my @savebed; 118 my @savebed;
115 119
116 if (my $save = delete $ob->{in_nimbus}) { 120 if (my $save = delete $ob->{in_nimbus}) {
117 @savebed = @{$save->{savebed}}; 121 @savebed = @{$save->{savebed}};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines