/*----------------------------------------------------------------------------- tc_macro.mac Version 2.5.8 | SunGem Version 1.3.1 | ThankGroup Version 2.1.1 | shareMultiple Version 1.0.1 | ------------------------------------------------------------------------------- Description: (AKA "A Quick Reply") This macro allows you to quickly reply to anyone who thinks to you directly to you. It also manages think to groups and think to clan actions. In addition to these basic functions, you may set up groups of people to thank. ------------------------------------Usage-------------------------------------- "goscan" to start and "noscan" to stop. "goscan ?" for instructions on different commands. "t?" give the current target, "ts [message]" sets the SSTarget and optionally sends a message "tc " to think back to the SStarget "tt " to think to selected player -- added v2.5.4 SCROLL DOWN for Thinkgroup instructions ------------------------------------Setup-------------------------------------- //Mac Users: Add the line below to your default macro file //PC Users: change this file name to "tc_macro.mac" include "tc_macro.txt" //AND @login call GoScan // if you want it to strart automatically at login. --------------------------------Customization--------------------------------- Scroll down to the triggers Section to customize the triggers to your liking (i.e. You could change "tc" call ThinkToLastDirectSS TO "tb" call ThinkToLastDirectSS to symbolize "thinkback" to the last person to direct sunstone you. ------------------------------------Credit------------------------------------- Reye for the Idea, X for the syntax check and suggestions, and everyone who direct SSed me to help debug. Written in BBedit. ------------------------------------------------------------------------------- Get the Latest version at http://www.noivad.net/files/macros/tc_macro.txt ------------------------------------------------------------------------------*/ //These are the triggers that you can alter to suit your tastes "goscan" call GoScan //This scans the text log for direct SSes to you "noscan" call StopScanningTextLog /***** Think & Thinkto Triggers *****/ "t?" call WhoIsMyTarget "tf" call ToggleFeedback "tg" call ThinkToGroup "tt" call ThinkToSelected "tc" call ThinkToLastDirectSS "ts" call ThinkToThisPerson "ttc" call ThinkToClan /****** SunGemTriggers *****/ "/sga" call AddManyToSunGemGroup "/sgam" call AddManyToSunGemGroup "/sgc" call ClearSunGemGroup "/sgi" call InspectSunGem "/sgre" call RemoveFromSunGemGroup "/sgr" call RemoveFromSunGemGroup "/sgs" call SharesOutAsGroup "/sgwho" call WhoIsInMySGGroup "/sg?" call WhoIsInMySGGroup "/tga" call AddSelectedToThinkGroup /****** Thank Group Triggers ******/ "/thg" call ThankGroup "/thga" call AddToThankGroup "/thgwho" call WhoAmIThanking "/thg?" call WhoAmIThanking "/thgc" call ClearThankGroup "/thn" call ThankNext "/ths" call ThankSharers "/tn" call ThankNext /********* Other Macros *********/ "sh" call shareMultiList "/shm" call shareMultiList "shm" call shareMultiList /********* Global Variables *********/ set ssTarget "" //you must keep these variables outside of the functions and macros set myStone "Sungem" // set this to Suntone, Suncrystal or Sungem set scanBreak 0 //they need to be global set feedback 1 //Gives you feedback "tc target: @player" set timeStamps 1 // Set this to zero if you don't use timestamps set playerName 0 set me 0 set keepAlive 0 set feedback 1 set thankTarget 0 set counted 0 set thankTotal 1 set myThankGroup "" set slot 0 set slotG 0 set theMessage ":)" /* ------------------------Scanning Functions------------------------ */ GoScan { setglobal scanBreak 0 set @env.key_interrupts false //when you start you want it to loop set @env.click_interrupts false //these two lines makes sure it doesn't shut off if @text == "" if feedback == 1 message "•••Scanner On•••" message "for settings type \"goscan ?\"." pause 8 end if else if @text == "?" message "Type \"t?\" to find the target. "tc \" to send to SStarget. \"tt \" to send to selected player." pause 8 message "Type \"ts [message]\" sets the target and sends them a message if you include one." pause 8 message "Type \"/feedback\" to toggle macro feedback off|on." pause 4 message "OR \"/set feedback " pause 8 message "Type \"noscan\" to stop." end if call Scanner label scanmonitor if keepAlive == 1 pause 240 set keepAlive 0 pause 40 goto scanmonitor else if keepAlive == 2 set scanBreak 1 else pause 80 setglobal scanBreak 0 call Scanner message *Scanner recalled" goto scanmonitor end if } Scanner { label scanTop pause 1 if scanBreak == 1 goto scanEnder else setglobal keepAlive 1 set scanText @env.textLog if scanText.word[0] < "/" setglobal timeStamps 3 setglobal playerName 2 setglobal me 6 else setglobal timeStamps 1 setglobal playerName 0 setglobal me 3 end if if scanText.word[timeStamps] == "thinks" //with timestamps[3] w/o [1] if scanText < "thinks to you, \"" if ssTarget != scanText.word[playerName] //w/timestamps[2] w/o[0] if scanText.word[playerName] != @my.name setglobal ssTarget scanText.word[playerName] setglobal feedback 1 //turn on feedback for new target pause 4 end if end if if feedback == 1 //this controls overall feedback //This if block turns off feedback when the target hasn't changed if feedback == 1 message "tc target: " ssTarget setglobal feedback 0 end if end if end if else if scanText < "Captain Barnac asks, \"Ah, " set namePer @my.name set namePer + "." if scanText.word[me] == namePer pause 1 "yes\r" end if else if scanText < "Paul Deckand asks, \"Ah, " set namePer @my.name set namePer + "." if scanText.word[me] == namePer pause 1 "yes\r" end if else if scanText < "Fird Lirden asks, \"Ah, " set namePer @my.name set namePer + "." if scanText.word[me] == namePer pause 1 "yes\r" end if else if scanText < "* You don't have anything like that" if bag_number < max_bag // use "/set maxbag # to change setglobal bag_number + 1 message "*bag set to " bag_number "/equip bag of kudzu seedlings " bag_number "\r" "/useitem left \r" else if bag_number > max_bag setglobal bag_number 1 "/equip bag of kudzu seedlings " bag_number "\r" "/useitem left \r" end if pause 4 else if scanText < "No item named 'bag of kudzu seedlings" setglobal bag_number 1 "/equip bag of kudzu seedlings " bag_number "\r" else if scanText < "* Your bag of kudzu seedlings is full." setglobal bag_number - 1 if bag_number < 0 setglobal bag_number max_bag end if else if scanText < "* You do not have room in your pack for anything else." "/equip Kudzu Seedling\r" pause 1 "/usei left\r" else if scanText < "You pick up an orga eye." "/selectitem orga eye \r" "/drop orga eye \r" pause 1 else pause 1 end if setglobal gtrainerPhrase scanText call rankcount goto scanTop end if label buggy //After time some infinite loops run away Message "Bug Detected:" //on you. So, I place these messages pause 2 //in to let you know if the macro Message "**Use -esc to halt***" //has jumped out of the regular loop pause 120 //<--gives you time to escape the loop. label scanEnder set keepAlive 2 if feedback == 1 message "•••Scanner Off•••" end if setglobal keepAlive 0 } StopScanningTextLog // noscan { setglobal scanBreak 1 //This alows you to stop this macro without stopping other macros } /* ------------------------Thinking Functions------------------------ */ ThinkToSelected //tt { if @my.forehead_item != myStone setglobal fitem @my.forehead_item "/equip " myStone "\r" set fromTT 1 else setglobal fitem @my.forehead_item end if "/thinkto " @selplayer.simple_name " " @text "\r" if modeVerbose == 1 call ThinkToAction end if pause 2 if fitem != @my.forehead_item "\equip " fitem "\r" end if } ThinkToLastDirectSS //tc { if @my.forehead_item != myStone setglobal fitem @my.forehead_item "/equip " myStone "\r" set fromTT 1 else setglobal fitem @my.forehead_item end if "/thinkto " ssTarget " " @text "\r" //such simplicity belies all the ugly stuff above if modeVerbose == 1 call ThinkToAction end if pause 2 if fitem != @my.forehead_item "\equip " fitem "\r" end if } /***************************Think Capture Options***************************/ /* target who? = Who is the current target? Useful if you have activated silent mode, if you've been afk for a while or if a bug in macro language implementation causes the target to be wrong. */ WhoIsMyTarget //t? { Message " tc target: " ssTarget } /* target select = manually change your target and send a message, much like other people's "tt" macro, but this one allows you to switch to tc messaging. */ ThinkToThisPerson //ts { setglobal ssTarget @text.word[0] if feedback == 1 message "targeting: " ssTarget end if if @my.forehead_item != myStone setglobal fitem @my.forehead_item "/equip " myStone "\r" set fromTT 1 end if "/thinkto " @text "\r" if modeVerbose == 1 call ThinkToAction end if pause 2 if fitem != @my.forehead_item "\equip " fitem "\r" end if } ToggleFeedback //This toggles the macros between silent mode and message display mode. { //This is in case you don't want your text log or status area spammed if feedback == 1 setglobal feedback 0 else setglobal feedback 1 message "Messages On" end if } ThinkToClan "/thinkclan " @text "\r" //ttc /************************ Sungem Additions 1.3.1 **************************** ** "/sga " will add one person to the thinkgroup. SGA= SunGem Add ** "/tga" will add the selected person ot the think group. TGA=Target Group Add ** "/sgre " will remove one person from the thinkgroup. SGRE=SunGem REmove ** "/sgr" will remove the selected person from the thinkgroup.SGR=SunGem REmove ** "/sgam will add multiple people." SGAM= SunGem Add Multiple ** "/sgs" will clear your thinkgroup and added everyone you are currently ** sharing with. (This sometimes fails.) SGS=SunGem Set ** "/sgc" will clear your entire thinkgroup. SGC= SunGem Clear ** "/sgi" inspects your Sungem ** "/sgwho" will tell you who is apart of your Thinkgroup. /*************************Thinking to Groups****************************** ** "tg " thinks to your thinkgroup. ** "ttc " thinks to your clan ********************************************************************** */ AddSelectedToThinkGroup //tga { "/useitem Sungem /add " @selplayer.simple_name "\r" set toThank @selplayer.simple_name pause 1 setglobal myThankGroup[slotG] toThank pause 1 if debug == 1 pause 1 message "*" myThankGroup[slotG] " in thank group." end if pause 4 setglobal slotG + 1 setglobal thankTotal + 1 } RemoveFromSunGemGroup // /sgre, /sgr { if @text == "" "/useitem Sungem /remove " @selplayer.simple_name "\r" else set removed 0 label loop if removed < @text.num_words "/useitem Sungem /remove " @text.word[removed] "\r" pause 1 set removed + 1 goto loop end if end if } // SunGem Add Multiple v3.1 20081216 AddManyToSunGemGroup // /sga, /sgam { set num_people @text.num_words setglobal slot 0 if debug == 1 message "slotG="slotG end if label addloop if slot < num_people "/useitem sungem /add " @text.word[slot] "\r" setglobal mythinkgroup[slot] @text.word[slot] setglobal myThankGroup[slotG] @text.word[slot] if debug == 1 message "*mythinkgroup[" slot "]=" mythinkgroup[slot] message "*myThankGroup[" slotG "]=" myThankGroup[slotG] end if pause 1 setglobal slot + 1 setglobal thankTotal + 1 setglobal slotG + 1 goto addloop end if "/useitem " myStone " /who \r" } ClearSunGemGroup "/useitem sungem /clear \r" // /sgc InspectSunGem "/useitem sungem /inspect \r" // /sgi WhoIsInMySGGroup "/useitem sungem /who \r" // /sgwho , /sg? ThinkToGroup // /tg { if @my.forehead_item != myStone setglobal fitem @my.forehead_item "/equip " myStone "\r" end if "/thinkgroup " @text "\r" } // SunGem Add Shares v2.1 20090129 SharesOutAsGroup // /sgs { "/useitem sungem /clear \r" pause 1 set shares @my.shares_out message shares setglobal slot 0 set num_shares @my.shares_out.num_words label addloop if slot < num_shares "/useitem Sungem /add " shares.word[slot] "\r" setglobal myThankGroup[slotG] shares.word[slot] if debug == 1 pause 1 message myThankGroup[slotG] " was added to thank group." end if pause 1 setglobal slotG + 1 set slot + 1 setglobal thankTotal + 1 pause 1 goto addloop end if "/useitem " myStone " /who \r" label end } /**************************** Thank Group v2.1.1 *****************************/ ThankGroup // /thg This Thanks everyone in your thinkgroup one at a time { if @text == "reset" call ClearThankGroup goto END else if @text == "/reset" call ClearThankGroup goto END else setglobal theMessage @text end if set thankTotalAdjustment thankTotal set thankTotalAdjustment - 1 pause 1 label LOOP if thankTarget < thankTotalAdjustment call ThankNext pause 1201 goto LOOP else message "***You are out of people to thank.***" message "***To Add more type /thga [name] ..." end if message ending thanks label END } AddToThankGroup // /thga { set num_people @text.num_words setglobal slot 0 if debug == 1 message "slotG="slotG end if label addloop if slot < num_people setglobal myThankGroup[slotG] @text.word[slot] if debug == 1 message "*myThankGroup[" slotG "]=" myThankGroup[slotG] end if pause 1 setglobal slot + 1 setglobal thankTotal + 1 setglobal slotG + 1 goto addloop end if if modeverbose == 1 call WhoAmIThanking end if } ClearThankGroup // /thc { message "Clearing thank group" setglobal thankTarget 0 setglobal counted 0 setglobal thankTotal 1 setglobal myThankGroup "" setglobal slotG 0 message thankTarget "*" counted "*" thankTotal "*" myThankGroup "*" slotG "*" } ThankNext // /tn { if @Text == "" "/thank " myThankGroup[thankTarget] " thank you for being part of my group. =^)\r" else "/thank " myThankGroup[thankTarget] " " theMessage "\r" end if pause 1 if @env.TextLog < "You have no karma to give." if debug == 1 message "*Unable to give kamra to " myThankGroup[thankTarget] " holding place." end if else if @env.TextLog < "'myThankGroup[thankTarget]' is not in the lands." if debug == 1 message "*Unable to give kamra (No Target) holding place." end if message "*Add more people to your thank group. /thga [name] ...." setglobal thankTarget 0 else if thankTarget < thankTotal setglobal thankTarget + 1 end if end if if debug == 1 pause 4 message "The next person to be thanked is " myThankGroup[thankTarget] end if } WhoAmIThanking // /thgwho, /thg? { if @text == "reset" call ClearThankGroup else if @text == "/reset" call ClearThankGroup end if message "•My thank group is currently: " setglobal counted 0 set thankTotalAdjustment thankTotal set thankTotalAdjustment - 1 label LOOPSTART if counted < thankTotalAdjustment if counted == thankTarget message "[" counted "]*" myThankGroup[counted] else message "[" counted "]" myThankGroup[counted] end if setglobal counted + 1 goto LOOPSTART end if } ThankSharers // /ths { set number 0 if debug == 1 message "Shares in are " @my.shares_in message "Thank Share In Number =" @my.shares_in.num_words end if label LOOP0 if number == @my.shares_in.num_words goto END else setglobal myThankGroup[slotG] @my.shares_in.word[number] setglobal slotG + 1 set number + 1 setglobal thankTotal + 1 goto LOOP0 end if label END if debug == 1 call WhoAmIThanking end if } /* ---------------------Share Multiple People 1.0.1-------------------------- */ shareMultiple // sh { if @text == "" "/share\r" else label LOOPY if count < @text.num_words "/share " @text.word[count] "\r" setglobal myThankGroup[slotG] @text.word[count] if debug == 1 pause 1 message "*" myThankGroup[slotG] " added to thankgroup." end if set count + 1 setglobal slotG + 1 setglobal thankTotal + 1 pause 20 goto LOOPY end if end if } set listA "Yor Natas Talin Kerrah Phroon" shareMultiList { setglobal count 0 if @text == "" if debug == 1 message "No people listed. Defaulting to " listA label LOOPA if count < listA.num_words "/share " listA.word[count] "\r" setglobal myThankGroup[slotG] listA.word[count] if debug == 1 pause 1 message "*" myThankGroup[slotG] " added to thankgroup." end if set count + 1 setglobal slotG + 1 setglobal thankTotal + 1 pause 20 goto LOOPA end if else "/share\r" end if else label LOOPB if count < @text.num_words "/share " @text.word[count] "\r" setglobal myThankGroup[slotG] @text.word[count] if debug == 1 pause 1 message "*" myThankGroup[slotG] " added to thankgroup." end if set count + 1 setglobal slotG + 1 setglobal thankTotal + 1 pause 20 goto LOOPB end if end if }