Re: Simple warning :) (+Snippet)

From: Raf (picard@INDIGO.IE)
Date: 04/18/98


On Sat, 18 Apr 1998, Daniel Koepke wrote:

> ->> ->207.194.22
> ->
> ->Dynamic IP, the last part of it will always be variable.
>
> Yes, but the MUD returns the entire IP, including the variable part,
> AFAIK.  I could be wrong, of course, but it seems like a spoofed
> address to me.
>

Yup, the IP was taken from my ban-list :)

ObCircle:

Um...err...*think*...Okay, cook skill:-

ACMD(do_cook)
{

 struct obj_data * obj;
 one_argument(argument, arg);

   if(GET_CLASS(ch) != CLASS_RANGER && GET_LEVEL(ch) < LVL_GOD)   {
    send_to_char("You have no idea how to cook food!\r\n", ch);
    return;
   }

   if(GET_SKILL(ch, SKILL_COOK) <= 0)
    {
     send_to_char("You have no idea how to cook!\r\n", ch);
     return;
    }

   if (!*arg)
    {
     send_to_char("Cook what?\r\n", ch);
     return;
    }

       if (!(obj = get_obj_in_list_vis(ch, arg, world[ch->in_room].contents)))
   {
     send_to_char("That doesnt seem to be here.\r\n",ch);
     return;
   }

   if (GET_OBJ_TYPE(obj) != ITEM_FOOD)
   {
     send_to_char("You can't cook that!\r\n",ch);
     return;
   }

  send_to_char("You start to roast the food.\r\n", ch);
  act("$n starts to roast some food.\r\n", FALSE, ch, 0, 0, TO_ROOM);

  if (number(1,101) > GET_SKILL(ch, SKILL_COOK))
    {
     send_to_char("You overcook it. Ugh\r\n", ch);
     GET_OBJ_VAL(obj, 0) -= number(1, GET_LEVEL(ch))/2;
     return;
    }

   send_to_char("Mmmm...smells delicious.\r\n", ch);
   GET_OBJ_VAL(obj, 0) += number(1, GET_LEVEL(ch))/2;
}

Have fun....

--Raf
--Implementor of AbysmalMUD
--gate2.dev.jhu.edu 4000
--http://www.dev.jhu.edu/abysmal


     +------------------------------------------------------------+
     | 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