Tc macro.mac

From CLUMP
Revision as of 04:04, 25 August 2010 by Mwadmin (talk | contribs) (Created page with "==Description== * Noivad's adapted tc_macro for Alternate Default series of macros. * Quick think to group, think to clan and return call (ss who just ss'd you) are implmemente...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

  • Noivad's adapted tc_macro for Alternate Default series of macros.
  • Quick think to group, think to clan and return call (ss who just ss'd you) are implmemented in this.
  • Changed from Noivad's '/tcX' invocation to use 'tg' for think to group, 'tc' for think to clan and '/tgX' invocation for group management.

Dependencies

  • Global var MySunStone and Set feedback in AlternateDefault.
  • GoScan and NoScan in AlternateDefault.

Usage

  • Save text from code section into a file called tc_macro.mac to your /clanlord/data/macros folder.

Noteworthy Techniques

  • Add shared to exiles to group - clears out current group.
  • Add/remove exiles from group via selected player in playerlist or name of exile passed.

Credits

  • Noivad.

Code

//------------------------------------------------
// tc_macro.mac  // Original by Noivad
//------------------------------------------------
// Version: 2.5.2 - Modified for use with AlternateDefault series of macros
// 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.
// 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 "tl <the message>" will
// /thinkto the last person who SSed you directly.
// New in rev2 "t?" give the current target, "ts <name> <message>" manually sets 
// the target and messages. If you just type "ts <name> it just sets the target.

// If the scanner stops after a time, just type "goscan" to start it back up.
// 
// Credit: 
// This is Noivad's original creation.
// Noivad credited: "Reye for the Idea, X for the syntax check and suggestions, 
// and everyone who direct SSed me to help debug."
//
// Revisions:
// 20070211-inu: Fixed specialized group think to section to use MySunStone variable
//               and corrected bug (note: 20080130-can't recall what I fixed there).
// 200712xx-inu: Changed call invocations for ThinkTo group from sgX series to tgX, 
//               Think to last from tc to tl, think clan from ttc to tc, think to group from sg to tg
// 20080129-inu: Modified to fit in with AlternateDefault series of macros.
// 20080130-inu: Fixed header and credits. Added equip MySunStone to all think macro calls to ensure a
//               message is sent off.

set ssTarget 		""	//you must keep these variables outside of the functions and macros
set scanBreak 		0	//they need to be global
set messageStatus 	1 	//Gives you feedback "tl target: @player"
set timeStamps 		1
set playerName 		0

set me 0

// ==========================Think Capture Options==========================
// "/t?" - Tells you who current target is for tl (thinkto last)
// "/ts <name>" - Lets you manually change the target to that passed to the macro
// "/tl" - Sends a message to the person who 'thunk' to you last.
// Use "/set feedback [on|off] to toggle between silent mode and message display mode.
/////////////////////////Sungem Additions//////////////////////////////////
//
// /tga <name> = will add one person to the thinkgroup. TGA= ThinkGroup Add
// /tga = will add the selected person ot the think group. TGAS=Think Group Add Selected
// /tgr <name> = will remove one person from the thinkgroup. TGRE=THinkGroup REmove
// /tgr = will remove the selected person from the thinkgroup.SGR=THinkGroup REmove Selected
// /tgam <name1><name> = will add multiple people." TGAM= ThinkGroup Add Multiple
// /tgs = will clear your thinkgroup and added everyone you are currently 
//        sharing with. (This sometimes fails.) TGS=ThinkGroup clear and Add Shared
// /tgc = will clear your entire thinkgroup. TGC= ThinkGroup Clear
// /tgi = inspects your MySunStone
// /tgw = will tell you who is apart of your Thinkgroup.
//
//////////////////////////Thinking to Groups/////////////////////////
//
// "tg <message>" thinks to your thinkgroup.
// "tc <message>" thinks to your clan
//
/////////////////////////////////////////////////////////////////////


"/tl"    // aka Think to last exile who SSd me directly.
{
  if @my.forehead_item != MySunStone
	setglobal fitem @my.forehead_item
	"/equip " MySunStone "\r"
	set fromTT 1
  else
    setglobal fitem @my.forehead_item
  end if
  "/thinkto " ssTarget " " @text "\r" //such simplicity belies all the ugly stuff in the Scanner section
  if modeVerbose == 1
	call ThinkToAction
  end if
  pause 2
  if fitem != @my.forehead_item
	"/equip " fitem "\r"
  end if
}

"/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 tl messaging
  if messagestatus == 1
	message "targeting: " ssTarget
  end if
  if @my.forehead_item != MySunStone
	setglobal fitem @my.forehead_item
	"/equip " MySunStone "\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
}

"tc"   //ThinkTo Clan
{
  if @my.forehead_item != MySunStone
	setglobal fitem @my.forehead_item
	"/equip " MySunStone "\r"
  end if	
  "/thinkclan " @text "\r"
}

"/tga"   //Add passed in or selected exile to ThinkTo group
{
  if @my.forehead_item != MySunStone
	setglobal fitem @my.forehead_item
	"/equip " MySunStone "\r"
  end if	
  if @text == ""
	 "/useitem " MySunStone " /add " @selplayer.simple_name "\r"
  else
	"/useitem " MySunStone " /add " @text "\r"
  end if
}

"/tgr"   //Remove passed in or selected exile to ThinkTo group
{
  if @my.forehead_item != MySunStone
	setglobal fitem @my.forehead_item
	"/equip " MySunStone "\r"
  end if	
  if @text == ""
	"/useitem " MySunStone " /remove " @text "\r"
  else
	"/useitem " MySunStone " /remove " @selplayer.simple_name "\r"
  end if
}

"/tgc"  //Clear ThinkTo Group
{
  if @my.forehead_item != MySunStone
	setglobal fitem @my.forehead_item
	"/equip " MySunStone "\r"
  end if	
  "/useitem " MySunStone " /clear \r"
}

"/tgi"   // Inspect MySunStone
{
  if @my.forehead_item != MySunStone
	setglobal fitem @my.forehead_item
	"/equip " MySunStone "\r"
  end if	
  "/useitem " MySunStone " /inspect \r"
}

"/tgw"  // List ThinkToGroup members
{
  if @my.forehead_item != MySunStone
	setglobal fitem @my.forehead_item
	"/equip " MySunStone "\r"
  end if	
  "/useitem " MySunStone " /group /who \r"
}

"tg"   //ThinkTo Group 
{
if @my.forehead_item != MySunStone
	setglobal fitem @my.forehead_item
	"/equip " MySunStone "\r"
end if
"/thinkgroup " @text "\r"
}

"/tgs" 	// clears current group and adds those you are sharing with
{ 
  "/useitem " MySunStone " /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 " MySunStone " /add " exile[counter] "\r"
		set counter + 1
		pause 1
	end if
	goto addloop
    else
        "/useitem " MySunStone " /who \r"
    end if
  end if
  label end
}

Revisions

  • 20070211-inu: Fixed specialized group think to section to use MySunStone variable and corrected bug (note: 20080130-can't recall what I fixed there).
  • 200712xx-inu: Changed call invocations for ThinkTo group from sgX series to tgX, Think to last from tc to tl, think clan from ttc to tc, think to group from sg to tg.
  • 20080129-inu: Posted. Modified to fit in with AlternateDefault series of macros. Consolidated /tgr & /tga to use passed text for group management. If no text is passed, then use selected exile in group management.
  • 20080130-inu: Fixed header and credits. Added equip MySunStone to all think macro calls to ensure a message is sent off.

Links