[CODE]New Consider Command

From: Erik Lundin (cyrius@boden.mail.telia.com)
Date: 11/21/99


Ok.. here is my version of the consider command..
There is probably a better way to do this, but it works.
If you use it please give me credit somewhere.

To use this you have to remove your current do_consider.

------- START OF CODE ----------

ACMD(do_consider)
{
  struct char_data *victim;
  int diff, var1, var2;

  one_argument(argument, buf);

  if (!(victim = get_char_room_vis(ch, buf))) {
    send_to_char("Consider killing who?\r\n", ch);
    return;
  }
  if (victim == ch) {
    send_to_char("Easy!  Very easy indeed!\r\n", ch);
    return;
  }
  if (!IS_NPC(victim)) {
    send_to_char("Would you like to borrow a cross and a shovel?\r\n", ch);
    return;
  }

  diff = (GET_LEVEL(victim) - GET_LEVEL(ch));

  if (diff <= -15)
    send_to_char("VICTIM'S LEVEL          : Pathetic.\r\n", ch);
  else if (diff <= -10)
    send_to_char("VICTIM'S LEVEL          : Much Lower.\r\n", ch);
  else if (diff <= -5)
    send_to_char("VICTIM'S LEVEL          : Lower.\r\n", ch);
  else if (diff <= -2)
    send_to_char("VICTIM'S LEVEL          : A Little Lower.\r\n", ch);
  else if (diff <= -1)
    send_to_char("VICTIM'S LEVEL          : About Equal.\r\n", ch);
  else if (diff == 0)
    send_to_char("VICTIM'S LEVEL          : About Equal.\r\n", ch);
  else if (diff <= 1)
    send_to_char("VICTIM'S LEVEL          : About Equal.\r\n", ch);
  else if (diff <= 4)
    send_to_char("VICTIM'S LEVEL          : A Little Greater.\r\n", ch);
  else if (diff <= 9)
    send_to_char("VICTIM'S LEVEL          : Greater.\r\n", ch);
  else if (diff <= 14)
    send_to_char("VICTIM'S LEVEL          : Much Greater.\r\n", ch);
  else if (diff >= 15)
    send_to_char("VICTIM'S LEVEL          : Vastly Superior.\r\n", ch);

  var1  = abs(GET_HIT(ch) - GET_HIT(victim)) * 100 / GET_HIT(ch);
  var2 = abs(GET_HIT(ch) - GET_HIT(victim)) * 100 / GET_HIT(ch);

 if(GET_HIT(ch) <  GET_HIT(victim))
 diff = var1;
 else
 diff = var1 - (var1 * 2);

  if (diff <= -50)
    send_to_char("VICTIM'S HITS           : Pathetic.\r\n", ch);
  else if (diff <= -25)
    send_to_char("VICTIM'S HITS           : Much Weaker.\r\n", ch);
  else if (diff <= -15)
    send_to_char("VICTIM'S HITS           : Weaker.\r\n", ch);
  else if (diff <= -5)
    send_to_char("VICTIM'S HITS           : A Little Weaker.\r\n",ch);
  else if (diff <= -1)
    send_to_char("VICTIM'S HITS           : About Equal.\r\n", ch);
  else if (diff == 0)
    send_to_char("VICTIM'S HITS           : About Equal.\r\n", ch);
  else if (diff <= 4)
    send_to_char("VICTIM'S HITS           : About Equal.\r\n", ch);
  else if (diff <= 14)
    send_to_char("VICTIM'S HITS           : A Little Stronger.\r\n",ch);
  else if (diff <= 24)
    send_to_char("VICTIM'S HITS           : Stronger.\r\n", ch);
  else if (diff <= 49)
    send_to_char("VICTIM'S HITS           : Much Stronger.\r\n", ch);
  else if (diff >= 50)
    send_to_char("VICTIM'S HITS           : Vastly Superior.\r\n",ch);

  diff = (GET_DAMROLL(victim) - GET_DAMROLL(ch));

  if (diff <= -15)
    send_to_char("VICTIM'S BATTLE ABILITY : Pathetic.\r\n", ch);
  else if (diff <= -10)
    send_to_char("VICTIM'S BATTLE ABILITY : Much Weaker.\r\n", ch);
  else if (diff <= -5)
    send_to_char("VICTIM'S BATTLE ABILITY : Weaker.\r\n", ch);
  else if (diff <= -2)
    send_to_char("VICTIM'S BATTLE ABILITY : A Little Weaker.\r\n", ch);
  else if (diff <= -1)
    send_to_char("VICTIM'S BATTLE ABILITY : About Equal.\r\n", ch);
  else if (diff == 0)
    send_to_char("VICTIM'S BATTLE ABILITY : About Equal.\r\n", ch);
  else if (diff <= 1)
    send_to_char("VICTIM'S BATTLE ABILITY : About Equal.\r\n", ch);
  else if (diff <= 5)
    send_to_char("VICTIM'S BATTLE ABILITY : A Little Stronger.\r\n", ch);
  else if (diff <= 9)
    send_to_char("VICTIM'S BATTLE ABILITY : Stronger.\r\n", ch);
  else if (diff <= 14)
    send_to_char("VICTIM'S BATTLE ABILITY : Much Stronger.\r\n", ch);
  else if (diff >= 15)
    send_to_char("VICTIM'S BATTLE ABILITY : Vastly Superior.\r\n", ch);

}
------- END OF CODE ---------

An idea would be to color the lower messages green and the higher messages red.

Regards
Erik Lundin
(cyrius@boden.mail.telia.com)


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



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