//Name "tc_macro" (AKA "A Quick Reply") version 2.5b (+Sungem Version) // Description: // This macro allows you to quickly reply to anyone who thinks to you directly // to you. // Usage: // Use "goscan" to start and "noscan" to stop. If you type "goscan ?" // You're receive instructions on diferent commands. // While the macro is running, entering "tc " will // /thinkto the last person who SSed you directly. // New in rev2 "t?" give the current target, "ts " manually sets // the target and messages. If you just type "ts it just sets the target. // If the scanner stops after a time, just type "goscan" to astart it back up. // Setup: // Add "include "tc_macro"" and "@login call GoScan" to // your default macro file if you want it to strart automatically. // Credit: // Reye for the Idea, X for the syntax check and suggestions, // and everyone who direct SSed me to help debug. 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 messageStatus 1 //Gives you feedback "tc target: @player" set timeStamps 1 set playerName 0 set me 0 "goscan" call GoScan 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 messageStatus == 1 message "Scanner On:" pause 8 end if if @text == "?" message "Type \"t?\" to find the target." pause 8 message "Type \"ts [text]\" sets the target and sends them a message if you include one." pause 8 message "Type \"tmessages\" to toggle feedback off|on." pause 8 message "Type \"noscan\" to stop." end if call Scanner } Scanner { label scanTop pause 1 if scanBreak == 1 goto scanEnder else 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 messageStatus == 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 < 3 //change this to how many bags you have setglobal bag_number + 1 message "*bag set to " bag_number "/equip bag of kudzu seedlings " bag_number "\r" else if bag_number > 3 //change this to how many bags you have setglobal bag_number 1 "/equip bag of kudzu seedlings " bag_number "\r" end if pause 8 else if scanText < "You have no 'bag of kudzu seedlings" setglobal bag_number 1 "/equip bag of kudzu seedlings " bag_number "\r" else pause 1 end if 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 if messageStatus == 1 message "Scanner Off" end if set @env.key_interrupts true //Kludges to try to stop a run away macro set @env.click_interrupts true //Kludges pause 300 //Kludges } "noscan" { setglobal scanBreak 1 //This alows you to stop this macro without stopping other macros } "tc" { if @my.forehead_item != myStone setglobal fitem @my.forehead_item "/equip sungem \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========================== "t?" // target who? = Who is the current target? Useful if you have activated { // silent mode, if you've been afk for a Message " tc target: " ssTarget // while or if a bug in macro language } // implementation causes the target to be wrong. "ts" //target select = manually change your target and send a { //message, much like other people's "tt" macro, but this one setglobal ssTarget @text.word[0] //allows you to switch to tc messaging if messagestatus == 1 message "targeting: " ssTarget end if if @my.forehead_item != myStone setglobal fitem @my.forehead_item "/equip sungem \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 } "tmessages" //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 messageStaus == 1 setglobal messageStatus 0 else setglobal messageStatus 1 message "Messages On" end if } "ttc" "/thinkclan " @text "\r" "tgs" "/useitem Sungem /add " @selplayer.simple_name "\r" "sgr" "/useitem sungem /remove " @selplayer.simple_name "\r" "tgr" "/useitem sungem /remove " @selplayer.simple_name "\r" "sgse" "/useitem Sungem /add " @text "\r" "tgse" "/useitem Sungem /add " @text "\r" "tga" "/useitem Sungem /add " @text "\r" "sga" "/useitem Sungem /add " @text "\r" "sgre" "/useitem sungem /remove " @text "\r" "tgre" "/useitem sungem /remove " @text "\r" "sgc" "/useitem sungem /clear \r" "sgi" "/useitem sungem /inspect \r" "sgwho" "/useitem sungem /who \r" "tg" { if @my.forehead_item != myStone setglobal fitem @my.forehead_item "/equip " myStone "\r" end if "/thinkgroup " @text "\r" } "/sgs" { "/useitem sungem /clear \r" pause 1 if @text == "" "/share " @selplayer.simple_name "\r" else "/share " @text.word[0] end if pause 1 set scanText @env.textLog if scanText < "You are sharing experiences with" setglobal exile[1] scanText.word[7] if scanText.word[8] != "and" setglobal exile[2] scanText.word[8] else set skip 2 end if if scanText.word[9] != "and" setglobal exile[3] scanText.word[9] else set skip 3 end if if scanText.word[10] != "and" setglobal exile[4] scanText.word[10] else set skip 4 end if if scanText.word[11] != "and" setglobal exile[5] scanText.word[11] else set skip 5 end if if scanText.word[12] != "and" setglobal exile[6] scanText.word[12] else set skip 6 end if if scanText.word[13] != "and" setglobal exile[7] scanText.word[13] else set skip 7 end if if scanText.word[14] != "and" setglobal exile[8] scanText.word[14] else set skip 8 end if set counterLimit skip set counterLimit + 2 message counterLimit label addLoopIni pause 1 set counter 1 label addloop if counter < counterLimit if skip == counter set counter + 1 else "/useitem Sungem /add " exile[counter] "\r" set counter + 1 pause 1 end if goto addloop else "/useitem sungem /who \r" end if end if label end }