Hit Squad (was: strange anomoly)

From: ;P (siv@CYBERENET.NET)
Date: 03/08/98


> >          char_to_room(mob, room_vnum);
> > room_vnum is this way:
> >     room_vnum = real_room(2010);
>
> char_to_room takes a REAL room value, not a virtual number..i think i did
> that in my example..

oops..didn't read the entire message..just looked at the variable names..
anyway..you can use read_mobile with a virtual number, so there's no need
to use the real_mobile call..and you should really change the room_vnum
var to room_rnum :)

ObCircle:

all this talk about invasions and mobiles hunting characters has reminded
me of something that i wrote a while ago..this is is my hitsquad code..for
those annoying players that you want to teach a lesson, rather than
freezing, purging, etc..anyway..this loads up hit squad mobs and sets them
hunting whoever..of course, you have to have mob hunting already, so that
if you assign the HUNTING var, they will hunt..

this'll also provide another example to tadrith..

ACMD(do_hitsquad)
{
  struct char_data *vict, *mob;
  int i, room_rnum, NUMBER_OF_HITMEN = 6;

  struct hit_man {
    int mob_vnum;
    int room_vnum;
  } hit_men[] = {
    { 2056, 3011 },     /* replace these numbers with your own  */
    { 2057, 3045 },     /* the first is a mob vnum              */
    { 2058, 3012 },     /* the second is the vnum of the room   */
    { 2059, 7503 },     /* to load the mob in                   */
    { 2060, 12034 },
    { 2061, 3075 }
  };

  argument = one_argument(argument, arg);

  if (!(vict = get_char_vis(ch, arg))) {
    send_to_char("You must supply a victim.\r\n", ch);
    return;
  }
  if (vict == ch) {
    send_to_char("Aren't we funny today...\r\n", ch);
    return;
  }
  if ((GET_LEVEL(vict) >= GET_LEVEL(ch)) || IS_NPC(vict) || IS_NPC(ch)) {
    send_to_char("Quit fucking around!\r\n", ch);
    return;
  }

  send_to_char(OK, ch);

  for (i = 0; i < (NUMBER_OF_HITMEN - 1); i++) {
    mob = read_mobile(hit_men[i].mob_vnum, VIRTUAL);
    room_rnum = real_room(hit_men[i].room_vnum);
    char_to_room(mob, room_rnum);
    HUNTING(mob) = vict;
  }
}


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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