ranger tracking macro?

macros macros macros

Moderators: Phineas, noivad

Post Reply
User avatar
Super Chicken
Noble
Posts: 964
Joined: Mon Oct 13, 2003 4:27 pm
Location: Bawk!
Contact:

ranger tracking macro?

Post by Super Chicken » Fri Dec 04, 2009 1:42 am

anyone have a ranger tracking macro? I'm using one made by Tip'ii but it has some bugs
Change your sig to support Chicken Glory!

User avatar
noivad
Order of the White Elephant
Order of the White Elephant
Posts: 3327
Joined: Wed Oct 08, 2003 4:04 pm
Profession: Fighter
Race: Sylvan
Player Status: Active
Location: SF Bay Area
Contact:

Re: ranger tracking macro?

Post by noivad » Fri Dec 04, 2009 2:12 pm

Post it and we can see where the bugs are.
http://www.clanlord.net/
Org Du Lac's bestiary: http://bestiary.clanlord.net/index.html
Gil Galad’s Pirates http://pirates.clanlord.net/ & Ranger Studies: http://studies.clanlord.net/
?security warning:View cert•CL players assess valid by refs

User avatar
Super Chicken
Noble
Posts: 964
Joined: Mon Oct 13, 2003 4:27 pm
Location: Bawk!
Contact:

Re: ranger tracking macro?

Post by Super Chicken » Fri Dec 04, 2009 3:48 pm

Code: Select all

"tr"
 {
 set fullname ""
 "/equip belt\r"
 if @text.word[0] == "kit"
  set fullname "Haremau Kitten"
 else if @text.word[0] == "rud"
  set fullname "Rudremau"
 else if @text.word[0] == "cc"
  set fullname "Cave Cobra"
 else if @text.word[0] == "ck"
  set fullname "Corpse Knight"
 else if @text.word[0] == "bs"
  set fullname "Blight Shade"
 else if @text.word[0] == "bee"
  set fullname "Carrion Beetle"
 else if @text.word[0] == "bf"
  set fullname "Blight Feral"
 else if @text.word[0] == "tbf"
  set fullname "Trained Barrens Feral"
 else if @text.word[0] == "sbf"
  set fullname "Starved Blight Feral"
 else if @text.word[0] == "ds"
  set fullname "Darshak Spirit"
 else if @text.word[0] == "bw"
  set fullname "Darshak Bloodwrath"
 else if @text.word[0] == "db"
  set fullname "Darshak Brava"
 else if @text.word[0] == "test"
  set fullname "test"
  set fullname @text.word[0]
 end if

 "/usei belt /track " fullname "\r"
 pause 2
 if @env.textLog.word[4] == "fail"
  "No " fullname " nearby\r"
 else if @env.textLog.word[4] == "begin"
  "Follow me to " fullname "\r"
 else
  "/ponder hmmmm\r"
 end if
 } 
Change your sig to support Chicken Glory!

User avatar
noivad
Order of the White Elephant
Order of the White Elephant
Posts: 3327
Joined: Wed Oct 08, 2003 4:04 pm
Profession: Fighter
Race: Sylvan
Player Status: Active
Location: SF Bay Area
Contact:

Re: ranger tracking macro?

Post by noivad » Fri Dec 04, 2009 4:26 pm

Super Chicken wrote:

Code: Select all

"tr"
 {
 set fullname ""
 "/equip belt\r"
 if @text.word[0] == "kit"
  set fullname "Haremau Kitten"
 else if @text.word[0] == "rud"
  set fullname "Rudremau"
 else if @text.word[0] == "cc"
  set fullname "Cave Cobra"
 else if @text.word[0] == "ck"
  set fullname "Corpse Knight"
 else if @text.word[0] == "bs"
  set fullname "Blight Shade"
 else if @text.word[0] == "bee"
  set fullname "Carrion Beetle"
 else if @text.word[0] == "bf"
  set fullname "Blight Feral"
 else if @text.word[0] == "tbf"
  set fullname "Trained Barrens Feral"
 else if @text.word[0] == "sbf"
  set fullname "Starved Blight Feral"
 else if @text.word[0] == "ds"
  set fullname "Darshak Spirit"
 else if @text.word[0] == "bw"
  set fullname "Darshak Bloodwrath"
 else if @text.word[0] == "db"
  set fullname "Darshak Brava"
 else if @text.word[0] == "test"
  set fullname "test"
  set fullname @text.word[0]
 end if

 "/usei belt /track " fullname "\r"
 pause 2
 if @env.textLog.word[4] == "fail"
  "No " fullname " nearby\r"
 else if @env.textLog.word[4] == "begin"
  "Follow me to " fullname "\r"
 else
  "/ponder hmmmm\r"
 end if
 } 
