Okay, an example of some
NPC and PC init flirts. Here's my flirt setup with filler dialog for Cailean. (note, this stuff isn't actually appearing the mod, I just put it in to make sure the flirts mechanically work)
The Cailean init flirts would look like:
C: I'm going to start a flirt now.
(random)
C: (Cailean gives you a kiss on the cheek.)
The PC init flirt menu would look like:
C: (Cailean notices you approach.)
PC1: Hold Cailean's hand.
PC2: Kiss Cailean
PC3: Cailean, I like you very much, but please don't flirt with me anymore.
PC4: (Say nothing.)
If you choose Kiss Cailean, you'd randomly get one of the kisses.
This gets appended to the J dialog file.
APPEND FWCailej
//Cailean init flirts
IF ~Global("FWCaiDisableFlirts","GLOBAL",0)
See(Player1)
!StateCheck(Player1,STATE_SLEEPING)
CombatCounter(0)
Global("FWCaileanRomanceActive","GLOBAL",1)
Global("FWCaileanStartFlirt","GLOBAL",1)~ THEN BEGIN CaileanInitFlirts
SAY ~I'm going to start a flirt now.~
IF ~~ THEN DO ~IncrementGlobal("FWCaileanRandFlirt","LOCALS",1)~ GOTO CaileanInitHand
IF ~RandomNum(2,1)~ THEN DO ~IncrementGlobal("FWCaileanRandFlirt","LOCALS",1)~ GOTO CaileanInitKiss
IF ~RandomNum(2,2)~ THEN DO ~IncrementGlobal("FWCaileanRandFlirt","LOCALS",1)~ GOTO CaileanInitTickle
END
IF ~~ THEN BEGIN CaileanInitHand
SAY ~(Cailean takes a hold of your hand.)~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN CaileanInitKiss
SAY ~(Cailean gives you a kiss on the cheek.)~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN CaileanInitTickle
SAY ~(Cailean tickles your ribs.)~
IF ~~ THEN EXIT
END
//PC init flirts -- early
IF ~IsGabber(Player1)
CombatCounter(0)
GlobalGT("FWCaiInitLoveTalk","GLOBAL",6)
Global("FWCaileanQuestCompleted","GLOBAL",1)
Global("FWCaileanRomanceActive","GLOBAL",1)~ THEN BEGIN CaiFlirtBaseEarly
SAY ~(Cailean notices your approach.)~
+ ~RandomNum(4,1)~ + ~(Hold Cailean's hand.)~ DO ~IncrementGlobal("FWCaileanFlirtCount","LOCALS",1)~ + HandHold1
+ ~RandomNum(4,2)~ + ~(Hold Cailean's hand.)~ DO ~IncrementGlobal("FWCaileanFlirtCount","LOCALS",1)~ + HandHold2
+ ~RandomNum(4,3)~ + ~(Hold Cailean's hand.)~ DO ~IncrementGlobal("FWCaileanFlirtCount","LOCALS",1)~ + HandHold3
+ ~RandomNum(4,4)~ + ~(Hold Cailean's hand.)~ DO ~IncrementGlobal("FWCaileanFlirtCount","LOCALS",1)~ + HandHold1
+ ~RandomNum(4,1)~ + ~(Kiss Cailean.)~ DO ~IncrementGlobal("FWCaileanFlirtCount","LOCALS",1)~ + Kiss1
+ ~RandomNum(4,2)~ + ~(Kiss Cailean.)~ DO ~IncrementGlobal("FWCaileanFlirtCount","LOCALS",1)~ + Kiss2
+ ~RandomNum(4,3)~ + ~(Kiss Cailean.)~ DO ~IncrementGlobal("FWCaileanFlirtCount","LOCALS",1)~ + Kiss3
+ ~RandomNum(4,4)~ + ~(Kiss Cailean.)~ DO ~IncrementGlobal("FWCaileanFlirtCount","LOCALS",1)~ + Kiss4
++ ~Cailean, I like you very much, but please don't flirt with me anymore.~ DO ~SetGlobal("FWCaiDisableFlirts","GLOBAL",1)~ EXIT
++ ~(Say nothing.)~ EXIT
END
IF ~~ THEN BEGIN HandHold1
SAY ~Cailean holds your hand 1.~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN HandHold2
SAY ~Cailean holds your hand 2.~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN HandHold3
SAY ~Cailean holds your hand 3.~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN Kiss1
SAY ~Cailean kisses you 1.~
= ~It's a really long kiss.~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN Kiss2
SAY ~Cailean kisses you 2.~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN Kiss3
SAY ~Cailean asks about the kiss~
++ ~Kiss answer 1.~ + Kiss3_1
++ ~Kiss answer 2.~ + Kiss3_2
++ ~Kiss answer 3.~ + Kiss3_3
END
IF ~~ THEN BEGIN Kiss3_1
SAY ~Cailean kisses you 3_1~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN Kiss3_2
SAY ~Cailean kisses you 3_2~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN Kiss3_3
SAY ~Cailean kisses you 3_3.~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN Kiss4
SAY ~(Cailean kisses you 4.)~
IF ~~ THEN EXIT
END
END
These script blocks get added to Cailean's script and are for triggering the Cailean init flirts.
//Resets Cailean's flirt timer if in combat
IF
RealGlobalTimerExpired("FWCaileanFlirtTimer","LOCALS")
!CombatCounter(0)
THEN
RESPONSE #100
SetGlobal("FWCaileanStartFlirt","GLOBAL",0)
RealSetGlobalTimer("FWCaileanFlirtTimer","LOCALS",100)
END
//Cailean flirts with PC
IF
RealGlobalTimerExpired("FWCaileanFlirtTimer","LOCALS")
Global("FWCaileanStartFlirt","GLOBAL",0)
Global("FWCaiDisableFlirts","GLOBAL",0)
InParty(Myself)
!StateCheck(Player1,STATE_SLEEPING)
Global("FWCaileanRomanceActive","GLOBAL",1)
See(Player1)
CombatCounter(0)
!See([ENEMY])
!Range([NEUTRAL],10)
THEN
RESPONSE #100
SetGlobal("FWCaileanStartFlirt","GLOBAL",1)
StartDialogueNoSet(Player1)
Wait(1)
END
//Reset flirt timer after flirting
IF
RealGlobalTimerExpired("FWCaileanFlirtTimer","LOCALS")
Global("FWCaileanStartFlirt","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("FWCaileanStartFlirt","GLOBAL",0)
RealSetGlobalTimer("FWCaileanFlirtTimer","LOCALS",1500)
END
//Start flirt timer for first time
IF
Global("FWCaileanFlirtsStarted","LOCALS",0)
GlobalGT("FWCaiInitLoveTalk","GLOBAL",4)
OR(2)
Global("FWCaileanRomanceActive","GLOBAL",1)
Global("FWCaileanRomanceActive","GLOBAL",2)
THEN
RESPONSE #100
SetGlobal("FWCaileanFlirtsStarted","LOCALS",1)
RealSetGlobalTimer("FWCaileanFlirtTimer","LOCALS",600)
END