Sadly my idea didn't work as well as I'd wanted. What's the saying, close only counts in horseshoes and hand grendades?
Anyhow what I did in each polymorph script was try this.
string badShifter = StringToRGBString("You cannot shift while already shifted!", STRING_COLOR_RED);
//check to see if we are polymorphed already and dissallow so we cannot
//blow the server up and ruin everyone's fun
if(GetLocalInt(oTarget, "IOS_POLY"))
{
SendMessageToPC(oTarget, badShifter);
return;
}
And then after the polymorph was provided, set the int...
//Flag as in polymorph form
SetLocalInt(OBJECT_SELF, "IOS_POLY", 1);
and then the only way to cancel is using the chat command:
else if (sSecondaryCommand == "poly") {
if(GetHasEffect(EFFECT_TYPE_POLYMORPH, oPC)==FALSE)
SendMessageToPC(oPC, "You are not currently polymorphed.");
else
{
int nHP = 20 + (GetAbilityModifier(ABILITY_CONSTITUTION, oPC) * GetHitDice(oPC));
if (GetCurrentHitPoints(oPC) < nHP)
FloatingTextStringOnCreature(badShifter, oPC, FALSE);
else
{
//if they are under DM punishment as chicken, don't let them unpoly
if(GetAppearanceType(oPC)==31)
return;
else
{
RemoveSpecificEffect(EFFECT_TYPE_POLYMORPH, oPC);
AssignCommand(oPC, ClearAllActions());
//Clean up variables
DeleteLocalInt(oPC, "IOS_POLY");
}
}
}
}
Modifié par Calvinthesneak, 14 janvier 2011 - 03:53 .