generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
46
_module/nss/bh_travel_jump.nss
Normal file
46
_module/nss/bh_travel_jump.nss
Normal file
@@ -0,0 +1,46 @@
|
||||
// Travel Builder
|
||||
|
||||
// Execute the shortcut jump selected in conversation
|
||||
|
||||
// Author : Proleric
|
||||
|
||||
// This script is used by conversation bh_travel.
|
||||
|
||||
// Modified : 27-Mar-2007
|
||||
|
||||
#include "bh_travel_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oCaller = OBJECT_SELF;
|
||||
int bOnlyCallerJumps = FALSE;
|
||||
int nTargetNode;
|
||||
int nOption;
|
||||
|
||||
// Clear "in conversation" status
|
||||
|
||||
DeleteLocalInt(oPC, "ptInDialog");
|
||||
|
||||
// Obtain option selected in dialog from temporary journal entry.
|
||||
|
||||
nOption = GetLocalInt(oPC, "NW_JOURNAL_ENTRY" + DUMMY_JOURNAL);
|
||||
RemoveJournalQuestEntry(DUMMY_JOURNAL, oPC, TRUE, FALSE);
|
||||
SetPanelButtonFlash(oPC, PANEL_BUTTON_JOURNAL, FALSE);
|
||||
|
||||
// Handle the situation in which the caller jumps but the PC doesn't
|
||||
|
||||
if (GetLocalInt(oPC, "ptNoPC_Travel"))
|
||||
{
|
||||
bOnlyCallerJumps = TRUE;
|
||||
oCaller = GetLocalObject(oPC, "ptCompanion");
|
||||
DeleteLocalObject(oPC, "ptCompanion");
|
||||
DeleteLocalInt (oPC, "ptNoPC_Travel");
|
||||
}
|
||||
|
||||
// Execute jump
|
||||
|
||||
nTargetNode = ptGetNodeIDForOption(oPC, nOption, bhtGetIsHorseInParty(oPC), FALSE);
|
||||
ptJumpToNode(oPC, nTargetNode, oCaller, bOnlyCallerJumps);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user