Posted by: jcompton
« on: July 17, 2006, 10:22:41 PM »
Are you saying that you just want the
~We must save your little brother post haste! He's been captured by evil orcs!.~
state to go to Alora saying
~<CHARNAME> we must save him! Please~
?
In that case, you'd do
CHAIN IF WEIGHT #-1
~InParty("G#Alora")
See("G#Alora")
!StateCheck("G#Alora",STATE_SLEEPING)
Global("AloraCousin","LOCALS",0)~ THEN G#ALOCUS AloraQuest
~Cousin Alora? Is that really you!~ DO ~SetGlobal("AloraCousin","LOCALS",1) SetGlobal("AloraCousinQuest","GLOBAL",1)~
== G#ALORAJ ~Cousin Ellis? It is you ain't it? What are you doing here?~
== G#ALOCUS ~We must save your little brother post haste! He's been captured by evil orcs!.~
END G#ALORAJ Help
But really, you don't even need the Help state at all, you can put all of this in the chain:
CHAIN IF WEIGHT #-1
~InParty("G#Alora")
See("G#Alora")
!StateCheck("G#Alora",STATE_SLEEPING)
Global("AloraCousin","LOCALS",0)~ THEN G#ALOCUS AloraQuest
~Cousin Alora? Is that really you!~ DO ~SetGlobal("AloraCousin","LOCALS",1) SetGlobal("AloraCousinQuest","GLOBAL",1)~
== G#ALORAJ ~Cousin Ellis? It is you ain't it? What are you doing here?~
== G#ALOCUS ~We must save your little brother post haste! He's been captured by evil orcs!.~
== G#ALORAJ ~<CHARNAME> we must save him! Please~
END
++ ~banter~ EXTERN G#ALORAJ no
++ ~banter~ EXTERN G#ALORAJ yes
Edit: I was mistaken originally in how I constructed the transition block in the CHAIN. When you do a transition block at the end of a CHAIN, "GOTO" is presumed to mean _within the DLG file that started the CHAIN_, not the last speaker. So we need to EXTERN G#ALORAJ instead of GOTO here, based on how you wrote the original state.