Macro for Bards

macros macros macros

Moderators: Phineas, noivad

Post Reply
User avatar
Guinness
Exile
Posts: 331
Joined: Sun Sep 11, 2005 11:21 pm
Profession: Pied Piper
Race: Fen'neko
Player Status: Spambot

Macro for Bards

Post by Guinness » Sat Oct 22, 2011 7:41 pm

Hi!

Ever get tired of typing all the commands to take instruments out from your case and put them back in and equip your music folder and sift through the pages and...

Yeah, you know..

So, here is my solution to cut down on typing all those burdensome commands:

Code: Select all

"/play"
{
  setglobal initleft @my.left_item
  setglobal initright @my.right_item
  if @text.letter[0] == "1"
    if @text.letter[1] == "0"
      if @text.letter[2] == "1"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 1\r"
	call storeinst
      end if
      if @text.letter[2] == "2"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 2\r"
	call storeinst
      end if
      if @text.letter[2] == "3"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 3\r"
	call storeinst
      end if
      if @text.letter[2] == "4"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 4\r"
	call storeinst
      end if
      if @text.letter[2] == "5"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 5\r"
	call storeinst
      end if
      if @text.letter[2] == "6"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 6\r"
	call storeinst
      end if
      if @text.letter[2] == "7"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 7\r"
	call storeinst
      end if
      if @text.letter[2] == "8"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 8\r"
	call storeinst
      end if
      if @text.letter[2] == "9"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 9\r"
	call storeinst
      end if
    end if
    if @text.letter[1] == "1"
      if @text.letter[2] == "0"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 10\r"
	call storeinst
      end if
      if @text.letter[2] == "1"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 11\r"
	call storeinst
      end if
      if @text.letter[2] == "2"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 12\r"
	call storeinst
      end if
      if @text.letter[2] == "3"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 13\r"
	call storeinst
      end if
      if @text.letter[2] == "4"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 14\r"
	call storeinst
      end if
      if @text.letter[2] == "5"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 15\r"
	call storeinst
      end if
      if @text.letter[2] == "6"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 16\r"
	call storeinst
      end if
      if @text.letter[2] == "7"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 17\r"
	call storeinst
      end if
      if @text.letter[2] == "8"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 18\r"
	call storeinst
      end if
      if @text.letter[2] == "9"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 19\r"
	call storeinst
      end if
    end if
    if @text.letter[1] == "2"
      if @text.letter[2] == "0"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 20\r"
	call storeinst
      end if
      if @text.letter[2] == "1"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 21\r"
	call storeinst
      end if
      if @text.letter[2] == "2"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 22\r"
	call storeinst
      end if
      if @text.letter[2] == "3"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 23\r"
	call storeinst
      end if
      if @text.letter[2] == "4"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 24\r"
	call storeinst
      end if
      if @text.letter[2] == "5"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 25\r"
	call storeinst
      end if
      if @text.letter[2] == "6"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 26\r"
	call storeinst
      end if
      if @text.letter[2] == "7"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 27\r"
	call storeinst
      end if
      if @text.letter[2] == "8"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 28\r"
	call storeinst
      end if
      if @text.letter[2] == "9"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 29\r"
	call storeinst
      end if
    end if
    if @text.letter[1] == "3"
      if @text.letter[2] == "0"
	call readyinst
	"/equip music folder <#1>\r"
	"/useitem left 30\r"
	call storeinst
      end if
    end if
  end if
  if @text.letter[0] == "2"
    if @text.letter[1] == "0"
      if @text.letter[2] == "1"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 1\r"
	call storeinst
      end if
      if @text.letter[2] == "2"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 2\r"
	call storeinst
      end if
      if @text.letter[2] == "3"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 3\r"
	call storeinst
      end if
      if @text.letter[2] == "4"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 4\r"
	call storeinst
      end if
      if @text.letter[2] == "5"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 5\r"
	call storeinst
      end if
      if @text.letter[2] == "6"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 6\r"
	call storeinst
      end if
      if @text.letter[2] == "7"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 7\r"
	call storeinst
      end if
      if @text.letter[2] == "8"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 8\r"
	call storeinst
      end if
      if @text.letter[2] == "9"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 9\r"
	call storeinst
      end if
    end if
    if @text.letter[1] == "1"
      if @text.letter[2] == "0"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 10\r"
	call storeinst
      end if
      if @text.letter[2] == "1"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 11\r"
	call storeinst
      end if
      if @text.letter[2] == "2"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 12\r"
	call storeinst
      end if
      if @text.letter[2] == "3"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 13\r"
	call storeinst
      end if
      if @text.letter[2] == "4"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 14\r"
	call storeinst
      end if
      if @text.letter[2] == "5"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 15\r"
	call storeinst
      end if
      if @text.letter[2] == "6"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 16\r"
	call storeinst
      end if
      if @text.letter[2] == "7"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 17\r"
	call storeinst
      end if
      if @text.letter[2] == "8"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 18\r"
	call storeinst
      end if
      if @text.letter[2] == "9"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 19\r"
	call storeinst
      end if
    end if
    if @text.letter[1] == "2"
      if @text.letter[2] == "0"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 20\r"
	call storeinst
      end if
      if @text.letter[2] == "1"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 21\r"
	call storeinst
      end if
      if @text.letter[2] == "2"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 22\r"
	call storeinst
      end if
      if @text.letter[2] == "3"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 23\r"
	call storeinst
      end if
      if @text.letter[2] == "4"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 24\r"
	call storeinst
      end if
      if @text.letter[2] == "5"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 25\r"
	call storeinst
      end if
      if @text.letter[2] == "6"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 26\r"
	call storeinst
      end if
      if @text.letter[2] == "7"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 27\r"
	call storeinst
      end if
      if @text.letter[2] == "8"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 28\r"
	call storeinst
      end if
      if @text.letter[2] == "9"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 29\r"
	call storeinst
      end if
    end if
    if @text.letter[1] == "3"
      if @text.letter[2] == "0"
	call readyinst
	"/equip music folder <#2>\r"
	"/useitem left 30\r"
	call storeinst
      end if
    end if
  end if
if @text.letter[0] == "3"
    if @text.letter[1] == "0"
      if @text.letter[2] == "1"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 1\r"
	call storeinst
      end if
      if @text.letter[2] == "2"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 2\r"
	call storeinst
      end if
      if @text.letter[2] == "3"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 3\r"
	call storeinst
      end if
      if @text.letter[2] == "4"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 4\r"
	call storeinst
      end if
      if @text.letter[2] == "5"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 5\r"
	call storeinst
      end if
      if @text.letter[2] == "6"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 6\r"
	call storeinst
      end if
      if @text.letter[2] == "7"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 7\r"
	call storeinst
      end if
      if @text.letter[2] == "8"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 8\r"
	call storeinst
      end if
      if @text.letter[2] == "9"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 9\r"
	call storeinst
      end if
    end if
    if @text.letter[1] == "1"
      if @text.letter[2] == "0"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 10\r"
	call storeinst
      end if
      if @text.letter[2] == "1"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 11\r"
	call storeinst
      end if
      if @text.letter[2] == "2"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 12\r"
	call storeinst
      end if
      if @text.letter[2] == "3"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 13\r"
	call storeinst
      end if
      if @text.letter[2] == "4"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 14\r"
	call storeinst
      end if
      if @text.letter[2] == "5"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 15\r"
	call storeinst
      end if
      if @text.letter[2] == "6"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 16\r"
	call storeinst
      end if
      if @text.letter[2] == "7"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 17\r"
	call storeinst
      end if
      if @text.letter[2] == "8"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 18\r"
	call storeinst
      end if
      if @text.letter[2] == "9"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 19\r"
	call storeinst
      end if
    end if
    if @text.letter[1] == "2"
      if @text.letter[2] == "0"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 20\r"
	call storeinst
      end if
      if @text.letter[2] == "1"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 21\r"
	call storeinst
      end if
      if @text.letter[2] == "2"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 22\r"
	call storeinst
      end if
      if @text.letter[2] == "3"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 23\r"
	call storeinst
      end if
      if @text.letter[2] == "4"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 24\r"
	call storeinst
      end if
      if @text.letter[2] == "5"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 25\r"
	call storeinst
      end if
      if @text.letter[2] == "6"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 26\r"
	call storeinst
      end if
      if @text.letter[2] == "7"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 27\r"
	call storeinst
      end if
      if @text.letter[2] == "8"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 28\r"
	call storeinst
      end if
      if @text.letter[2] == "9"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 29\r"
	call storeinst
      end if
    end if
    if @text.letter[1] == "3"
      if @text.letter[2] == "0"
	call readyinst
	"/equip music folder <#3>\r"
	"/useitem left 30\r"
	call storeinst
      end if
    end if
  end if
  "/equip " initleft "\r"
  "/equip " initright "\r"
}

