Assassin Spec (very rough)

From: Ryan A.J. Biggs (ae744@freenet.toronto.on.ca)
Date: 07/18/96


This is a VERY rough code for an assassin that players can hire to kill 
people.  It is based on the Pet shop code.  TO use it, drop it in the 
spec_procs.c, and put in a spec_assign.c as well.  Put all the mobs you 
want to be assassins in the room +1 of the selling room (as with the pet 
shop) and go.  Please, if it works, or if any extra coding is needed, 
PLEASE tell me.  May I suggest testing it with simple mobs as assassins 
(fidos) and close by victims (to avoid any no_track rooms)  Please give 
me feedback (either positive or negative, I want to know everything)

-----------------------------<SNIP HERE>--------------------------------

#define ASSASSIN_PRICE(assassin) (GET_LEVEL(assassin) * 100000)

SPECIAL(assassin)
{
  char buf[MAX_STRING_LENGTH], assassin_name[256];
  int assassin_room;
  struct char_data *assassin, *vict;

  assassin_room = ch->in_room + 1;

  if (CMD_IS("list")) {
    send_to_char("Available assassins are:\r\n", ch);
    for (assassin = world[asassin_room].people; assassin;assassin = 
assassin->next_in_room) {
      sprintf(buf, "%8d - %s\r\n", ASSASSIN_PRICE(assassin), 
GET_NAME(assassin));
      send_to_char(buf, ch);
    }
    return (TRUE);
  } else if (CMD_IS("hire")) {

    argument = one_argument(argument, buf);
    argument = one_argument(argument, victim_name);

    if (!(assassin = get_char_room(buf, assassin_room))) {
      send_to_char("There is nobody called that!\r\n", ch);
      return (TRUE);
    }
    if (GET_GOLD(ch) < ASSASSIN_PRICE(assassin)) {
      send_to_char("You don't have enough gold!\r\n", ch);
      return (TRUE);
    }

    if (*victim_name) {
      send_to_char("You need to specify a target!\r\n", ch);
      return 0;
    }
    
    if ((vict = get_player_vis(assassin, victim_name, 0))) {
      GET_GOLD(ch) -= ASSASSIN_PRICE(assassin);
      assassin = read_mobile(GET_MOB_RNUM(assassin), REAL);
      char_to_room(assassin, ch->in_room);
      SET_BIT(MOB_FLAGS(assassin), MOB_MEMORY);
      remember(assassin, vict);
      HUNTING(assassin) = vict;
      send_to_char("You will be contacted if it succeeds or not.\r\n", ch);
      act("$n hires $N for a job.", FALSE, ch, 0, assassin, TO_ROOM);
      return 1;
    } else {
      send_to_char("The assassin can't find the victim!\r\n", ch);
      return 0;
    }
      
  }
  return 0;
}


------------------------------------------------------------------
Ryan A.J. Biggs    email-ae744@freenet.toronto.on.ca
Doppleganger, Charon the Boatman and member of Dieties Anonymous
Owner of a 100% organic wibble and Plasma lamp, and rubber chicken
Keeper of the sacred butcher knife and the Cloak of Shadows
Compiler of the Net.Psionics.Handbook
------------------------------------------------------------------



This archive was generated by hypermail 2b30 : 12/07/00 PST