A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.
Moderator: MacroQuest Developers
-
wilso132
- Contributing Member

- Posts: 106
- Joined: Thu Oct 17, 2002 11:53 am
Post
by wilso132 » Sun Dec 28, 2003 1:31 am
Edit: Now works with full names.
I know a lot of people run AFK spawnchecking macros that beep so they wake up, but a lot of people probably need even that simple code posted (just had to give it to a friend of mine... so figured I'd post it here).
Code: Select all
| Spawnchecker macro by wilso132
| USAGE: /macro spawncheck <spawn_name> <# of times to beep>
| e.g. /macro spawncheck frenzied 20 will check for something with the
| name "frenzied" and beep 20 times
Sub Main
/declare alertlistno_ global
/declare spawn_name global
/declare x global
/declare num_of_beeps global
/varset x 0
/varset alertlistno_ 9
/varset spawn_name "@Param0"
/varset num_of_beeps @Param1
/echo Going to beep @num_of_beeps times when "@spawn_name" spawns.
/alert clear alertlistno_
/alert add alertlistno_ npc radius 10000 "@spawn_name"
:TOP
/if $alert(alertlistno_)==TRUE {
/w npc @spawn_name
/echo Matches your criteria of "@spawn_name"
/echo Time of spawn is $time(h):$time(m)
/for x 0 to @num_of_beeps
/beep
/next x
/return
} else {
/goto :TOP
}
/return
Here's the code for time of corpse appearing/disappearing (it's untested, because I'm posting it from a computer on campus... let me know if it's bugged).
Code: Select all
| Spawnchecker macro by wilso132
| USAGE: /macro spawncheck <spawn_name> <# of times to beep>
| e.g. /macro spawncheck frenzied 20 will check for something with the
| name "frenzied" and beep 20 times
Sub Main
/declare alertlistno_ global
/declare spawn_name global
/declare x global
/declare num_of_beeps global
/varset x 0
/varset alertlistno_ 9
/varset spawn_name "@Param0"
/varset num_of_beeps @Param1
/echo Going to beep @num_of_beeps times when "@spawn_name" spawns.
/alert clear alertlistno_
/alert add alertlistno_ npc radius 10000 "@spawn_name"
:TOP
/if $alert(alertlistno_)==TRUE {
/w npc @spawn_name
/echo Matches your criteria of "@spawn_name"
/echo Time of spawn is $time(h):$time(m)
/for x 0 to @num_of_beeps
/beep
/next x
/goto :Check_for_death
} else {
/goto :TOP
}
:Check_for_death
/if n $searchspawn("@spawn_name's corpse")==1 {
/echo @spawn_name's corpse appeared at $time(h):$time(m)
} else {
/goto :Check_for_death
}
:Check_for_corpse_poof
/if n $searchspawn("@spawn_name's corpse")==0 {
/echo @spawn_name's corpse disappeared at $time(h):$time(m)
/return
} else {
/goto :Check_for_corpse_poof
}
/return
Last edited by
wilso132 on Thu Jan 08, 2004 11:28 am, edited 12 times in total.
-
Dniper
- a lesser mummy

- Posts: 71
- Joined: Tue Nov 25, 2003 2:54 pm
Post
by Dniper » Sun Dec 28, 2003 1:54 pm
Thanks wilso, this is much better then the thing I created for myself.
Nice work. :)
-
Marioario
- decaying skeleton

- Posts: 5
- Joined: Thu Dec 25, 2003 11:12 pm
Post
by Marioario » Sun Dec 28, 2003 10:02 pm
Nice Work, Bro.
Thanks :)
-
battaile
- Contributing Member

- Posts: 40
- Joined: Tue Dec 09, 2003 10:55 am
Post
by battaile » Sun Jan 04, 2004 2:33 pm
Thanks, this is way better than the one I'd hacked together. I added this line right after the beeps for when I fall asleep and miss my mob:
Code: Select all
/echo spawned at $time(h):$time(m)
Also made this cosmetic change just so I can make sure I typed things in right:
Code: Select all
/echo Going to beep @num_of_beeps times when [b]"@spawn_name"[/b] spawns.
(instead of using the literal spawn_name)
Thanks again, this really helps!
-
wilso132
- Contributing Member

- Posts: 106
- Joined: Thu Oct 17, 2002 11:53 am
Post
by wilso132 » Sun Jan 04, 2004 4:10 pm
Kinda funny you put in the
Code: Select all
/echo spawned at $time(h):$time(m)
I actually put that one in mine also for when the mob was being camped but I wanted to put it on a timer :)
-
Zelker
- a lesser mummy

- Posts: 38
- Joined: Fri Jan 03, 2003 3:01 pm
Post
by Zelker » Mon Jan 05, 2004 12:18 am
Great macro. Would it be possible to find the time the mob is killed by trying to target its corpse? I figure it would take a little bit of time for some one to loot the corpse and we would be able to find the time of death of said mob.
-z
-
battaile
- Contributing Member