readyinst
{
  if @text.word[1] == "ll"
    "/equip instrument\r"
    "/useitem instrument /remove lucky\r"
    "/equip luck\r"
    setglobal inst "lucky lyra"
  end if
  if @text.word[1] == "tor"
    "/equip instrument\r"
    "/useitem instrument /remove torjo\r"
    "/equip torjo\r"
    setglobal inst "torjo"
  end if
  if @text.word[1] == "git"
    "/equip instrument\r"
    "/useitem instrument /remove gitor\r"
    "/equip gitor\r"
    setglobal inst "gitor"
  end if
  if @text.word[1] == "rf"
    "/equip instrument\r"
    "/useitem instrument /remove reed\r"
    "/equip reed\r"
    setglobal inst "reed flute"
  end if
  if @text.word[1] == "xylo"
    "/equip instrument\r"
    "/useitem instrument /remove xylo\r"
    "/equip xylo\r"
    setglobal inst "xylo"
  end if
  if @text.word[1] == "vib"
    "/equip instrument\r"
    "/useitem instrument /remove vibra\r"
    "/equip vibra\r"
    setglobal inst "vibra"
  end if
  if @text.word[1] == "bf"
    "/equip instrument\r"
    "/useitem instrument /remove bone\r"
    "/equip bone\r"
    setglobal inst "bone flute"
  end if
  if @text.word[1] == "oca"
    "/equip instrument\r"
    "/useitem instrument /remove ocarina\r"
    "/equip ocarina\r"
    setglobal inst "ocarina"
  end if
  if @text.word[1] == "tub"
    "/equip instrument\r"
    "/useitem instrument /remove tuborn\r"
    "/equip tuborn\r"
    setglobal inst "tuborn"
  end if
  if @text.word[1] == "od"
    "/equip instrument\r"
    "/useitem instrument /remove orga drum\r"
    "/equip orga drum\r"
    setglobal inst "orga drum"
  end if
  if @text.word[1] == "bag"
    "/equip instrument\r"
    "/useitem instrument /remove bagpipe\r"
    "/equip bagpipe\r"
    setglobal inst "bagpipe"
  end if
  if @text.word[1] == "vio"
    "/equip instrument\r"
    "/useitem instrument /remove vio\r"
    "/equip vio\r"
    setglobal inst "vio"
  end if
  if @text.word[1] == "con"
    "/equip instrument\r"
    "/useitem instrument /remove con\r"
    "/equip con\r"
    setglobal inst "con"
  end if
  if @text.word[1] == "cas"
    "/equip instrument\r"
    "/useitem instrument /remove cas\r"
    "/equip cas\r"
    setglobal inst "cas"
  end if
  if @text.word[1] == "harp"
    "/equip instrument\r"
    "/useitem instrument /remove starbuck harp\r"
    "/equip starbuck harp\r"
    setglobal inst "starbuck harp"
  end if
}

