Re: [Circle] Summon Spell [code]

From: Steve (quickey@cyberverse.com)
Date: 08/07/96


On Tue, 6 Aug 1996 linebacker@microlink.net wrote:

> ASPELL(spell_summon_elemental)
> {
>   struct char_data *elemental = '\0';
>   *buf = '\0';
> 
> if (number(1,101) > GET_LEVEL(ch)) {     /* steep at first */
>    send_to_char("Nothing answers your call.\r\n", ch);
>    return;
>    }
>   if (GET_LEVEL(ch) < 20)  
>     elemental = read_mobile(1, VIRTUAL);
>   else if (GET_LEVEL(ch) <  40)
>     elemental = read_mobile(2, VIRTUAL);
>   else if (GET_LEVEL(ch) < 60)
>     elemental = read_mobile(3, VIRTUAL);
>   else  
>   elemental = read_mobile(4, VIRTUAL);
> 
>   GET_EXP(elemental) = 0;
>   SET_BIT(AFF_FLAGS(elemental), AFF_CHARM);
>   char_to_room(elemental, ch->in_room);

>   sprintf(buf, "%sYou have summoned %s!\r\n", buf, elemental->player.short_descr);
why are you putting buf into buf?
sprintf(buf, "You have summoned %s!\r\n", elemental->player.short_descr);
^-this will do just fine

>   send_to_char(buf, ch);
>   add_follower(elemental, ch);
>   return;
> }
> 
> I think that is right, I cut out some unrelate stuff for this post.

Steve
quickey@cyberverse.com


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



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