// I have decided to make the macros that run while afk silent.
// At least they no longer periodically say the same thing, annoying
// other exiles who hear it again and again.

"hth"       "Happy to help!\r"
"np"        "No problem.\r"
"mp"        "My pleasure.\r"
"yw"        "You're welcome!\r"
"thx"       "Thanks!\r"

'OC'        "Orga Camp"
'OE'        "orga eye"
'KB'        "Kitty Beach"
'TW'        "Tanglewood"
'NF'        "North Forest"
'SF'        "South Forest"
'NBC'       "New Bear Cave"
'OBC'       "Old Bear Cave"

f1
{
  if @my.right_item == "Caduceus"
    "/use " @splayer "\r"
  else if @my.right_item == "Caduceus"
    "/use " @splayer "\r"
  else
    "/use\r"
  end if
}
shift-f1 "/use " @splayer "\r"

f2
{
  if @my.right_item != "moonstone"
    "/equip moonstone\r"
  end if
}

shift-f2
{
  if @my.right_item != "Caduceus"
    "/equip Caduceus\r"
  end if
}

f3
{
  if @my.right_item != "chain"
    "/equip chain\r"
  end if
}

f5 "/thank " @splayer " :)\r"

f7 
{
  "/info " @splayer "\r"
  "/karma " @splayer "\r"
}

f9  "/equip sun\r"
f10 "/useitem sun /drop\r"


f11         "/act smiles\r"
shift-f11   "/act waves\r"

f12         "/yell Thoom!\r" 
shift-f12   "/yell Hello?\r"
control-f12 "/yell Help!\r"

"p"    "/ponder " @text "\r"
"w"    "/whisper " @text "\r"
"y"    "/yell " @text "\r"
"t"    "/think " @text "\r/act thinks\r"
"tt"   "/thinkto " @text "\r/act thinks to " @text.word[0] "\r"
"sit"  "/pose sit\r"
"$"    "/mone\r"

control-click
{
  "/pull " @clicksplayer "\r"
}

control-shift-click 
{
  "/push " @clicksplayer "\r"
}

shift-click
{
  if @clicksplayer != ""
    "/use " @clicksplayer "\r"
  else
    "/use " @splayer "\r"
  end if
}

"sew"
{
  if @my.left_item != "sewing kit"
    "/equip sewing kit\r"
  end if
  "/useitem sew " @text "\r"
}

"pace"
{
  set @env.key_interrupts true
  set @env.click_interrupts true
  label loopstart
    move run n
    pause 7
    move run s
    pause 7
  goto loopstart
}


"nap"
{
  set @env.key_interrupts true
  set @env.click_interrupts true
  
  //"/act takes a quick nap\r"

  label naploop
    "/pose lie\r"
    pause 420
  goto naploop 
}

"powernap"
{
  //set @env.debug true
  set @env.key_interrupts true
  set @env.click_interrupts true
  "/pose lie\r"
  "/act takes a break to heal herself\r"
  if @my.right_item != "moonstone"
    "/equip moonstone\r"
  end if

  label naploop
    "/use\r"
  pause 18
  goto naploop 
}

numpad-1 move walk sw
numpad-2 move walk s
numpad-3 move walk se
numpad-4 move walk w
numpad-5 move stop
numpad-6 move walk e
numpad-7 move walk nw
numpad-8 move walk n
numpad-9 move walk ne 

shift-numpad-1 move run sw
shift-numpad-2 move run s
shift-numpad-3 move run se
shift-numpad-4 move run w
shift-numpad-5 move stop
shift-numpad-6 move run e
shift-numpad-7 move run nw
shift-numpad-8 move run n
shift-numpad-9 move run ne

control-shift-numpad-1 "/pose stand sw\r"
control-shift-numpad-2 "/pose stand s \r"
control-shift-numpad-3 "/pose stand se\r"
control-shift-numpad-4 "/pose stand w \r"
control-shift-numpad-5 "/pose sit\r"
control-shift-numpad-6 "/pose stand e \r"
control-shift-numpad-7 "/pose stand nw\r"
control-shift-numpad-8 "/pose stand n \r"
control-shift-numpad-9 "/pose stand ne\r"

