Post by Harkker on Oct 15, 2015 2:38:13 GMT
#include "x0_i0_petrify"
//3604 3605
void main()
{
object oPC = OBJECT_SELF;
object otarget = GetSpellTargetObject(); // returns the targeted object of the spell, if valid
location ltarget = GetSpellTargetLocation();
object oHolder = GetItemPossessor(otarget);
effect eGoFast1 = EffectMovementSpeedIncrease(99);
int ilooks = GetAppearanceType(oPC);
int isdragon;
if ( ilooks >= 376 && ilooks <= 385){ isdragon = 1;}
if ( ilooks >= 3712 && ilooks <= 3716){ isdragon = 1;}
if ( ilooks >= 3724 && ilooks <= 3728){ isdragon = 1;}
if ( ilooks >= 3736 && ilooks <= 3740){ isdragon = 1;}
if ( ilooks >= 3748 && ilooks <= 3752){ isdragon = 1;}
if ( ilooks >= 3760 && ilooks <= 3764){ isdragon = 1;}
if ( ilooks >= 1608 && ilooks <= 1612){ isdragon = 1;}
if ( ilooks >= 1620 && ilooks <= 1624){ isdragon = 1;}
if ( ilooks >= 1632 && ilooks <= 1636){ isdragon = 1;}
if ( ilooks >= 1644 && ilooks <= 1648){ isdragon = 1;}
if ( ilooks >= 1680 && ilooks <= 1684){ isdragon = 1;}
if ( ilooks >= 873 && ilooks <= 897){ isdragon = 1;}
//effect eJump = EffectDisappearAppear(ltarget);
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eJump, oPC, 3.1);
if (isdragon >= 1)
{
if (otarget!=OBJECT_SELF)
{
effect eJump = EffectDisappearAppear(ltarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eJump, oPC, 3.1);
}
if (otarget==OBJECT_SELF)
{
if(ilooks ==3712) //wyrmling
{
SetCreatureAppearanceType(oPC,872);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==872)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3712);
}
if(ilooks ==3713)//very young
{
SetCreatureAppearanceType(oPC,873);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==873)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3713);
}
if(ilooks ==3714)// young
{
SetCreatureAppearanceType(oPC,874);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==874)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3714);
}
if(ilooks ==3715)// young
{
SetCreatureAppearanceType(oPC,875);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==875)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3715);
}
if(ilooks ==3760) //wyrmling s
{
SetCreatureAppearanceType(oPC,877);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==877)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3760);
}
if(ilooks ==3761)//very young s
{
SetCreatureAppearanceType(oPC,878);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==878)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3761);
}
if(ilooks ==3762)// young s
{
SetCreatureAppearanceType(oPC,879);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==879)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3762);
}
if(ilooks ==3763)// young s
{
SetCreatureAppearanceType(oPC,880);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==880)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3763);
}
if(ilooks ==3764)// young s
{
SetCreatureAppearanceType(oPC,881);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==881)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3764);
}
}
}
}
//3604 3605
void main()
{
object oPC = OBJECT_SELF;
object otarget = GetSpellTargetObject(); // returns the targeted object of the spell, if valid
location ltarget = GetSpellTargetLocation();
object oHolder = GetItemPossessor(otarget);
effect eGoFast1 = EffectMovementSpeedIncrease(99);
int ilooks = GetAppearanceType(oPC);
int isdragon;
if ( ilooks >= 376 && ilooks <= 385){ isdragon = 1;}
if ( ilooks >= 3712 && ilooks <= 3716){ isdragon = 1;}
if ( ilooks >= 3724 && ilooks <= 3728){ isdragon = 1;}
if ( ilooks >= 3736 && ilooks <= 3740){ isdragon = 1;}
if ( ilooks >= 3748 && ilooks <= 3752){ isdragon = 1;}
if ( ilooks >= 3760 && ilooks <= 3764){ isdragon = 1;}
if ( ilooks >= 1608 && ilooks <= 1612){ isdragon = 1;}
if ( ilooks >= 1620 && ilooks <= 1624){ isdragon = 1;}
if ( ilooks >= 1632 && ilooks <= 1636){ isdragon = 1;}
if ( ilooks >= 1644 && ilooks <= 1648){ isdragon = 1;}
if ( ilooks >= 1680 && ilooks <= 1684){ isdragon = 1;}
if ( ilooks >= 873 && ilooks <= 897){ isdragon = 1;}
//effect eJump = EffectDisappearAppear(ltarget);
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eJump, oPC, 3.1);
if (isdragon >= 1)
{
if (otarget!=OBJECT_SELF)
{
effect eJump = EffectDisappearAppear(ltarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eJump, oPC, 3.1);
}
if (otarget==OBJECT_SELF)
{
if(ilooks ==3712) //wyrmling
{
SetCreatureAppearanceType(oPC,872);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==872)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3712);
}
if(ilooks ==3713)//very young
{
SetCreatureAppearanceType(oPC,873);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==873)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3713);
}
if(ilooks ==3714)// young
{
SetCreatureAppearanceType(oPC,874);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==874)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3714);
}
if(ilooks ==3715)// young
{
SetCreatureAppearanceType(oPC,875);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==875)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3715);
}
if(ilooks ==3760) //wyrmling s
{
SetCreatureAppearanceType(oPC,877);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==877)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3760);
}
if(ilooks ==3761)//very young s
{
SetCreatureAppearanceType(oPC,878);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==878)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3761);
}
if(ilooks ==3762)// young s
{
SetCreatureAppearanceType(oPC,879);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==879)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3762);
}
if(ilooks ==3763)// young s
{
SetCreatureAppearanceType(oPC,880);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==880)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3763);
}
if(ilooks ==3764)// young s
{
SetCreatureAppearanceType(oPC,881);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGoFast1, oPC);
SetLocalInt(oPC,"flying", 1);
}
if(ilooks ==881)
{
RemoveEffectOfType(oPC,EFFECT_TYPE_MOVEMENT_SPEED_INCREASE);
SetLocalInt(oPC,"flying", 0);
SetCreatureAppearanceType(oPC,3764);
}
}
}
}