// ---------------------------------------------
// Nephele Script
// ---------------------------------------------

// Initial meeting
IF
    See(Player1)
    Range(Player1, 15)
    NumTimesTalkedTo(0)
THEN
  RESPONSE #100
    Dialogue(Player1)
END


// Dialogues
IF
    InParty(Myself)
    Global("LK#NephFriendTalks","GLOBAL",0)
THEN
  RESPONSE #100
    RealSetGlobalTimer("LK#NephFriendTalksTimer","GLOBAL",1000)
    SetGlobal("LK#NephFriendTalks","GLOBAL",1)
END

IF
    InParty(Myself)
    See(Player1)
    !StateCheck("Nephele",CD_STATE_NOTVALID)
    !StateCheck(Player1,CD_STATE_NOTVALID)
    RealGlobalTimerExpired("LK#NephFriendTalksTimer","GLOBAL")
    CombatCounter(0)
    !See([ENEMY])
    OR(4)
      Global("LK#NephFriendTalks","GLOBAL",1)
      Global("LK#NephFriendTalks","GLOBAL",3)
      Global("LK#NephFriendTalks","GLOBAL",5)
THEN
  RESPONSE #100
    MoveToObject(Player1)
    Dialogue(Player1)
END

IF
    InParty(Myself)
    See(Player1)
    RealGlobalTimerExpired("LK#NephFriendTalksTimer","GLOBAL")
    OR(4)
      Global("LK#NephFriendTalks","GLOBAL",2)
      Global("LK#NephFriendTalks","GLOBAL",4)
THEN
  RESPONSE #100
    IncrementGlobal("LK#NephFriendTalks","GLOBAL",1)
END

IF 
    InParty(Myself)
    See(Player1)
    Global("PCLooksLikeDrow","GLOBAL",1)
    Global("LK#NephFriendTalks","GLOBAL",6)
    Global("LK#NephDrowTalk","LOCALS",0)
THEN
  RESPONSE #100
    SetGlobalTimer("LK#NephDrowTalkTimer","GLOBAL",500)
    SetGlobal("LK#NephDrowTalk","LOCALS",1)
END

IF 
    InParty(Myself)
    See(Player1)
    !StateCheck("Nephele",CD_STATE_NOTVALID)
    !StateCheck(Player1,CD_STATE_NOTVALID)
    CombatCounter(0)
    !See([ENEMY])
    Global("LK#NephDrowTalk","LOCALS",1)
    GlobalTimerExpired("LK#NephDrowTalkTimer","GLOBAL")
THEN
  RESPONSE #100
    SetGlobal("LK#NephFriendTalk","GLOBAL",7)
    SetGlobal("LK#NephDrowTalk","LOCALS",2)
END

IF
    InParty(Myself)
    See(Player1)
    !StateCheck("Nephele",CD_STATE_NOTVALID)
    !StateCheck(Player1,CD_STATE_NOTVALID)
    CombatCounter(0)
    !See([ENEMY])
    Global("LK#NephFriendTalk","GLOBAL",7)
THEN
  RESPONSE #100
    MoveToObject(Player1)
    Dialogue(Player1)
END

// next is Underdark II talk