Alangara_PRC8/_module/nss/jh_werewolfapp.nss
Jaysyn904 86feb9ca6f Initial commit
Initial commit.
2024-06-05 21:21:06 -04:00

35 lines
1.2 KiB
Plaintext

void main()
{
object oUser = GetItemActivatedTarget();
int nApp = GetAppearanceType(oUser);
int nSpeed = GetMovementRate(oUser);
string sUname = GetName(oUser);
//Saves your appearance forever basically.
if (GetCampaignInt(sUname+"_dbwap_useonce",sUname+"_wap_useonce",oUser)!=0)
{
SetCampaignInt(sUname+"_dbwap_useonce",sUname+"_wap_useonce",1,oUser);
SetCampaignInt(sUname+"_dbwap_app",sUname+"_wap_app",nApp,oUser);
SetCampaignInt(sUname+"_dbwap_speed",sUname+"_wap_speed",nSpeed,oUser);
}
//If your a Werewolf,turn back into previous appearance.
if (GetAppearanceType(oUser)==APPEARANCE_TYPE_WEREWOLF)
{
nSpeed = GetCampaignInt(sUname+"_dbwap_speed",sUname+"_wap_speed",oUser);
nApp = GetCampaignInt(sUname+"_dbwap_app",sUname+"_wap_app",oUser);
SetCreatureAppearanceType(oUser,nApp);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectMovementSpeedIncrease(nSpeed),oUser);
}
// if not a werewolf,turn inta one!
else
{
SetCreatureAppearanceType(oUser,APPEARANCE_TYPE_WEREWOLF);
DelayCommand(0.5,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_NATURES_BALANCE),oUser));
DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_FNF_MASS_HEAL),oUser));
}
}