Requesting explanation of /alert

Need help running MacroQuest 1? Too bad! Use MQ2.

Moderator: MacroQuest Developers

Xenophage
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Dec 09, 2002 6:04 am

Requesting explanation of /alert

Post by Xenophage » Sat Dec 14, 2002 4:25 pm

I've looked at the HTML doc that came with MacroQuest and I'm unclear as to how /alert and /doevent are used. The situation I'm looking at is waiting for a ground spawn to pop, then moving to that and picking it up. It's a timed spawn, so I've managed to tinker something together using /delays. However, I'm not clear on whether /alert would be a more efficient way of doing it.

Ok, verbose story short, does anyone have a clear example/explanation of how /alerts and /doevents work?

--Xenophage

Dirtface
a lesser mummy
a lesser mummy
Posts: 39
Joined: Tue Nov 12, 2002 2:43 am

Post by Dirtface » Sat Dec 14, 2002 9:56 pm

as I understand it /alert, must be followed by a string,

ex. - /alert 1 "Your invisibility is fading."

basically, that will turn alert 1 to TRUE if that your chat screen reads that your invis is fading.

/doevent, im not exactly sure. I think that just cycles thru the routines.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sat Dec 14, 2002 10:26 pm

Salutations,
You are thinking about events... events you do:

Code: Select all

#event fading_invis "You feel yourself about to appear"
then when your invis is fading (i think the string is wrong) it will call the subroutine event_fading_invis.... now, with alerts... *dun dun duuunnn...*
before you use your alert list for the first time you are going to use

Code: Select all

/alert clear #
This clears the list you specify IE to clear list 1, use

Code: Select all

/alert clear 1
and if you wanna clean list 2, use

Code: Select all

/alert clear 2
If you are adding something to an alert list, you use

Code: Select all

/alert add # [pc|npc|corpse|any] [radius radius] [range min max] spawn
this means that if we are using alert list 1 and are wanting to only target a bat within 100 clicks of you that is between level 0 and 5... use:

Code: Select all

/alert add 1 npc radius 100 range 0 5 bat
but if you want to find a spider that is between level 2 and 5 within 200 clicks on list 2, use

Code: Select all

/alert add 2 npc radius 200 range 2 5 spider
If you want to see what you have on your alerts so far you are going to use

Code: Select all

/alert list #
and so you can therefor see what is on list 1?

Code: Select all

/alert list 1
If you want to now target something on your alert list, you want to use

Code: Select all

/target alert #
IE if you want to target your bat in the above example you're going to want to use

Code: Select all

/target alert 1
If you _don't_ want to target something, use

Code: Select all

/target notalert #
IE if you don't want it to be our above spider, use

Code: Select all

/target notalert 2
If you are wanting to target something near a one of your alerts, you are going to use

Code: Select all

/target nearalert #
IE if you want to target something near a bat, use a

Code: Select all

/target nearalert 1
but if you want to target something no where near a spider, use

Code: Select all

/target notnearalert #
like if you want to target no where near that bat, use

Code: Select all

/target notnearalert 1
All of these things can be used in one, so if you want to target a rat that is not near a spider, but near a bat, use....

Code: Select all

/alert clear 1
/alert clear 2
/alert add 1 npc radius 100 range 0 5 bat
/alert add 2 npc radius 200 range 2 5 spider
/target nearalert 1 notnearalert 2 rat
That, again, will target a rat that is out of a 200 click radius of a spider that is under level 5 but over level 2, but is within 100 clicks of a bat that is under level 5...

I hope this helps you in your quest to use alerts... I may post later on usint the $alert variable... actually I'm just gonna post this and start writing that post since I dunno if i will finish it...

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

using $alert() variables!

Post by L124RD » Sat Dec 14, 2002 10:42 pm

Salutations,
First of I want to talk about using /who with alerts since I didn't talk about that in the above post...

Code: Select all

/who alert #
so, to see the npcs that are bats from the above post, use

Code: Select all

/who npc alert 1
but if you want to know every other mobs in the zone, but not those on one of your alert list, use

Code: Select all

/who noalert #
IE you want to know all the mobs but the spiders in the above post? use

Code: Select all

/who npc noalert 2
so... now on to variables...
so lets say that you are hate a guy by the name 'macroingbastard' and you're on a PVP server and he wants to kill you, but you are fighting a rat... soo... You want to make a macro to warn the hell out of you... well... its quite simple! yeah! I'm going to write the code out for you then I'll explain what it does, This macro assumes you're doing the fighting since this is mostly on the $alert() variables....

Code: Select all

sub main
  /alert clear 1
  /alert add 1 pc radius 200 range 1 5 macroingbastard
  /echo Here are the things on your alert list so we know it isn't broken:
  /alert list 1
 :loop
   /if $alert(1)==TRUE {
    /beep
    /echo macroingbastard is within 200 clicks of you... just a warning...
   }
  /goto :loop
/return
In order to stop this macro use /endmacro... but anyway... line by line:

Code: Select all

Define your first subroutine which will be called...
clear alert list 1 (see above)
add macroingbastard to the alert list (again, if you don't understand see above)
echo a warning of the list to follow
display the alert list so you know the alert list is correct
define a loop to repeat
check to see if a thing in alert list 1 is true... (if macroingbastard is within 200 clicks)
beep
echo the warning
end your if statement
goto the begining of the loop
end macro, though the macro should never be here...
I dunno if that will help... I don't think I went into enough detail, if you need help here I will try and repost with help...

Vendor001
Cheezily Banned
Cheezily Banned
Posts: 78
Joined: Wed Nov 13, 2002 1:37 pm

Post by Vendor001 » Sun Dec 15, 2002 1:08 am

Wow, this is great detail.

Think we could add this to the readme in the package?

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sun Dec 15, 2002 4:33 am

Salutations,
it is in the readme, I just added examples and explained it 3 times over... :p I find that when you are teaching people, you explain it once, if they don't get it, try and explain it again 3 different ways. To someone who learns quickly (myself) it will feel like you're teaching is real slow, but to someone who is real slow at pickign things up (I'm not speaking of the mentally disabled here, I mean people who do not pick up things quickly... No offense to the mentally dissabled though, my neice is such. nor to those people who just learn slowly, one of my best friends is like that) will think you're teaching way to fast. as why I explained it three times (or two or something) in my teachings of it, you seemed to have not gotten it in the explination in the readme, so I tried to go into much more detail... I hope I didn't offend anyone with this post... I really didn't mean to if i did *kneels and bows, kissing the floor with his forehead to those he offended*

Xenophage
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Dec 09, 2002 6:04 am

Post by Xenophage » Sun Dec 15, 2002 8:33 pm

Thanks for the overview, L124RD. Very informative and clarifies the use of alerts quite well. From what I can see of the information you've given, this is mainly used for NPCs and PCs. Is there any way to use this for a ground spawn, such as iron oxides in Steamfont or evergreen leaves in Gfay? Wasn't sure if the 'any' parameter on /alert covered those or not.

--Xeno

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sun Dec 15, 2002 9:56 pm

Salutations,
no. I haven't used item farming much but I would suggets lookign at one (I believe there is one in the Macro Depot...) perhaps I'll figure it out later but right now I actually have a report for english I should be writing :p