How Many Was That?

Starsword Eojek
Exile
Post #1

How Many Was That?

by Starsword Eojek » Fri Aug 14, 2009 12:03 am

After doing the giant crawler quest unsuccessfully, I decided to make a macro dedicated to counting a specific creature. I'm sure it can be edited a number of ways, and I don't know if it's been done before, but here's one I made.

Mind you it's based on the first word in a creature's name, so I'll have to fix it to include 2 words, though the macro can be edited with a [6] instead of a [5] for better specifying it's targeted critter. I'd figure out how to do more than one word at a time for Maha Slushpuppy, etc, but it's 3am, and I need sleep.

As a tip: it's Rat, not rat, or Feral, not feral.

Code: Select all

// type /trophy + first word in target creature's name to start counting how many you've killed.
//example /trophy Feral  or /trophy Rat  or /trophy Giant
//two-worded targets to come later

"/trophy"


{
   set @env.key_interrupts "true"
   set num 0
   label top
   pause 1
   set LABEL @env.textLog.word[5]
   set TARGET @text
   set KILL @env.textLog
      if LABEL < TARGET
         set num + 1
         pause 1
         message num TARGET "(s) killed\r"
      end if
   goto top
}


Starsword Eojek
Exile
Post #3

How Many Was That?

by Starsword Eojek » Fri Aug 14, 2009 12:14 pm

have a link?

xepel
Exile
Post #4

How Many Was That?

by xepel » Fri Aug 14, 2009 12:40 pm

The sentence is the link.

Starsword Eojek
Exile
Post #5

How Many Was That?

by Starsword Eojek » Fri Aug 14, 2009 1:55 pm

And so it is.

Gorvin
Exile
Post #6

How Many Was That?

by Gorvin » Fri Aug 14, 2009 5:04 pm

Sabbit and K'pyn made a kill counter macro several years ago. It tracks everything you tag, including what kind of exp it was worth (slaughter/disp/kill/vanq) and whether it was a solo or not.

Since the old clmacros site seems to be gone(?), I uploaded it -> here <-.

Killian
Exile
Post #7

How Many Was That?

by Killian » Fri Jul 23, 2010 11:40 am

Gorvin wrote:Sabbit and K'pyn made a kill counter macro several years ago. It tracks everything you tag, including what kind of exp it was worth (slaughter/disp/kill/vanq) and whether it was a solo or not.

Since the old clmacros site seems to be gone(?), I uploaded it -> here <-.

After looking over most of the macros here, Gorvin posted a critter counter that's close to what I need. However it's a bit to much for what I want. I need something simple that will post spam to the sidebar of the count for just 1 critter everytime I kill one. Exp does not matter nor does solo or helped kill. I'd change the critter name in the macro file when I needed it to be changed. Lastie counter is what i need.

And is there away to save that info when I quit the client only to resume counting when I start the client again? I'm sure a macro is already made i probably just didn't look good enough.

Magnic
Exile
Post #8

How Many Was That?

by Magnic » Fri Jul 23, 2010 12:20 pm

Killian wrote:
Gorvin wrote:Sabbit and K'pyn made a kill counter macro several years ago. It tracks everything you tag, including what kind of exp it was worth (slaughter/disp/kill/vanq) and whether it was a solo or not.

Since the old clmacros site seems to be gone(?), I uploaded it -> here <-.

After looking over most of the macros here, Gorvin posted a critter counter that's close to what I need. However it's a bit to much for what I want. I need something simple that will post spam to the sidebar of the count for just 1 critter everytime I kill one. Exp does not matter nor does solo or helped kill. I'd change the critter name in the macro file when I needed it to be changed. Lastie counter is what i need.

And is there away to save that info when I quit the client only to resume counting when I start the client again? I'm sure a macro is already made i probably just didn't look good enough.

Code: Select all

"/kt"
{
set time 0
set word @env.textLog
set dead @env.textLog.word[3]
set name @text.word[0]
set monster @text.word[1]
if word < "You slaughtered a " name " "
set time + 1
end if
if word < "You killed a " name " "
set time + 1
end if
if word < "You vanquish a " name " "
set time + 1
end if
if word < "You dispatch a " name " "
set time + 1
random no-repeat
message "* " dead " a " name " " monster " : " time "\r"
end random
end if
}
that should do it. it wont save tho.

command use: /kt moster name

Geotzou
Exile
Post #9

How Many Was That?

by Geotzou » Fri Jul 23, 2010 7:25 pm

Killian wrote:And is there away to save that info when I quit the client only to resume counting when I start the client again? I'm sure a macro is already made i probably just didn't look good enough.
As for the counting from the logs, with the caveat that logs can miss stuff and that lasties are not guaranteed from the logs, I am sure you can find something from soemone else. If you dont find such a thing let me know, I'll dust off my own counter macro that i have not used in years.

As for saving the information across runs, the answer is not as trivial. There is no "proper" way for a macro to save and reload an arbitrary amount of data from a file. That is a 11 years old program on which I am still blocked...

HOWEVER...

If your data to be saved is very small, there exist one way to save and reload it, using named items in CL. Distinguishable items, like clothing, armor, zu bags, etc, can carry a string as their name. Assuming you do have one of such items, you can store your information in there using an appropriately formed /name command and later a combination of /selectitem and @my.selected_item, then accessing the info with .word[x].

It is clunky, but it might suffice for your needs. Again, if you need help for this, let me know, I might make the effort to recode it again, as I have dumped all my sample code that was doing that kind of tricks.

Gorvin
Exile
Post #10

How Many Was That?

by Gorvin » Fri Jul 23, 2010 7:45 pm

Killian wrote:I need something simple that will post spam to the sidebar of the count for just 1 critter everytime I kill one. Exp does not matter nor does solo or helped kill. I'd change the critter name in the macro file when I needed it to be changed. Lastie counter is what i need.

And is there away to save that info when I quit the client only to resume counting when I start the client again? I'm sure a macro is already made i probably just didn't look good enough.
Here you go: http://gorvin.50webs.com/macros/LastCounter.txt

It stores the kill count on a /name-able item that you specify at the top of the macro file so that the counter can be saved between sessions. You can have your own label on the item at the same time if you want -- the counter will be stored as the first word of the item's label (for example, the item could be labeled "200 Haremau Kitten lasts" or "300 My Bad-ass Shirt").

Unfortunately it's impossible for a macro to tell the difference between a kill that you got a last hit on from a kill that you did not get the last hit on, and so the macro must count all kills. You can use the command /lasts- to decrease the counter if it counts a non-last hit, or /lasts+ to add a kill that the macro failed to pick up. Use /lastcount to turn the macro on or off.

Killian
Exile
Post #11

How Many Was That?

by Killian » Sat Jul 24, 2010 3:55 am

Thanks Guys! Gorvin, worked like a charm.

Alces
Exile
Post #12

How Many Was That?

by Alces » Tue Sep 21, 2010 8:25 am

I tried to download this last night, but it timed out.

Is anybody else having the same issue?

Lorikeet
Exile
Post #13

How Many Was That?

by Lorikeet » Tue Sep 21, 2010 8:41 am

Alces wrote:
I tried to download this last night, but it timed out.

Is anybody else having the same issue?
Website is down today--maybe you broke it ;)

Gorvin
Exile
Post #14

How Many Was That?

by Gorvin » Tue Sep 21, 2010 6:45 pm

Web host was having some issues earlier, but it is back up now.

Naferu
Exile
Post #15

How Many Was That?

by Naferu » Wed Sep 22, 2010 2:11 am

Thanks!