void gain_exp( CHAR_DATA *ch, int gain )
{
if ( IS_NPC(ch) || ch->level >= LEVEL_HERO )
return;
ch->exp = UMAX( exp_per_level(ch,ch->pcdata->exp_lvl), ch->exp + gain );
while ( ch->level < LEVEL_HERO && ch->exp >=
exp_per_level(ch,ch->pcdata->exp_lvl) * (ch->level+1) )
{
send_to_char( "{MYou raise a level!!{x ", ch );
advance_level( ch );
ch->level += 1;
check_level( ch );
check_tier( ch );
save_char_obj( ch );
return;
}
while ( ch->level == LEVEL_HERO && ch->exp >=
exp_per_level(ch,ch->pcdata->exp_lvl) * (ch->level+1) )
{
send_to_char( "{MYou raise a HERO level!!{x ", ch );
advance_level( ch );
ch->sublevel += 1;
save_char_obj( ch );
return;
}
}
void do_zname (CHAR_DATA *ch, char *argument, int cmd)
{
char buf [MAX_STRING_LENGTH];
while ( isspace (*argument) )
argument++;
sprintf (buf, "zset %d name %s", ch->room->zone, argument);
command_interpreter (ch, buf);
}
void do_rlink(CHAR_DATA *ch, char *argument, int cmd)
{
char buf1 [MAX_INPUT_LENGTH];
char buf2 [MAX_INPUT_LENGTH];
int dir;
int cha_rnum;
ROOM_DATA *troom;
argument = one_argument (argument, buf1);
argument = one_argument (argument, buf2);
if ( !*buf2 ) {
send_to_char ("Syntax: rlink <direction> <room-number>\n", ch);
return;
void do_rexit(CHAR_DATA *ch, char *argument, int cmd)
{
char buf1 [MAX_INPUT_LENGTH];
char buf2 [MAX_INPUT_LENGTH];
int dir;
int cha_rnum;
ROOM_DATA *troom;
half_chop(argument, buf1, buf2);
if(!strcmp(buf2,"")) {
send_to_char("No room specified…aborting…\n",ch);
return;
}
switch (*buf1) {
case 'n': dir = 0; break;
case 'e': dir = 1; break;
case 's': dir = 2; break;
case 'w': dir = 3; break;
case 'u': dir = 4; break;
case 'd': dir = 5; break;
default: dir = -1; break;
}
if (dir == -1) {
send_to_char("What direction is that?\n", ch);
return;
}
cha_rnum = ch->in_room;
if ( !(troom = vtor (atoi (buf2))) ) {
send_to_char("No room exists with that number.\n", ch);
return;
}
if ( !vtor (ch->in_room)->dir_option[dir])
CREATE (vtor (cha_rnum)->dir_option[dir], struct room_direction_data,1);
bool save_zone_file( AREA_DATA *pArea )
{
int ii;
FILE *fp;
ROOM_INDEX_DATA *pRoomIndex;
MOB_INDEX_DATA *pMobIndex;
OBJ_INDEX_DATA *pObjIndex;
RESET_DATA *pReset;
EXIT_DATA *pExit;
EXTRA_DESCR_DATA *ed;
AFFECT_DATA *paf;
EQUIP_DATA *pEquip;
char fname[MAX_STRING_LENGTH];
char buf[MAX_STRING_LENGTH];
int iDoor, sn, i;
if (pArea->filename == NULL || pArea->filename[0] == '\0')
{
/*
send_to_char("Can't save zone, null file name.\n\r", ch );
*/
return -1;
}
sprintf(fname, "%s.tmp", pArea->filename);
fclose( fpReserve );
if ( ( fp = fopen( fname, "w" )) == NULL )
{
/*
send_to_char("Error opening output file.\n\r", ch );
*/
fpReserve = fopen( NULL_FILE, "r" );
return -1;
}
fprintf( fp, "#AREA " );
write_string( fp, pArea->name );
fprintf( fp, "~\n" );
write_string( fp, pArea->filename );
fprintf( fp, "~\n" );
write_string( fp, pArea->builders );
fprintf( fp, "~\n" );
fprintf( fp, "%d %d\n", pArea->vnum_start, pArea->vnum_final );
fprintf( fp, "%d %d\n\n\n", pArea->reset_length, pArea->area_bits );
fprintf( fp, "#MOBILES\n");
for ( pMobIndex = pArea->mob_first; pMobIndex != NULL; pMobIndex = pMobIndex->zone_next )
{
fprintf( fp, "#%d\n", pMobIndex->vnum );
write_string( fp, pMobIndex->name );
fprintf( fp, "~\n" );
void do_dig( CHAR_DATA *ch, char *argument )
{
extern sh_int rev_dir[];
int door;
int direction;
int vnum;
bool fEonly = FALSE;
char arg1 [MAX_INPUT_LENGTH];
char arg2 [MAX_INPUT_LENGTH];
char buf [MAX_STRING_LENGTH];
ROOM_INDEX_DATA *pRoomIndex;
EXIT_DATA *pexit = NULL;
if ( IS_NPC( ch ) )
return;
if ( !can_build( ch, ch->in_room->area ) ) {
send_to_char(
"You do not have authorization to build in this zone.\n\r", ch );
return;
}
argument = one_argument( argument, arg1 );
if ( arg1[0] != '\0' && !str_cmp( arg1, "list" ) ) {
int col = 0;
sprintf( buf, "Room vnums in use for %s.\n\r", ch->in_room->area->name );
send_to_char( buf, ch );
Mob Hatred
It was coded for LUN telnet://lun.readiloan.com 1701 - a heavily modified Rom 2.3 by Thor - thor@lun.readiloan.com
Add before: * Check for parry.:
===
/* Hate */
bool is_hating(CHAR_DATA *ch, CHAR_DATA *victim)
{
if (!ch->hate || ch->hate->who != victim)
return FALSE;
return TRUE;
}
void stop_hating(CHAR_DATA *ch)
{
if (ch->hate)
{
free_string(ch->hate->name );
/*
* shoot.c, May 3,4 1996 (mostly) by Robert L. Peckham (rip)
* for Sword Quest MURPE.
*/
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "merc.h"
extern char * const dir_name[];
extern char * const dir_name_2[];
extern sh_int const rev_dir[];
void do_shoot( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
CHAR_DATA *vch = NULL;
OBJ_DATA *bow; /* or crossbow, or sling, etc */
OBJ_DATA *arrow;
ROOM_INDEX_DATA *in_room = ch->in_room;
ROOM_INDEX_DATA *target_room;
char arg1[MAX_INPUT_LENGTH];
char buf[MAX_STRING_LENGTH];
int direction;
int ii;
if ( ( bow = get_eq_char( ch, gn_wear_secondary ) ) == NULL
|| bow->item_type != ITEM_RANGED_WEAPON )
{
send_to_char("You aren't holding a ranged weapon.\n\r", ch );
return;
}
if ( ( arrow = get_eq_char( ch, gn_wear_primary ) ) == NULL
|| arrow->item_type != ITEM_AMMUNITION )
{
send_to_char("What do you intend on firing?\n\r", ch );
return;
}
Both the snippets are syntacticly and logicly broken. Formatting has nothing whatsoever to do with it.
Facts
1) You've never seen the code.
2) You wouldn't even know how to get hold of it either.
3) The ONLY reason that YOU are even aware of its existence is that I wrote about it on Wikipedia.
Finally…
4) I have and it does not resemble TheIsles OLC in any way at all.
You don't accuse a person of code theft unless you have evidence of it. Since I am 100% certain that YOU do not have a shred of evidence to back up your ridiculous claim that Locke and Surreal stole OLC from somewhere else, I must conclude that you are a malicious scumbag liar.