ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_chat.C
Revision: 1.14
Committed: Thu Mar 1 13:14:10 2007 UTC (17 years, 3 months ago) by pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +0 -0 lines
State: FILE REMOVED
Log Message:
all chat commands are now in perl

File Contents

# User Rev Content
1 elmex 1.1 /*
2 pippijn 1.10 * CrossFire, A Multiplayer game for X-windows
3     *
4     * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
5     * Copyright (C) 2002 Mark Wedel & Crossfire Development Team
6     * Copyright (C) 1992 Frank Tore Johansen
7     *
8     * This program is free software; you can redistribute it and/or modify
9     * it under the terms of the GNU General Public License as published by
10     * the Free Software Foundation; either version 2 of the License, or
11     * (at your option) any later version.
12     *
13     * This program is distributed in the hope that it will be useful,
14     * but WITHOUT ANY WARRANTY; without even the implied warranty of
15     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16     * GNU General Public License for more details.
17     *
18     * You should have received a copy of the GNU General Public License
19     * along with this program; if not, write to the Free Software
20     * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21     *
22     * The authors can be reached via e-mail at <crossfire@schmorp.de>
23     */
24 elmex 1.1
25     #include <global.h>
26     #include <loader.h>
27     #include <sproto.h>
28    
29 root 1.5 static const char *const orcknuckle[7] = { "none", "beholder", "ghost", "knight",
30     "princess", "dragon", "orc"
31     };
32    
33     int
34     command_orcknuckle (object *op, char *params)
35     {
36     char buf[MAX_BUF];
37     char buf2[MAX_BUF];
38     int i, j, k, l;
39    
40     i = rndm (1, 5);
41     j = rndm (1, 5);
42     k = rndm (1, 5);
43     l = rndm (1, 6);
44    
45     snprintf (buf2, MAX_BUF - 1, "%s rolls %s, %s, %s, %s!", &op->name, orcknuckle[i], orcknuckle[j], orcknuckle[k], orcknuckle[l]);
46     snprintf (buf, MAX_BUF - 1, "You roll %s, %s, %s, %s!", orcknuckle[i], orcknuckle[j], orcknuckle[k], orcknuckle[l]);
47     new_draw_info (NDI_UNIQUE, 0, op, buf);
48     new_info_map_except (NDI_UNIQUE, op->map, op, buf2);
49     return 0;
50 elmex 1.1 }