//ARCHEOLOGIST
//-------------------------------------------
//Level       Abillity
//1			Acrobacy, Use Technological Items
//2			n/a
//3			Whip Mastery
//4			n/a
//5			n/a
//6			Lore Mastery
//7         n/a
//8         n/a
//9         Lucky
//10        n/a
//11        n/a
//12        Cartography
//13        n/a
//14        n/a
//15        Danger Sense
//-----------------------------------------------------------------------------
//Danger sense skill
tmpx = selflevel
tmpy = 13          //Need level 15
IfXIsMoreThanY
  SetTargetToSelf           //Make sure the enemy is correct
  tmpargument = [NONE]      //All enemies
  AddBlipAllEnemies         //Reveal 'em all

//-----------------------------------------------------------------------------
//Carography skill
tmpx = selflevel
tmpy = 10            //Need level 12
IfXIsMoreThanY
  ShowMap
  ShowYouAreHere

//-----------------------------------------------------------------------------
// Identify special abillity
SetTargetToSelf
IfTargetIsAlive
  tmpx = targetlevel
  tmpy = 4                  //Only at level 6
  IfXIsMoreThanY
    SetTargetToTargetLeftHand
      IdentifyTarget
    SetTargetToTargetRightHand
      IdentifyTarget

//-----------------------------------------------------------------------------
//Whip mastery skill
tmpx = selflevel
tmpy = 1            //Need level 3
IfXIsMoreThanY
  IfScoredAHit
    SetTargetToLastItemUsed
      tmpargument = [WHIP]
      IfTargetHasID
        SetTargetToWhoeverWasHit
        tmpargument = 512
        DamageTarget


//-----------------------------------------------------------------------------
//Snake phobia =)
IfStateIs0
  tmpargument = [SNAK]
  tmpdistance = BLAHENEMIES+BLAHFRIENDS   //Even friendly ones!
  SetTargetToWideBlahID
    tmpargument = 12
    PlayFullSound
    tmpargument = 1
    SetState
    SendMessage
    SetTargetToSelf
    tmpargument = 5
    DazeTarget
    tmpargument = 1500		//1,5 minutes
    SetTime

    //Draw the text
    tmpdistance = 3         //Duration
    tmpargument = 8         //Message 8
    tmpturn = WHITE         //Message color
    DrawBillboard
    
IfTimeOut
  tmpargument = 0
  SetState

//-----------------------------------------------------------------------------
//Auto jump over corpses
IfBumped
  SetTargetToWhoeverBumped
  IfTargetIsAlive
    DoNothing
  Else
    tmpargument = LATCHJUMP
    PressLatchButton

//-----------------------------------------------------------------------------
//Gong sound
IfCleanedUp
  tmpargument = 2
  PlayFullSound

//-----------------------------------------------------------------------------
//Invoke Lucky skill if enough xp gained
SetTargetToSelf
tmpx = selflevel
tmpy = 7                //Need level 9
IfXIsMoreThanY
  tmpargument = 0
  IfContentIs
    SetOwnerToTarget
    EnchantTarget		//Give the special bonus
    tmpargument = 1
    SetContent

//------------------------------------------------------------------------------
//Yell at player
IfTooMuchBaggage
  tmpargument = 7
  SendMessageNear
  tmpargument = 10
  PlaySound
  tmpargument = 50		//Reuse speed
  SetReloadTime

//------------------------------------------------------------------------------
//Scream and shout
IfUsed
  tmpargument = rand % 6 + 13
  PlaySound

//------------------------------------------------------------------------------
//Handle being bored by cheering or sneezing
IfBored
  tmpargument = ACTIONMC
  DoAction
    tmpargument = 6
    SendMessageNear
    tmpargument = 11
    PlaySound

//------------------------------------------------------------------------------
//Handle death by sending a message and other stuff
IfKilled
  tmpargument = 8
  PlaySound
  tmpargument = 3
  IfArmorIs
    tmpargument = 5
  Else
    tmpargument = 0
  IfTargetIsOnSameTeam
    tmpargument = 3
    IfTargetIsSelf
      tmpargument = 4
  SendMessage

  // Drop goodies
  tmpargument = selflevel*selflevel*100
  DropMoney
  DropKeys

  // Make the character body
  tmpargument = 45
  SetBumpHeight

  //Redo the Lucky skill when respawned
  UndoEnchant
  tmpargument = 0
  SetContent

//------------------------------------------------------------------------------
//For helper AIs
IfLeaderKilled
  BecomeLeader

//------------------------------------------------------------------------------
//Handle being attacked by blocking or countering or running away
IfAttacked
  SetTargetToWhoeverAttacked
  IfTargetIsOnSameTeam
    tmpargument = 9       //"Stupid!"
    PlaySound
    tmpargument = 2
    SendMessageNear
  Else
    tmpargument = rand % 5 + 3  //Ouch!
    PlaySound

//------------------------------------------------------------------------------
End
//------------------------------------------------------------------------------
