generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
47
_module/nss/item_flyto_261.nss
Normal file
47
_module/nss/item_flyto_261.nss
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Fly to Location script
|
||||
|
||||
by Gaia_Werewolf
|
||||
|
||||
This script is used on an item with the "Unique Item" spell property. */
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetItemActivator();
|
||||
if (GetIsAreaInterior(GetArea(oPC)) == TRUE)
|
||||
{
|
||||
SendMessageToPC(oPC, "It is too cramped in here to fly.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetItemActivatedTarget() == oPC)
|
||||
{
|
||||
AssignCommand(oPC, ActionStartConversation(oPC, "flytoarea", TRUE, FALSE));
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if item target is valid.
|
||||
|
||||
if (GetIsObjectValid(GetItemActivatedTarget()))
|
||||
{
|
||||
SendMessageToPC(oPC, "Invalid Target");
|
||||
return;}
|
||||
|
||||
|
||||
// Next, do a Fly/Land animation and send the PC over to whereever
|
||||
// was clicked with the activated item.
|
||||
|
||||
effect eFly;
|
||||
location lTarget;
|
||||
|
||||
|
||||
lTarget = GetItemActivatedTargetLocation();
|
||||
eFly = EffectDisappearAppear(lTarget);
|
||||
|
||||
// Cutscene effects! Totally unnecessary, but eh.
|
||||
DelayCommand(2.5, FadeToBlack(oPC, FADE_SPEED_FASTEST));
|
||||
DelayCommand(4.2, FadeFromBlack(oPC, FADE_SPEED_FASTEST));
|
||||
|
||||
// Duration MUST be 3.0 or higher. Higher for busy areas.
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFly, oPC, 4.0);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user