Readtext.mac

From CLUMP
Revision as of 04:03, 25 August 2010 by Mwadmin (talk | contribs) (Created page with "==Description== * Scans the text log and takes action depending on the contents of the captured line in the text log. ==Dependencies== * Used by Alternate Default. * Must have...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

  • Scans the text log and takes action depending on the contents of the captured line in the text log.

Dependencies

  • Used by Alternate Default.
  • Must have gTrainerPhrase variable set from calling macro.

Usage

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

Noteworthy Techniques

  • Read textlog part is captured before this is called so that additional messages don't remove what is attempting to be read.
  • Most reading of text and taking action can be done here.

Credits

  • Raul the fen.

Code

rankcount
{
if gTrainerPhrase == ""
	goto exit
end if
//------------------------------------------------
// START: Readtext.mac by Raul integration
//------------------------------------------------
	set trainer gtrainerPhrase.word[2]
	if gtrainerPhrase < "You have much to learn."
		"/ponder " @env.textLog.word[2] ": 0-9.\r"
	else if gtrainerPhrase < "It is good to see you."
		"/ponder " @env.textLog.word[2] ": 10-19.\r"
	else if gtrainerPhrase < "Your persistence is paying off."
		"/ponder " @env.textLog.word[2] ": 20-29.\r"
	else if gtrainerPhrase < "You are progressing well."
		"/ponder " @env.textLog.word[2] ": 30-39.\r"
	else if gtrainerPhrase < "You are a good pupil of mine."
		"/ponder " @env.textLog.word[2] ": 40-49.\r"
	else if gtrainerPhrase < "You are one of my better pupils."
		"/ponder " @env.textLog.word[2] ": 50-99.\r"
	else if gtrainerPhrase < "You keep me on my toes."
		"/ponder " @env.textLog.word[2] ": 100-149.\r"
	else if gtrainerPhrase < "It is hard to find more to teach you."
		"/ponder " @env.textLog.word[2] ": 150-199.\r"
	else if gtrainerPhrase < "Teaching you is a challenge."
		"/ponder " @env.textLog.word[2] ": 200-249.\r"
	else if gtrainerPhrase < "There is not much more I can teach you."
		"/ponder " @env.textLog.word[2] ": 250-299.\r"
	else if gtrainerPhrase < "Teaching you has taught me much."
		"/ponder " @env.textLog.word[2] ": 300-349.\r"
	else if gtrainerPhrase < "You have attained tremendous skill."
		"/ponder " @env.textLog.word[2] ": 350-399.\r"
	else if gtrainerPhrase < "We are nearly equals."
		"/ponder " @env.textLog.word[2] ": 400-449.\r"
	else if gtrainerPhrase < "You may be proud of your accomplishment."
		"/ponder " @env.textLog.word[2] ": 450-499.\r"
	else if gtrainerPhrase < "You are becoming a master of our art."
		"/ponder " @env.textLog.word[2] ": 500-549.\r"
	else if gtrainerPhrase < "Your dedication is commendable."
		"/ponder " @env.textLog.word[2] ": 550-599.\r"
	else if gtrainerPhrase < "You show great devotion to your studies."
		"/ponder " @env.textLog.word[2] ": 600-649.\r"
	else if gtrainerPhrase < "You are a credit to your craft."
		"/ponder " @env.textLog.word[2] ": 650-699.\r"
	else if gtrainerPhrase < "Few indeed are your peers."
		"/ponder " @env.textLog.word[2] ": 700-749.\r"
	else if gtrainerPhrase < "Your devotion to the craft is exemplary."
		"/ponder " @env.textLog.word[2] ": 750-799.\r"
	else if gtrainerPhrase < "It is always good to greet a respected colleague."
		"/ponder " @env.textLog.word[2] ": 800-899.\r"
	else if gtrainerPhrase < "You are truly a grand master."
		"/ponder " @env.textLog.word[2] ": 900-999.\r"
	else if gtrainerPhrase < "Let us search for more we might learn together."
		"/ponder " @env.textLog.word[2] ": 1000-1249.\r"
	else if gtrainerPhrase < "Your persistence is an example to us all."
		"/ponder " @env.textLog.word[2] ": 1250-1499.\r"
	else if gtrainerPhrase < "Your skill astounds me."
		"/ponder " @env.textLog.word[2] ": 1500-1749.\r"
	else if gtrainerPhrase < "You have progressed further than most."
		"/ponder " @env.textLog.word[2] ": 1750-1999.\r"
	else if gtrainerPhrase < "You are nearly peerless."
		"/ponder " @env.textLog.word[2] ": 2000+.\r"
 	end if
//------------------------------------------------
// END: Readtext.mac - trainer message by Raul integration
//------------------------------------------------
label exit
}

Revisions

  • 20080129-inu: Posted (copied) from Talk added by ?

Links