- Posts: 40
- Joined: Tue Dec 09, 2003 10:55 am
Post
by battaile » Mon Jan 05, 2004 11:51 am
Zelk - I'm at work so I cant try this out but I think it should work:
Code: Select all
/if $alert(alertlistno_)==TRUE {
/w npc @spawn_name
/echo Matches your criteria of @spawn_name
/for x 0 to @num_of_beeps
/beep
/next x
[color=red]
despawnLoop:
/if $alert(alertlistno_)==FALSE
/echo @spawn_name killed or despawned at $time(h):$time(m)
else
goto :despawnLoop[/color]
/return
-
battaile
- Contributing Member

- Posts: 40
- Joined: Tue Dec 09, 2003 10:55 am
Post
by battaile » Mon Jan 05, 2004 12:21 pm
Actually I guess that's just gonna tell you when it despawned, or the corpse poofed (since I
think the corpse will also trigger the alert). If you always entered the fullname of the spawn you're checking, you could do something like the following (may have syntax way off, again, cant check this out from work =/ )
Code: Select all
Sub Main
/declare alertlistno_ global
/declare spawn_name global
/declare x global
/declare num_of_beeps global
[color=red]/declare corpseName[/color]
/varset x 0
/varset alertlistno_ 9
/varset spawn_name "@Param0"
/varset num_of_beeps @Param1
[color=red]/varset corpseName "@spawn_name"
| Unsure on this syntax, basically just trying to concatenate the string.
/varcat corpseName "'s corpse" [/color]
/echo Going to beep @num_of_beeps times when spawn_name spawns.
/alert clear alertlistno_
/alert add alertlistno_ npc radius 10000 "@spawn_name"
:TOP
/if $alert(alertlistno_)==TRUE {
/w npc @spawn_name
/echo Matches your criteria of @spawn_name
/for x 0 to @num_of_beeps
/beep
/next x
[color=red] despawnLoop:
/if $alert(alertlistno_)==FALSE
/echo @spawn_name killed or despawned at $time(h):$time(m)
else /if n $searchspawn("@corpseName")!=0
/echo @spawn_name killed at $time(h):$time(m)
else
goto :despawnLoop [/color]
/return
} else {
/goto :TOP
}
/return
This wont work if you do like me and only enter a partial name for the spawn, though.
edit - Think its fixed...
Last edited by
battaile on Wed Jan 07, 2004 6:27 pm, edited 3 times in total.
-
3boxer
- orc pawn

- Posts: 15
- Joined: Fri Dec 12, 2003 11:12 am
Post
by 3boxer » Mon Jan 05, 2004 12:32 pm
Not to derail the thread, but what mobs do you guys find this most useful on? Stormfeather comes to mind...just wondering in what situation this would prove most effective.
-
Lane
- a hill giant

- Posts: 201
- Joined: Fri Dec 06, 2002 11:57 am
Post
by Lane » Mon Jan 05, 2004 1:29 pm
Lodi in IC sounds like a good one. Probably BoT tower mobs (not that you can solo them), Burrower in AR, I'm a noob really to high end, but those are a few I can think of.
You could also run it on named in zones. People may be camping them, but I know I sometimes have to leave before a placeholder or the named has time to pop. I hate it, but it happens.
-Lane
-
jcooler
- a ghoul

- Posts: 87
- Joined: Wed Dec 31, 2003 7:38 pm
Post
by jcooler » Tue Jan 06, 2004 8:48 am
now if only it could kill the mob and lewt is cargo =)
-
Zelker
- a lesser mummy

- Posts: 38
- Joined: Fri Jan 03, 2003 3:01 pm
Post
by Zelker » Tue Jan 06, 2004 9:09 am
Well I gave it a try last night and couldn't get it to work

. The concatenate didn't function as it looked like it was supposed to either, but I did learn some in the process :) . I decided to try to make a new one from scratch with ideas I had and if I can get something somewhat working I will post it. And if I can't get it working in a few days I'll post what I came up with, but I am having fun trying to figure it out for time being.
-z
-
battaile
- Contributing Member

- Posts: 40
- Joined: Tue Dec 09, 2003 10:55 am
Post
by battaile » Wed Jan 07, 2004 9:49 am
Hrm, I never did try it on my machine, as I ended up getting my spawn the other night (yay). If the concat is broken I wonder if maybe I need to use some kind of escape character for the apostrophe. (or maybe I dont even need the parens, still pretty clueless on string manipulation in this language, mainly go by old examples in the depot) Will try to remember to mess with this tonight and fix it.
Big thanks to the original poser though, used this to help me take down 2 very rare spawns.
-
wilso132
- Contributing Member

- Posts: 106
- Joined: Thu Oct 17, 2002 11:53 am
Post
by wilso132 » Wed Jan 07, 2004 11:29 am
Glad you all like the macro :) Maybe I'll break down and actually add some features to it when I get some free time (which is hard to come by nowadays).
Anyone have any suggestions besides spawntime (already on mine and code is show above) and what time the corpse appeared/was looted??
-
wilso132
- Contributing Member

- Posts: 106
- Joined: Thu Oct 17, 2002 11:53 am
Post
by wilso132 » Wed Jan 07, 2004 11:45 am
battaile wrote:Hrm, I never did try it on my machine, as I ended up getting my spawn the other night (yay). If the concat is broken I wonder if maybe I need to use some kind of escape character for the apostrophe. (or maybe I dont even need the parens, still pretty clueless on string manipulation in this language, mainly go by old examples in the depot) Will try to remember to mess with this tonight and fix it.
Big thanks to the original poser though, used this to help me take down 2 very rare spawns.
Instead of dealing with the strings in that way, why not just check to see if the name includes "@spawn_name" and "corpse"... or even do this:
Set a string equal to @spawn_name then add "'s corpse".
That might be easier.