IF
    HPLT(Myself,1)
THEN
    RESPONSE #100
        SetGlobal("Rai1","AR0203",1)
END

IF
    NumTimesTalkedTo(0)
    Detect([PC])
THEN
    RESPONSE #100
        Wait(2)
        StartDialogueNoSet([PC])
END

IF
    Heard([ANYONE],111)
THEN
    RESPONSE #100
        MoveToObject(NearestEnemyOf(Myself))
        Continue()
END

IF
    See(NearestEnemyOf(Myself))
    !Range(NearestEnemyOf(Myself),10)
THEN
    RESPONSE #50
        ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
    RESPONSE #50
        ReallyForceSpell(NearestEnemyOf(Myself),CLERIC_CALL_LIGHTNING)
END

IF
    See(NearestEnemyOf(Myself))
    !Range(NearestEnemyOf(Myself),5)
THEN
    RESPONSE #100
        ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_CHAIN_LIGHTNING)
END

IF
    See(NearestEnemyOf(Myself))
    Range(NearestEnemyOf(Myself),5)
THEN
    RESPONSE #10
        EquipMostDamagingMelee()
        MoveToObject(NearestEnemyOf(Myself))
        AttackReevaluate(NearestEnemyOf(Myself),15)
    RESPONSE #20
        ForceSpellPoint([321.517],PHASE_SPIDER_TELEPORT)
        ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
    RESPONSE #20
        ForceSpellPoint([695.773],PHASE_SPIDER_TELEPORT)
        ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
    RESPONSE #20
        ForceSpellPoint([623.248],PHASE_SPIDER_TELEPORT)
        ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
    RESPONSE #20
        ForceSpellPoint([998.577],PHASE_SPIDER_TELEPORT)
        ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
    RESPONSE #20
        ForceSpellPoint([682.557],PHASE_SPIDER_TELEPORT)
        ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
    RESPONSE #20
        ForceSpellPoint([380.257],PHASE_SPIDER_TELEPORT)
        ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_LIGHTNING_BOLT)
    RESPONSE #10
        ForceSpell(Player1,PHASE_SPIDER_TELEPORT)
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        ForceSpell(Player2,PHASE_SPIDER_TELEPORT)
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        ForceSpell(Player3,PHASE_SPIDER_TELEPORT)
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        ForceSpell(Player4,PHASE_SPIDER_TELEPORT)
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        ForceSpell(Player5,PHASE_SPIDER_TELEPORT)
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        ForceSpell(Player6,PHASE_SPIDER_TELEPORT)
        AttackOneRound(NearestEnemyOf(Myself))
END


