Code: Select all
#define HomeY v58
#define HomeX v59
Moderator: MacroQuest Developers
Code: Select all
#define HomeY v58
#define HomeX v59
Um. You never noticed that the EQ locations have reversed coordinates? X and Y are always swapped. Everything in EQ is y,x instead of x,y.Malachi wrote:The weird thing is that I discovered that for the runhome part, I have to specify my x and y reversed...it had me resting in the middle of nowhere till I reversed them. No worries now.
Nerfy wrote:I had a similar problem. Remove the quotes. This is a problem with MQ. I have never been able to specify specific targets using alerts - only similar ones. So that if I try:
The first one will look for a mob called ". There are no mobs with the name " so it will tell you just that. The second alert will look for a mob called a. Here you will get quite a few hits. a bat, a wolf, etc. Similar to the first word. The last will return all beetles.Code: Select all
/alert 1 add "a fire beetle" /alert 1 add a fire beetle /alert 1 add beetle
Problem with this is that you want 'a fire beetle' and not 'a dragon beetle' which is level 50+ with a bad attitude.
My solution? Well, the alerts were done so that you would have a convient way of defining what to target. Just specify your targets. I have made a FindTarget routine that doesn't rely on MQ at all. It's a pain to customize, but I feel safer using it. I'm at work right now, but here's the way it runs as best as I can remember.
Again, that's written from memory with no testing so there's no garuntee that it'll work - but you get the idea. Actually I think that I set the MOBs that I want to hunt in an array, but I'll let you do that on your own.Code: Select all
sub FindTarget | Successful Find Flag /varset v1 0 | Start Loop :TryTarget | Order these from least to most wanted /target "a fire beetle" /target "a decaying skeleton" | Make sure we found one of | what we were looking for - MQ | often will target anything if it can't | find what we wanted /if $target(name)=="a fire beetle" /varset v1 1 /if $target(name)=="a decaying skeleton" /varset v1 1 | Make sure it's less of a level then me /if n $target(level)>=$char(level) /varset v1 0 /if n $v1!=1 /goto :TryTarget /return
This way we get beasties that are named exactly what we want, and that are not as strong as we are. Only thing I'd add is anti KS code with the PC radius. Anyway, have fun.
Code: Select all
| shadeweaver.mac
|
| Zone specific Info for Hunter Script
#define HomeY v58
#define HomeX v59
| This Sub sets up the alert lists for the mobs we want to hunt
|
sub SetAlerts
| Setup Alerts for the most important mobs here (rare)
|
/alert clear 1
/alert add 1 npc radius 500 worm
/alert add 1 npc radius 500 saurek
/alert add 1 npc radius 500 lesser
/alert add 1 npc radius 500 dratha
/alert add 1 npc radius 500 loda
| Setup Alerts for the next most important mobs here (uncommon)
|
/alert clear 2
/alert add 2 npc radius 1000 worm
/alert add 2 npc radius 1000 saurek
/alert add 2 npc radius 1000 lesser
/alert add 2 npc radius 1000 dratha
/alert add 2 npc radius 1000 loda
| Setup Alerts for the next most important mobs here (common)
|
/alert clear 3
/alert add 3 npc worm
/alert add 3 npc saurek
/alert add 3 npc lesser
/alert add 3 npc dratha
/alert add 3 npc loda
| Setup Alerts for Scary mobs here
|
/alert clear 4
/alert add 4 npc radius 500 griffin
/return
| This sub sets up the list loot we wish to keep.
|
sub SetLootList
/varset a(1,0) "quality"
/varset a(1,1) "silk"
/varset a(1,2) "swirling"
| Put number of items in list here.
/varset LootTotal 3
/return
| This sub sets our home point we return to if low on health
|
sub SetHomePoint
| Set home to be entrance of tunnel
/varset HomeX -2301.93,
/varset HomeY -2000.38
/mqlog Home Point is $HomeX, $HomeY
/return
| This sub does the checks to make sure we avoid certain specified areas
sub CheckObstacles
| this sub just calls avoidloc for each area i want to avoid in EC
| Single Hut Near WF Zone
/call avoidloc -2033.43 -2932.90 30
/return
Code: Select all
| Scan list of loot to keep and auto drop it if we are keeping it.
/varset CheckLoot 0
:GetLoot
/if "$cursor(name)"~~"$a(1,$CheckLoot)" {
/mqlog Looted $cursor(name)
/click left auto
/goto :Looted
}
/varadd CheckLoot 1
/delay 0
/if n $CheckLoot<$LootTotal /goto :GetLoot Code: Select all
// $a(#,#)
} else if (!strncmp("a(",szVar,2)) {
if ((!strstr(szVar,",")) || (!strstr(szVar,")"))) {
DebugSpew("PMP - Bad $a() '%s'",szVar);
i--;
szOutput[j] = '@';
j++;
} else {
DWORD Index1, Index2;
Index1=atoi(szVar+2);
Index2=atoi(strstr(szVar,",")+1);
if ((Index1 < MAX_MACROARRAYS) || (Index2 < MAX_MACROVARS)) {
while (szOriginal[i]!=')') i++;
strcat(szOutput,gMacroArray[Index1][Index2]);
j+=strlen(gMacroArray[Index1][Index2]);
} else {
DebugSpew("PMP - Bad $a() '%s'",szVar);
i--;
szOutput[j] = '@';
j++;
}
}
Code: Select all
/mouseto 600 100Code: Select all
| Acquire Target subroutine
sub GetTarget
:Acquire
/if AttackedMe==1 {
/mqlog Targeted "$v13" who jumped me
/target "$v13"
/varset AttackedMe 0
} else /if "$alert(1)"=="TRUE" {
/target npc alert 1 notnearalert 4 nopcnear $KSRadius
/mqlog Targeted $target(name) range $target(distance) on alert list 1
} else /if "$alert(2)"=="TRUE" {
/target npc alert 2 notnearalert 4 nopcnear $KSRadius
/mqlog Targeted $target(name) range $target(distance) on alert list 2
} else {
/target npc alert 3 notnearalert 4 nopcnear $KSRadius
/mqlog Targeted $target(name) range $target(distance) on alert list 3
}
/varset MyTarget $target(id)
/varset TargetDead 0
/doevents
/delay 0
| Check the level of the mob first!
/if n $target(level)>$char(level) /goto :Acquire
/if n $target(id)==0 /goto :Acquire
/return