ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/schmorplog.ext
Revision: 1.9
Committed: Mon Jun 19 10:15:10 2006 UTC (17 years, 11 months ago) by root
Branch: MAIN
Changes since 1.8: +12 -0 lines
Log Message:
rewrite npc dialogue to be more generic, to be used in other modules soon

File Contents

# User Rev Content
1 root 1.1 #! perl
2    
3     sub on_login {
4 root 1.7 my ($pl, $host) = @_;
5 root 1.1
6 root 1.8 $pl->ob->set_ob_key_value (schmorplog_last_login => time);
7    
8 root 1.1 cf::LOG cf::llevDebug, sprintf "QBERT %s logged in\n",
9 root 1.7 $pl->ob->name, $host;
10 root 1.9
11     0
12 root 1.1 }
13    
14     sub on_logout {
15 root 1.7 my ($pl, $host) = @_;
16 root 1.1
17 root 1.8 $pl->ob->set_ob_key_value (schmorplog_last_logout => time);
18    
19 root 1.1 cf::LOG cf::llevDebug, sprintf "QBERT %s left\n",
20 root 1.7 $pl->ob->name, $host;
21 root 1.9
22     0
23 root 1.1 }
24    
25     sub on_shout {
26 root 1.5 my ($ob, $msg) = @_;
27 root 1.1
28 root 1.2 cf::LOG cf::llevDebug, sprintf "QBERT [%s] %s\n",
29 root 1.5 $ob->name, $msg;
30 root 1.9
31     0
32 root 1.1 }
33    
34     sub on_player_death {
35 root 1.5 my ($ob) = @_;
36 root 1.1
37 root 1.2 cf::LOG cf::llevDebug, sprintf "QBERT %s died a quick and not very horrible death\n",
38 root 1.6 $ob->name;
39 root 1.9
40     0
41 root 1.1 }
42 root 1.8
43     sub on_player_load {
44     my ($ob, $path) = @_;
45    
46     $ob->set_ob_key_value (schmorplog_last_load => time);
47 root 1.9
48     0
49 root 1.8 }
50    
51     sub on_player_save {
52     my ($ob, $path) = @_;
53    
54     $ob->set_ob_key_value (schmorplog_last_save => time);
55 root 1.9
56     0
57 root 1.8 }