ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/shop_ring.ext
Revision: 1.2
Committed: Mon Jul 14 16:42:49 2008 UTC (15 years, 10 months ago) by root
Branch: MAIN
CVS Tags: rel-2_61, rel-2_80, rel-2_6, rel-2_7, rel-2_71, rel-2_72, rel-2_73, rel-2_79, rel-2_76, rel-2_77, rel-2_74, rel-2_75, rel-2_90, rel-2_82, rel-2_92, rel-2_93, rel-2_81, rel-2_78
Changes since 1.1: +2 -2 lines
Log Message:
new objetc event: reset

File Contents

# User Rev Content
1 elmex 1.1 #!perl
2    
3     cf::object::attachment "ring_adornment_shop",
4 root 1.2 on_reset => sub {
5 elmex 1.1 my ($ob) = @_;
6    
7     my $o = cf::object::new 'ring';
8     $o->flag (cf::FLAG_IDENTIFIED, 1);
9     $o->flag (cf::FLAG_UNPAID, 1);
10     $o->set_animation (cf::rndm $o->num_animations);
11    
12     $o->insert_ob_in_map_at ($ob->map, undef, cf::INS_ABOVE_FLOOR_ONLY, $ob->x, $ob->y);
13    
14     cf::override;
15    
16     1
17     };
18    
19     cf::object::attachment "amulet_adornment_shop",
20 root 1.2 on_reset => sub {
21 elmex 1.1 my ($ob) = @_;
22    
23     my $arch = ('amulet', 'amulet_gray', 'amulet_white')[cf::rndm 3];
24     my $o = cf::object::new $arch;
25     $o->flag (cf::FLAG_IDENTIFIED, 1);
26     $o->flag (cf::FLAG_UNPAID, 1);
27     $o->insert_ob_in_map_at ($ob->map, undef, cf::INS_ABOVE_FLOOR_ONLY, $ob->x, $ob->y);
28    
29     cf::override;
30    
31     1
32     };