Original Post
So, i'm hookin autostance up and for some reason it wont save the autostance and also the players are saying they arn't actually ever dropping into the stance whether attacking or being attacked.. can anyone see why? Thanks:) [Edited by - Sandman on May 30, 2008 5:18:21 AM]
void do_autostance(CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
one_argument( argument, arg, MAX_INPUT_LENGTH );
if (IS_NPC(ch)) return;
if (!str_cmp(arg,"none"))
{
send_to_char("Autostance set to None.\n\r", ch );
ch->stance[AUTODROP] = STANCE_NONE;
}
else if (!str_cmp(arg, "crane"))
{
send_to_char("Autostance set to Crane.\n\r",ch );
ch->stance[AUTODROP] = STANCE_CRANE;
}
else if (!str_cmp(arg, "bull"))
{
send_to_char("Autostance set to Bull.\n\r", ch );
ch->stance[AUTODROP] = STANCE_BULL;
}
else if (!str_cmp(arg, "viper"))
{
send_to_char("Autostance set to Viper.\n\r", ch );
ch->stance[AUTODROP] = STANCE_VIPER;
}
else if (!str_cmp(arg, "mongoose"))
{
send_to_char("Autostance set to Mongoose.\n\r", ch);
ch->stance[AUTODROP] = STANCE_MONGOOSE;
}
else if (!str_cmp(arg, "swallow") && ch->stance[STANCE_CRANE] >= 200 && ch->stance[STANCE_MONGOOSE] >= 200 )
{
send_to_char("Autostance set to Swallow.\n\r", ch);
ch->stance[AUTODROP] = STANCE_SWALLOW;
}
else if (!str_cmp(arg, "lion") && ch->stance[STANCE_BULL] >= 200 && ch->stance[STANCE_VIPER] >= 200 )
{
send_to_char("Autostance set to Lion.\n\r", ch);
ch->stance[AUTODROP] = STANCE_LION;
}
else if (!str_cmp(arg, "falcon") && ch->stance[STANCE_MONGOOSE] >= 200 && ch->stance[STANCE_BULL] >= 200 )
{
send_to_char("Autostance set to Falcon.\n\r", ch);
ch->stance[AUTODROP] = STANCE_FALCON;
}
else if (!str_cmp(arg, "cobra") && ch->stance[STANCE_VIPER] >= 200 && ch->stance[STANCE_CRANE] >= 200 )
{
send_to_char("Autostance set to Cobra.\n\r", ch);
ch->stance[AUTODROP] = STANCE_COBRA;
}
else if (!str_cmp(arg, "panther") && ch->stance[STANCE_VIPER] >= 200 && ch->stance[STANCE_MONGOOSE] >= 200 )
{
send_to_char("Autostance set to Panther.\n\r", ch);
ch->stance[AUTODROP] = STANCE_PANTHER;
}
else if (!str_cmp(arg, "grizzlie") && ch->stance[STANCE_BULL] >= 200 && ch->stance[STANCE_CRANE] >= 200 )
{
send_to_char("Autostance set to Grizzlie.\n\r", ch);
ch->stance[AUTODROP] = STANCE_GRIZZLIE;
}
else send_to_char ("No such Stance.\n\r", ch);
}
void autodrop(CHAR_DATA *ch)
{
char buf [MAX_INPUT_LENGTH];
char buf2 [MAX_INPUT_LENGTH];
char stancename [10];
if (IS_NPC(ch)) return;
if (ch->stance[AUTODROP]==STANCE_NONE) return;
else if (ch->stance[AUTODROP]==STANCE_VIPER) sprintf(stancename,"viper");
else if (ch->stance[AUTODROP]==STANCE_CRANE) sprintf(stancename,"crane");
else if (ch->stance[AUTODROP]==STANCE_MONGOOSE) sprintf(stancename,"mongoose");
else if (ch->stance[AUTODROP]==STANCE_BULL) sprintf(stancename,"bull");
else if (ch->stance[AUTODROP]==STANCE_SWALLOW) sprintf(stancename, "swallow");
else if (ch->stance[AUTODROP]==STANCE_LION) sprintf(stancename, "lion");
else if (ch->stance[AUTODROP]==STANCE_FALCON) sprintf(stancename, "falcon");
else if (ch->stance[AUTODROP]==STANCE_PANTHER) sprintf(stancename, "panther");
else if (ch->stance[AUTODROP]==STANCE_COBRA) sprintf(stancename, "cobra");
else if (ch->stance[AUTODROP]==STANCE_GRIZZLIE) sprintf(stancename, "grizzlie");
else return;
if (ch->stance[0] < 1)
{
ch->stance[0] = ch->stance[AUTODROP];;
sprintf(buf, "You fall into the %s stance.", stancename);
act(buf, ch, NULL, NULL, TO_CHAR);
sprintf(buf2, "$n falls into the %s stance.",stancename);
act(buf2, ch, NULL, NULL, TO_ROOM);
}
}