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

64 lines
1.4 KiB
Plaintext

/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if (GetItemPossessedBy(oPC, "i_am_chicken")== OBJECT_INVALID)
return;
object oTarget;
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("wp_chicken");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "chickenlight", lTarget);
DelayCommand(10.0, FloatingTextStringOnCreature("Goooork gok gok", oPC));
oTarget = GetObjectByTag("chickenlight");
DelayCommand(120.0, DestroyObject(oTarget, 0.0));
object oItem;
oItem = GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oItem))
{
if (GetTag(oItem)=="i_am_chicken") DestroyObject(oItem);
oItem = GetNextItemInInventory(oPC);
}
DelayCommand(15.0, AssignCommand(GetObjectByTag("SigaldStormnve"), ActionSpeakString("And another brave adventurer have anoyed Col'arnesh, hehehe !")));
DelayCommand(130.0, DestroyObject(oTarget, 0.0));
oTarget = oPC;
effect eEffect;
eEffect = EffectPetrify();
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
eEffect = EffectPolymorph(POLYMORPH_TYPE_CHICKEN);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
}