IF
    HPLT(Myself,1)
THEN
    RESPONSE #100
        DisplayStringHead(Myself,46363) // (tee hee hee!)
        SetGlobal("Jester1","AR0087",2)
        Polymorph(JON_IRENICUS)
END

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

IF
    Detect([PC])
    Global("prepspells","LOCALS",0)
    CheckStatLT(Myself,1,STONESKINS)
    !Dead("yself)")
THEN
    RESPONSE #100
        AttackOneRound(NearestEnemyOf(Myself))
        DisplayString(Myself,29736) // Contingency - Stoneskin
        ApplySpell(Myself,WIZARD_STONE_SKIN)
        ApplySpell(Myself,WIZARD_REFLECTED_IMAGE)
        SetGlobal("prepspells","LOCALS",1)
        Spell(NearestEnemyOf(Myself),WIZARD_FLAME_ARROW)
END

IF
    Detect([PC])
    !See([PC])
    HaveSpell(WIZARD_TRUE_SIGHT)
THEN
    RESPONSE #100
        Spell(Myself,WIZARD_TRUE_SIGHT)
END

IF
    StateCheck(Myself,STATE_SILENCED)
THEN
    RESPONSE #100
        ForceSpell(Myself,WIZARD_VOCALIZE)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_OTILUKES_RESILIENT_SPHERE)
THEN
    RESPONSE #50
        JumpToPoint([197.450])
        DisplayStringHead(Myself,33529) // Hee hee hehehehehe hehehe HEEHEE!!
        Spell(NearestEnemyOf(Myself),WIZARD_OTILUKES_RESILIENT_SPHERE)
    RESPONSE #50
        JumpToPoint([827.323])
        DisplayStringHead(Myself,33529) // Hee hee hehehehehe hehehe HEEHEE!!
        Spell(NearestEnemyOf(Myself),WIZARD_OTILUKES_RESILIENT_SPHERE)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_MONSTER_SUMMONING_1)
THEN
    RESPONSE #100
        JumpToPoint([397.614])
        DisplayStringHead(Myself,33529) // Hee hee hehehehehe hehehe HEEHEE!!
        Spell(Myself,WIZARD_MONSTER_SUMMONING_1)
    RESPONSE #100
        JumpToPoint([583.152])
        DisplayStringHead(Myself,33529) // Hee hee hehehehehe hehehe HEEHEE!!
        Spell(Myself,WIZARD_MONSTER_SUMMONING_1)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_CHAIN_LIGHTNING)
THEN
    RESPONSE #50
        JumpToPoint([297.534])
        DisplayStringHead(Myself,33529) // Hee hee hehehehehe hehehe HEEHEE!!
        Spell(NearestEnemyOf(Myself),WIZARD_CHAIN_LIGHTNING)
    RESPONSE #50
        JumpToPoint([716.258])
        DisplayStringHead(Myself,33529) // Hee hee hehehehehe hehehe HEEHEE!!
        Spell(NearestEnemyOf(Myself),WIZARD_CHAIN_LIGHTNING)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_SUN_FIRE)
    Range(NearestEnemyOf(Myself),10)
THEN
    RESPONSE #100
        Spell(NearestEnemyOf(Myself),WIZARD_SUN_FIRE)
        DisplayStringHead(Myself,5251) // Oops!
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_FIRE_SHIELD_RED)
THEN
    RESPONSE #100
        Spell(Myself,WIZARD_FIRE_SHIELD_RED)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_TENSERS_TRANSFORMATION)
THEN
    RESPONSE #50
        JumpToPoint([612.469])
        DisplayStringHead(Myself,33529) // Hee hee hehehehehe hehehe HEEHEE!!
        Spell(Myself,WIZARD_TENSERS_TRANSFORMATION)
    RESPONSE #50
        JumpToPoint([362.298])
        DisplayStringHead(Myself,33529) // Hee hee hehehehehe hehehe HEEHEE!!
        Spell(Myself,WIZARD_TENSERS_TRANSFORMATION)
END

IF
    TookDamage()
THEN
    RESPONSE #10
        DisplayStringHead(Myself,25453) // Tee-hee hee!
        JumpToPoint([197.450])
    RESPONSE #10
        DisplayStringHead(Myself,4476) //  Ah ha ha ha ha ha! 
        JumpToPoint([297.534])
    RESPONSE #10
        DisplayStringHead(Myself,5150) //  Hoo ha ha ha ha ha. 
        JumpToPoint([397.614])
    RESPONSE #10
        DisplayStringHead(Myself,25137) // Ha ha!  (snicker) (giggle)  Hoo hoo hahaha!
        JumpToPoint([612.469])
    RESPONSE #10
        DisplayStringHead(Myself,25138) // Heh... (snort)  Ha ha ha!
        JumpToPoint([362.298])
    RESPONSE #10
        DisplayStringHead(Myself,5772) // Hee hee!
        JumpToPoint([583.152])
    RESPONSE #10
        DisplayStringHead(Myself,49729) // Ha ha!  Poor nasty nasty nasty!
        JumpToPoint([716.258])
    RESPONSE #10
        DisplayStringHead(Myself,49733) // Ha ha!  That was fun!
        JumpToPoint([827.323])
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_FLAME_ARROW)
    !Range(NearestEnemyOf(Myself),10)
THEN
    RESPONSE #100
        Spell(NearestEnemyOf(Myself),WIZARD_FLAME_ARROW)
END

IF
    See(NearestEnemyOf(Myself))
    HaveSpell(WIZARD_MAGIC_MISSILE)
    !Range(NearestEnemyOf(Myself),10)
THEN
    RESPONSE #100
        Spell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
END

IF
    See(NearestEnemyOf(Myself))
THEN
    RESPONSE #10
        DisplayStringHead(Myself,25453) // Tee-hee hee!
        JumpToPoint([197.450])
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #30
        DisplayStringHead(Myself,4476) //  Ah ha ha ha ha ha! 
        JumpToPoint([297.534])
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        DisplayStringHead(Myself,5150) //  Hoo ha ha ha ha ha. 
        JumpToPoint([397.614])
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        DisplayStringHead(Myself,25137) // Ha ha!  (snicker) (giggle)  Hoo hoo hahaha!
        JumpToPoint([612.469])
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        DisplayStringHead(Myself,25138) // Heh... (snort)  Ha ha ha!
        JumpToPoint([362.298])
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        DisplayStringHead(Myself,5772) // Hee hee!
        JumpToPoint([583.152])
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        DisplayStringHead(Myself,49729) // Ha ha!  Poor nasty nasty nasty!
        JumpToPoint([716.258])
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #10
        DisplayStringHead(Myself,49733) // Ha ha!  That was fun!
        JumpToPoint([827.323])
        AttackOneRound(NearestEnemyOf(Myself))
END