storeinst
{
  if @my.left_item != instrument
    "/equip instrument\r"
  end if
  "/useitem instrument /add " inst " \r"
  "/unequip instrument\r"
}

"/ready"
{
  if @text.word[0] == "ll"
    "/equip instrument\r"
    "/useitem instrument /remove lucky\r"
    "/equip luck\r"
    setglobal inst "lucky lyra"
  end if
  if @text.word[0] == "tor"
    "/equip instrument\r"
    "/useitem instrument /remove torjo\r"
    "/equip torjo\r"
    setglobal inst "torjo"
  end if
  if @text.word[0] == "git"
    "/equip instrument\r"
    "/useitem instrument /remove gitor\r"
    "/equip gitor\r"
    setglobal inst "gitor"
  end if
  if @text.word[0] == "rf"
    "/equip instrument\r"
    "/useitem instrument /remove reed\r"
    "/equip reed\r"
    setglobal inst "reed flute"
  end if
  if @text.word[0] == "xylo"
    "/equip instrument\r"
    "/useitem instrument /remove xylo\r"
    "/equip xylo\r"
    setglobal inst "xylo"
  end if
  if @text.word[0] == "vib"
    "/equip instrument\r"
    "/useitem instrument /remove vibra\r"
    "/equip vibra\r"
    setglobal inst "vibra"
  end if
  if @text.word[0] == "bf"
    "/equip instrument\r"
    "/useitem instrument /remove bone\r"
    "/equip bone\r"
    setglobal inst "bone flute"
  end if
  if @text.word[0] == "oca"
    "/equip instrument\r"
    "/useitem instrument /remove ocarina\r"
    "/equip ocarina\r"
    setglobal inst "ocarina"
  end if
  if @text.word[0] == "tub"
    "/equip instrument\r"
    "/useitem instrument /remove tuborn\r"
    "/equip tuborn\r"
    setglobal inst "tuborn"
  end if
  if @text.word[0] == "od"
    "/equip instrument\r"
    "/useitem instrument /remove orga drum\r"
    "/equip orga drum\r"
    setglobal inst "orga drum"
  end if
  if @text.word[0] == "bag"
    "/equip instrument\r"
    "/useitem instrument /remove bagpipe\r"
    "/equip bagpipe\r"
    setglobal inst "bagpipe"
  end if
  if @text.word[0] == "vio"
    "/equip instrument\r"
    "/useitem instrument /remove vio\r"
    "/equip vio\r"
    setglobal inst "vio"
  end if
  if @text.word[0] == "con"
    "/equip instrument\r"
    "/useitem instrument /remove con\r"
    "/equip con\r"
    setglobal inst "con"
  end if
  if @text.word[0] == "cas"
    "/equip instrument\r"
    "/useitem instrument /remove cas\r"
    "/equip cas\r"
    setglobal inst "cas"
  end if
  if @text.word[0] == "harp"
    "/equip instrument\r"
    "/useitem instrument /remove starbuck harp\r"
    "/equip starbuck harp\r"
    setglobal inst "starbuck harp"
  end if
}