set Away 0
set NoAction 0
set HealingPose "sit"

"healpose"
{
  setglobal HealingPose @text
}

"afk"
{
  setglobal Away 1
  "/act meditates\r"
}

"back"
{
  setglobal Away 0
  "/act looks more alert now\r"
}

"heal"
{
  //Developed for letting a healer remain useful while player is afk
  //usage: heal 
  //example: heal w (makes character run into a wall to the west)
  //Only works well in safe places
  set @env.key_interrupts true
  set @env.click_interrupts true
  set direction @text
  if @my.right_item != "moonstone"
    "/equip moonstone\r"
  end if

  label movepose
    setglobal NoAction 0
    if direction != ""
      move walk direction
    end if
    if HealingPose != ""
      "/pose " HealingPose "\r"
    end if
  label loopstart
    call react
    if NoAction > 2000
      random
        "/sky\r"
      or
        "/money\r"
      end random
      goto movepose
    end if
    goto loopstart
}

react
{
  set txt @env.textLog
  set act "acting"
  if txt != lasttxt
    if txt.word[0] < @my.name
      //never mind, just something I did
    else if txt < "You just received good karma"
      "/action smiles, she likes good karma."
    else if txt < "You just received bad karma"
      "/action frowns, she didn't mean to offend anyone."
    else if txt < "is no longer sharing experiences with you."
      setglobal LastUnshare txt.word[0]
    else if txt < "You feel mentally enhanced by"
      "/action smiles, she likes sparklies."
    else if txt < "is sharing experiences with you."
      if txt.word[0] != LastUnshare
        "/action smiles, she likes sharing."
      else
        "/action notices " LastUnshare " toggling."
      end if
      if Away == 1
        "/thinkto " txt.word[0] " I can't go out for a rescue right now, but if you /pull me I can heal you."
      end if
    else if txt < "You seem to heal more effectively"
      "/act learns a lesson from Eva!"
    else if txt < "hands you"
      "/action smiles at " txt.word[0] "\r/thank " txt.word[0] " for your support"
    else if txt < "Your share is"
      if txt < "1c"
        "/money"
      else if txt < "2c"
        "/action smiles"
      else if txt < "3c"
        "/action smiles"
      else
        random
          "/thank " txt.word[1] " for the nice fur"
        or
          "/yell Nice one!"
        or
          "/action smiles"
        or
          "/action smiles at " txt.word[1]
        end random
      end if
    else if txt < "The Sun rises"
      "/ponder Ah, daylight"
    else if txt < "The Sun sets"
      "/act howls with the wolves"
    else if txt < "It's Midnight on"
      "/ponder Praise Midnight"
    else if txt.word(1) == "Crius" 
      if txt < "o'clock and all's well"
        "/act sets her watch"
      else
        set act "noact"
      end if
    else if txt < "It feels like it's"
      "/act sets her watch"
    else if txt < "You gain experience from your clanmates"
      "/act thinks fondly of her clanmates"
    else if Away == 1
      if txt < @my.name
        random no-repeat
          "/act is meditating too deeply to respond."
        or
          "/act cannot respond, but if you /pull her she will heal you."
        or
          "/act can't hear you right now, her mind is elsewhere.\r"
        end random
      else
        set act "noact"
      end if
    else
      set act "noact"
    end if  

    //If we haven't done anything yet, react to news of falling
    if act == "noact"

      if txt < "says" //Don't react if it is just someone talking about it
      else if txt < "thinks"
      else if txt < "whispers"
      else if txt < "yells"
      else if txt < "has fallen to"
        "/act notices " txt.word[0] " falling"
        set act "acting"
      else if txt < "is still fallen to"
        "/act looks a little worried about " txt.word[0]
        set act "acting"
      else if txt < "has been fallen for some time"
        "/act looks worried about " txt.word[0]
        set act "acting"
      else if txt < "is becoming part of the scenery"
        "/act looks very worried about " txt.word[0] 
        set act "acting"
      end if
    end if
    if act == "noact"
      setglobal NoAction + 1
    else
      "\r"
      setglobal NoAction 0
    end if
    setglobal lasttxt txt
  else
    setglobal NoAction + 1
  end if
}

Hosted on Puddleby.com