Files
HeroesStone_PRC8/_module/nss/bh_travel_jump.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

47 lines
1.2 KiB
Plaintext

// 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);
}