// *** Yoshimo ***
// It is always a good idea to check for the mod NPC's existence first
ACTION_IF (FILE_EXISTS_IN_GAME ~YOSHI7.CRE~) BEGIN
// Set to the number of desired script blocks to generate. The number should correlate with the
// number of defined npc_trigger/npc_action pairs.
// Empty variables will cause the generator to skip the script block.
// Important: You can not define script blocks that depend on variables or actions defined in a
// previous block, because each block is executed in the same script pass.
OUTER_SET num_npc_actions = 1
// Use the array "npc_script" to define where the script trigger/action pairs should be added to.
// You can ignore this variable if your script blocks are to be executed in the Waukeen's Promenade
// area script (AR0700.BCS).
OUTER_TEXT_SPRINT npc_script_0 ~AR0700.BCS~
// Use the array "npc_trigger" to add one or more script trigger blocks that should be evaluated
// in the area script defined in "npc_script" (Waukeen's Promenade by default) how to handle missed
// NPCs from Chateau Irenicus.
// Important: Make sure to avoid syntax error, or the installation of the mod will fail.
OUTER_TEXT_SPRINT npc_trigger_0
~!InParty("Yoshimo")
!BeenInParty("Yoshimo")
Global("MetYoshimo","GLOBAL",0)~
// Use the array "npc_action" to add one or more script action blocks that are executed in the
// area script defined in "npc_script" (Waukeen's Promenade by default) which define how to deal
// with missed NPCs from Chateau Irenicus.
// Important: Make sure to avoid syntax error, or the installation of the mod will fail.
OUTER_TEXT_SPRINT npc_action_0
~SetGlobal("MetYoshimo","GLOBAL",1)
ActionOverride("Yoshimo",SetNumTimesTalkedTo(1))
MoveGlobal("AR0406","Yoshimo",[1368.1922])~
// This variable is purely optional. It is added to the transition script block which transports
// your party to the surface. You can only set a sequence of actions without defining any triggers.
// Important: The script actions should not add any noticeable delay, so Wait(x) or similar actions
// are out of question.
OUTER_TEXT_SPRINT trans_action ~~
// Note: The addon script filename (without extension) will be used as part of a guard variable,
// so that script blocks are not executed multiple times in the same area.
END
The definitions above will result in the following script portion in AR0700.BCS:
IF
Global("A7-ShortcutEnabled","GLOBAL",1)
Global("A7-NPC-yoshimo","MYAREA",0)
!InParty("Yoshimo")
Global("MetYoshimo","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("A7-NPC-yoshimo","MYAREA",1)
SetGlobal("MetYoshimo","GLOBAL",1)
ActionOverride("Yoshimo",SetNumTimesTalkedTo(1))
MoveGlobal("AR0406","Yoshimo",[1368.1922])
Continue()
END