// Goblins run away from whoever damaged them
void main()
{
    object oGoblin = OBJECT_SELF;
    object oPC = GetLastDamager();

    if(GetIsReactionTypeHostile(oPC))
    {
        ActionMoveAwayFromObject(oPC, TRUE, 40.0f);
    }
}