Where does it error out? The code looks good. If what you're talking about is when 2 messages come in at once and the macro misses the tracking feedback then there's no way around that :(.
http://www.clanlord.net/
Org Du Lac's bestiary: http://bestiary.clanlord.net/index.html
Gil Galad’s Pirates http://pirates.clanlord.net/ & Ranger Studies: http://studies.clanlord.net/
?security warning:View cert•CL players assess valid by refs

User avatar
Super Chicken
Noble
Posts: 964
Joined: Mon Oct 13, 2003 4:27 pm
Location: Bawk!
Contact:

Re: ranger tracking macro?

Post by Super Chicken » Fri Dec 04, 2009 4:29 pm

well it seems to go to the end a lot. with the /ponder Hmm. thing when nothing else works out. Isn't there a simple way to make it so it shows the tracked creature or the failured to track creature message? 8/ because those two always come up. there's never the third "/ponder Hmm." option in CL, only in the macro.
Change your sig to support Chicken Glory!

User avatar
noivad
Order of the White Elephant
Order of the White Elephant
Posts: 3327
Joined: Wed Oct 08, 2003 4:04 pm
Profession: Fighter
Race: Sylvan
Player Status: Active
Location: SF Bay Area
Contact:

Re: ranger tracking macro?

Post by noivad » Fri Dec 04, 2009 4:56 pm

Yeah, that's a limitation of the macro language: not every message can be scanned because of the way the text log is filled. If two messages coming in simultaneously, the first one is skipped, and never scanned.
http://www.clanlord.net/
Org Du Lac's bestiary: http://bestiary.clanlord.net/index.html
Gil Galad’s Pirates http://pirates.clanlord.net/ & Ranger Studies: http://studies.clanlord.net/
?security warning:View cert•CL players assess valid by refs

Geotzou
Exile
Posts: 210
Joined: Wed May 04, 2005 9:22 am

Re: ranger tracking macro?

Post by Geotzou » Sat Jan 09, 2010 2:24 pm

Super Chicken wrote:well it seems to go to the end a lot. with the /ponder Hmm. thing when nothing else works out. Isn't there a simple way to make it so it shows the tracked creature or the failured to track creature message? 8/ because those two always come up. there's never the third "/ponder Hmm." option in CL, only in the macro.
Noivad explained to you the basic cause of the problem perfectly well.

Simple solution is to remove the /ponder line entirely and scan the text log whenever the macro "says" nothing.

Ugly but sightly more effective solution is to pause 1, check, pause 1, check, pause 1, check, and if none of the 3 above checks has given an answer, then you still faced the multi-line problem and should keep silent as per the simple solution.

Other solutions are beyond the realm of this forum.

Tip'ii
Exile
Posts: 319
Joined: Thu Jan 25, 2007 3:13 am
Profession: Ranger
Race: Fen'neko
Player Status: Spambot
Location: Metz
Contact:

Re: ranger tracking macro?

Post by Tip'ii » Tue Feb 23, 2010 12:47 pm

Super Chicken wrote:anyone have a ranger tracking macro? I'm using one made by Tip'ii but it has some bugs
How dare you say I have bugs?!?! hehe

you might be having issues because you took out the "else" case...

else
set fullname @text.word[0]
end if

or, it looks like you changed it to some sort of test case. What are you trying to test with that?

the reason behind the else case is that I have 50+ critters I can track, but don't do so often enough to warrant coding an abbreviation for them. so with my version I can "tr rajayorilla" and it falls into the else case and gets tracked. of course, you have to spell the critter correctly.

Here is the version I use (pretty obvious we hunt different areas!!!):

Code: Select all

"tr"
	{
	set fullname ""
	"/equip belt\r"
	if @text.word[0] == "vp"
		set fullname "Valley Panther"
	else if @text.word[0] == "vc"
		set fullname "Valley Cougar"
	else if @text.word[0] == "kit"
		set fullname "Haremau Kitten"
	else if @text.word[0] == "cmr"
		set fullname "Cave Maha Ruknee"
	else if @text.word[0] == "rud"
		set fullname "Rudremau"
	else if @text.word[0] == "hare"
		set fullname "Haremau"
	else if @text.word[0] == "fury"
		set fullname "Orga Fury"
	else if @text.word[0] == "wrath"
		set fullname "Orga Wrath"
	else if @text.word[0] == "frenzy"
		set fullname "Orga Frenzy"
	else if @text.word[0] == "hate"
		set fullname "Orga Hatred"
	else if @text.word[0] == "nw"
		set fullname "Night Wendecka"
	else if @text.word[0] == "sas"
		set fullname "Young Sasquatch"
	else if @text.word[0] == "mg"
		set fullname "Mud Golem"
	else if @text.word[0] == "yor"
		set fullname "Yorilla"
	else if @text.word[0] == "conf"
		set fullname "Confused Yorilla"
	else if @text.word[0] == "madz"
		set fullname "Madzume Yorilla"
	else if @text.word[0] == "dv"
		set fullname "Death Vermine"
	else if @text.word[0] == "ldv"
		set fullname "Large Death Vermine"
	else if @text.word[0] == "ff"
		set fullname "Flying Foxweir"
	else if @text.word[0] == "cc"
		set fullname "Cave Cobra"
	else if @text.word[0] == "bm"
		set fullname "Black Mamba"
	else if @text.word[0] == "olive"
		set fullname "Olive Tok'Han"
	else if @text.word[0] == "green"
		set fullname "Green Tok'Han"
	else if @text.word[0] == "lime"
		set fullname "Lime Tok'Han"
	else if @text.word[0] == "em"
		set fullname "Emerald Tok'Han"
	else
		set fullname @text.word[0]
	end if

	"/usei belt /track " fullname "\r"
	pause 2
	if @env.textLog.word[4] == "fail"
		"No " fullname " nearby\r"
	else if @env.textLog.word[4] == "begin"
		"Follow me to " fullname "\r"
	else
		"/ponder hmmmm\r"
	end if
	}

TreeBeard
Exile
Posts: 484
Joined: Mon Aug 23, 2004 10:52 am
Location: Hiding in the woods
Contact:

Re: ranger tracking macro?

Post by TreeBeard » Thu Jan 31, 2013 9:04 pm

Here is my super short, type anythign macro.. I use ts to do the short hand ones like we have posted here.. i.e. "ts h" tracks hellebore, but "tr Swamp Feral" will track a swamp feral



"tr"
{
set fullname ""
"/equip belt\r"

"/useitem belt /track "@text.phrase[0]" \r

end if
}
unoffensive quote here

User avatar
warawonda
Exile
Posts: 230
Joined: Fri Feb 11, 2011 8:39 pm
Profession: Mystic
Race: Sylvan
Player Status: Spambot
Location: Puzzle Island

Re: ranger tracking macro?

Post by warawonda » Mon Feb 11, 2013 2:59 pm

@text.word[3]

[0] = time
[1] = name
[2] = first word.
[3] = next word, and so on.

isnt it?
the rich get richer, and the poor get poorer; enter clanlord, and they wonder why no one new joins and stays on

User avatar
Kinon
Exile
Posts: 64
Joined: Thu Dec 21, 2006 1:22 pm
Profession: Ranger
Race: Fen'neko
Player Status: Spambot
Contact:

Re: ranger tracking macro?

Post by Kinon » Tue Feb 12, 2013 1:08 pm

Code: Select all

@login {

label bawk
"Bawk!\r"
message "I don't take bawk from no one!"
goto bawk

}
I'll see myself out.

User avatar
noivad
Order of the White Elephant
Order of the White Elephant
Posts: 3327
Joined: Wed Oct 08, 2003 4:04 pm
Profession: Fighter
Race: Sylvan
Player Status: Active
Location: SF Bay Area
Contact:

Re: ranger tracking macro?

Post by noivad » Thu Feb 28, 2013 2:09 am

warawonda wrote:@text.word[3]

[0] = time
[1] = name
[2] = first word.
[3] = next word, and so on.

isnt it?
no. @text refers to what the player types. & @text.word[0] refers to the first word after the trigger word.
So, in “ /go /setoption verbose on ” “/go” is not in the @text array, @text.word[0] is “/setoption” and “on” is @text.word[2].

What you are thinking of is the @env.textLog.
Also, since people can turn on or off the timestamp, you need to also either change the reference to one prior or one later, or you need to scan for a timestamp (at log in preferably) and store that info in a variable. In fact that's exactly what I did years ago. Here is the timestamp checking macro if anyone wants it. Basically it checks if the first character of the first word is a number, if not, then timestamps are off. There is no way that I know of to make the first character a number without timestamps. So, until a way is added, this will work, then use this messageStart to add to the word selection.

Code: Select all

//this is a global variable
set messageStart 0
time_stamp_check
{
set TextToCheck @env.textLog.word[0].letter[0]
message "text to check is: " TextToCheck
if  TextToCheck > 0
     setglobal messageStart 2 
     message "*time stamps are On"
else 
     message "*time stamps are off"
end if
 message "type '/set ?' for optional settings"  //this is a different macro not included in this example
}
http://www.clanlord.net/
Org Du Lac's bestiary: http://bestiary.clanlord.net/index.html
Gil Galad’s Pirates http://pirates.clanlord.net/ & Ranger Studies: http://studies.clanlord.net/
?security warning:View cert•CL players assess valid by refs

Post Reply