// Ustawienie licznika po przyłączeniu
IF
    InParty(Myself)
    Global("ShehinaTimerStarted","GLOBAL",0)
THEN
    RESPONSE #100
        RealSetGlobalTimer("ShehinaEvereskaTimer","GLOBAL",3600) // 1 godzina czasu rzeczywistego to ok. doba w grze
        SetGlobal("ShehinaTimerStarted","GLOBAL",1)
END

// Odpalenie dialogu przy odpoczynku
IF
    InParty(Myself)
    See(Player1)
    !StateCheck(Myself,CD_STATE_NOTVALID)
    !StateCheck(Player1,CD_STATE_NOTVALID)
    PartyRested()                         // Trigger odpoczynku
    RealGlobalTimerExpired("ShehinaEvereskaTimer","GLOBAL")
    Global("ShehinaEvereskaTalk","GLOBAL",0)
    CombatCounter(0)
THEN
    RESPONSE #100
        SetGlobal("ShehinaEvereskaTalk","GLOBAL",1)
        StartDialogue("ENCIJ",Player1)
END

IF
InParty(Myself)
    See(Player1)
    !StateCheck(Myself,CD_STATE_NOTVALID)
    !StateCheck(Player1,CD_STATE_NOTVALID)
Global("ShehinaEvereskaTalk","GLOBAL",1)
RealGlobalTimerExpired("ShehinaEvereskaTimer","GLOBAL")
CombatCounter(0)
THEN
RESPONSE #100
        SetGlobal("ShehinaEvereskaTalk","GLOBAL",2)
        StartDialogue("ENCIK",Player1)
END

IF
    InParty("Shehina")
    Global("ShehinaWasInParty","LOCALS",0)
THEN
    RESPONSE #100
        SetGlobal("ShehinaWasInParty","LOCALS",1)
END

IF
    !InParty("SHEHINA")
    Global("ShehinaWasInParty","LOCALS",1)
    Global("ShehinaKickedOut","LOCALS",0)
THEN
    RESPONSE #100
        SetGlobal("ShehinaKickedOut","LOCALS",1)
        StartDialogue("ENCIP",Player1)
END