"/store"
{
  "/equip instrument\r"
  "/useitem instrument /add " inst " \r"
  "/unequip instrument\r"
}

"/estore"
{
  "/equip instrument\r"
  "/useitem instrument /add lucky\r"
  "/useitem instrument /add torjo\r"
  "/useitem instrument /add gitor\r"
  "/useitem instrument /add reed\r"
  "/useitem instrument /add xylo\r"
  "/useitem instrument /add vibra\r"
  "/useitem instrument /add bone\r"
  "/useitem instrument /add ocarina\r"
  "/useitem instrument /add tuborn\r"
  "/useitem instrument /add orga drum\r"
  "/useitem instrument /add bagpipe\r"
  "/useitem instrument /add vio\r"
  "/useitem instrument /add con\r"
  "/useitem instrument /add cas\r"
  "/useitem instrument /add starbuck harp\r"
  "/unequip instrument\r"
}

"/stop"
{
  "/equip instrument\r"
  "/useitem instrument /remove " inst " \r"
  "/equip " inst " \r"
  "/use /stop\r"
  "/useitem instrument /add " inst " \r"
  "/unequip instrument\r"
}

"/estop"
{
  "/equip instrument\r"
  "/useitem instrument /remove reed\r"
  "/equip reed\r"
  "/use /stop\r"
  "/useitem instrument /add reed\r"
  "/unequip instrument\r"
}


To play from music folder #1 song 17 on the vibra:
(will automatically get the vibra from the instrument case, equip the music folder, get the song going and store everything again. And it remembers the items you had equipped in your hands and re-equips them)

/play 117 vib

The first numeral is which folder, currently supporting up to three folders.

So 230 would be folder 2 song 30.
301 is folder 3 song 1.

The list of instrument commands are as follows:

ll = lucky lyra
tor = torjo
git = gitor
rf = reed flute
xylo = xylo
vib = vibra
bf = bone flute
oca = ocarina
tub = tuborn
od = orga drum
vio = violene
con = conch
cas = casserole
harp = starbuck harp

Thus /play 113 git would play folder 1 song 13 on the gitor.



Other commands are:

/ready (instrument) - Will get a instrument ready if you don't want to play from a folder
/store - Will store the last instrument taken out from the pack
/stop - will take out the insturment last used and stop playing
/estore - will go through each instrument and store everything (useful if you re-load your macros)
/estop - will take out a predetermined instrument and stop playing. I have it coded for a reed flute right now.
Grank exclaims, "Oh my, a ferocious Scavenger Bird!"

Post Reply