afktell.inc

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

BardsAreTooEasy
a lesser mummy
a lesser mummy
Posts: 39
Joined: Sun Feb 27, 2005 3:01 pm

afktell.inc

Post by BardsAreTooEasy » Tue Apr 12, 2005 10:07 pm

This keeps track of my tells while im afk, and will /echo them, along with the time the were sent, when i /echo tells. I use this because genbot doesn't work with tell windows, neither do any of my macros. i wrote this before i even knew about tell windows, and im to lazy to update all my hundreds of macros to utilize tell windows =). Also, if my characters evac i leave this running while they are at the Character Select screen, then i can /echo tells and see who sent me tells before my toons camed.

At the top change name1, name2, and name3 to the names of people you dont wont to log tells from.. like your genbots.

Code: Select all


#event someonetold "#1# tells you, '#2#'"
#event echotells "[MQ2] tells"

Sub Event_someonetold(someonetold,whosaid,whattheysaid)

||||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||THIS WILL KEEP TRACK OF THE TELLS|||||||
||||||||||||||PEOPLE SEND YOU, AND STORE THEM TO |||||
||||||||||||||VARIABLES. ADD A /doevents someonetold||
||||||||||||||AND A /doevents echotells TO YOUR|||||||
||||||||||||||MACRO, AND /echo tells TO SEE WHO SENT||
||||||||||||||YOU TELLS.||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||||

|Defines

/if (!${Defined[arrayvar]}) /declare arrayvar int outer 1

|If tells came from my bots, return.

	/if (${String[${whosaid}].Equal[name1]} || ${String[${whosaid}].Equal[name2]} || ${String[${whosaid}].Equal[name3]}) /return

|Otherwise set the tell to a variable, along with the time the tell was sent

	/declare tell${arrayvar} string global At ${Time} ${whosaid} told you, '${whattheysaid}'
	
		/varcalc arrayvar ${arrayvar}+1

/return



Sub Event_echotells

/if (${arrayvar}==1) {
	/echo You received no tells, looser!
	/return
}

|Defines

/if (!${Defined[totaltells]}) /declare totaltells int outer ${arrayvar}

	/varcalc totaltells ${arrayvar}-1

/if (!${Defined[currenttell]}) /declare currenttell int outer 0

|echo each tell sent along with the time

	/for currenttell 1 to ${totaltells}
	
		/echo ${tell${currenttell}}
		
		/delay 1s
		
	/next currenttell
	
	/delay 1s
	
|Delete variables so as not to repeat tells

	/varset currenttell 1
	
		/for currenttell 1 to ${totaltells}
		
			/deletevar tell${currenttell}
			
		/next currenttell

|Reset arrayvar

	/varset arrayvar 1

/return