Mac Req - Hunter variation

Status
Not open for further replies.

sparky13

Lifetimer
Joined
Nov 15, 2006
Messages
365
Reaction score
1
Points
0
Well I used hunternowarp.mac this weekend, and I can see how it would work awesome, in a very open area, with not alot of obstruction. The code to detect/avoid/work around obstruction is "ok" but not for zones with alot of walls/doors/stairs.

However, it pretty much does exactly what I want/need it to do, just can't really use it where I need it =/

Hunterwarp.mac really isn't an option, I'm not crazy of the warping idea 3 bazillion times, and I try to use it very sparingly.

I know MQ2melee has a /killthis option, but then I would still be left with needing a 2nd mac for looting, which I haven't found one (if there is a simple /loot mac that can read off an .ini file, then maybe I can solve my own problem by hotkey'g the 2 commands, easy enough, but sill rather a single mac to do it all).

So what this leaves is a request for a custom macro (I R N00b, no skillz, at all). I'll donate graciously to the person who can make it. If this exact type of mac already exists, please point me in that direction, and I'll donate to that party also (I looked for a long while, and just didn't see what I needed).

I'll try to outline exactly what I need here. This is also going under the assumption that I will be either at the keyboard, or close by. I'm looking for something to "assist" me in hours and hours of mind-numbing tradeskill farming, just to save what little of my sanity that is left =)

1. Macro should be able to be turned on and continue to run until ended w/endmac, should not stop normally otherwise.

2. When a target is acquired manually (ie: I mouse click or use f8 or U or cycle NPC), I would like to hit a key on keyboard (needs to be modifiable and noted in mac so it can be changed) that engages and kills the mob. Mob should be SNARED also, snare is very important. (Either spell or AA for ranger, a note in mac as to spell or ability so it can be changed, or rem'd out). HOWEVER, I would like this flexible enough so that if I wanted to use this on say a War or Pal or Clr w/out snare, it could still be used by either not crashing if they can't snare, or allowing me to edit/rem out the snare section.

3. When the mob is dead, the PC target needs to be cleared, and a 5s delay (would also like this delay to be modifiable, so a note in the mac would be key, sometimes 5s is not long enough for casters) kicked in, to allow for "other mobs attacking me". If mobs attacking me, then engage and kill, wash - rinse - repeat. Logic also should be present to leave mac running, with PC stationary (say in a corner of a spawn point) and if attacked, kill mob, then pause/sleep until new target is acquired.

4. If no mobs are attacking, then call a loot sequence to loot all corpses within X range (modifiable, and noted in mac so can be changed at later date).

5. When looting, need to refer to a loot.ini file which can be edited on the fly, similar to yafm.ini. What I would like is either a 0 (destroy) or 1 (loot/keep) for all items, NOT a "if not in file destroy". IF an item does not appear in the .ini file, then ADD item to list. Set the default NULL= to 1 (auto keep).

6. GM check. If there is a GM in zone, mac should pause/sleep/not resume until GM leaves. I'll take the risk of death over risk of exposure =)


Hope this was clear enough to understand, and hoping someone takes up the task, I'm sure there are others who are looking for just this type of thing as well =)
 
The only real reason something like this hasn't been written is because of walls. We can't really navigate around walls to mobs unless we make people able to setup path files or we use /warp.

Fry.
 
Exactly, that's why I'm looking for it to be on an "as needed" basis, requiring manually targeting a mob and doing something like a /killthis (from MQ2melee). That works, but then you need a whole separate mac to do the looting.

Add on top of that there's no "afk protection" that I've seen with /killthis (or mq2melee) that I've found. If it's there and I don't see it can someone point it out?

I'm not looking for the mac to wander around killing mobs. I'm talking about taking control of the toon, picking the mobs (obviously PC would have to be in vicinity of the mob with 0 obstructions) and then having PC engage, kill, and loot, then sit idle until next mob is targetted and PC is again told to kill this, or it goes into "defense mode" if being attacked while idle.

The basics are very simple, I just don't know how to do it, but essentially it's picking bits and pieces from already existing and well working macros.
 
Offer still stands on this, looking for someone able to come up with what's outlined.

To-date I've been able to use mq2melee for /killthis, then using mq2autodestroy to speed up looting a bit, but still not what I need on either end.
 
Here is something I just came up with. Let me know if this works for ya.

Code:
|--------------------------------------------------------------------------|
|   Killandloot.mac v1.0 by Mattr33                                        |
|                                                                          |
|   This is a simple kill and loot macro.  Requirements for this to run:   |
|   Plugins:  MQ2Melee and MQ2Moveutils (and setup properly for class      |
|   Inc files: ninjadvloot.inc and spell_routines.inc                      |
|                                                                          |
|   Start macro with /mac killandloot                                      |
|   Then when you either have a mob targeted and start attacking it        |
|   (it detects when you go into "Combat State" (crossed swords), or       |
|   a mob hits you (sitting AFK in a corner somewhere), it will fight      |
|   the mob, and then once dead, wait a specified number of seconds        |
|   to see if any other mobs are around you and already attacking you,     |
|   then it will loot the corpses around you.                              |
|                                                                          |
|   To modify the loot parameters, edit the loot.ini file under            |
|   settings to change if you loot mobs, radius to check for corpses,      |
|   radius to check for other mobs and corpse rot time.                    |
|                                                                          |
|   To change adjust snare settings see the declare settings below to      |
|   set that.  Ranger AA Entrap is untested since I don't have a ranger.   |
|                                                                          |
|   GM checking will have PC go afk and then check zone to see if GM       |
|   is in it every 3 minutes.  After GM leaves it will resume macro.       |
|   I didn't get a chance to test this part.                               |
|--------------------------------------------------------------------------|

#include ninjadvloot.inc
#include spell_routines.inc
#Event Killthis "#*#YOU#*#points of damage" 
#Event Snareresist "#*#Your target resisted the Ensnare spell#*#"

Sub Main
|---------Put the name of your snare spell here-----------------------------|
/declare snarespell string outer Ensnare                                    
|---------------------------------------------------------------------------|

|---------Put gem number for snare spell here-------------------------------|
/declare snarespellgem int outer 3                                          
|---------------------------------------------------------------------------|

|---------Change value to 1 if Ranger has AA Entrap-------------------------|
/declare AAEntrap int outer 0                                             
|---------------------------------------------------------------------------|

|---Change value to 0 if you don't want macro to snare----------------------|
/declare snaring int outer 1
|---------------------------------------------------------------------------|

|---Change to what the mobs hp will be at when snare is cast (default 25)---|
/declare snarehp int outer 75
|---------------------------------------------------------------------------|

|---Change to how much time to wait after targets are all killed to loot----|
/declare timetowait int outer 5
|---------------------------------------------------------------------------|

|-----DONT CHANGE THIS------|
/declare mobsnared int outer 0
|---------------------------|

/call SetupAdvLootVars

:Main
/if (${Spawn[gm].ID}) /call GM
/varset mobsnared 0
/if (${Target.ID} && ${Me.CombatState.Equal[COMBAT]}) {
    /echo Have target that I'm fighting
    /call Event_Killthis
    }
/doevents
/goto :Main
/return

Sub Event_Killthis
/attack
:Killoop
/if (!${Target.ID} || ${Target.Type.Equal[Corpse]}) {
    /echo Target is dead
    /keypress esc
    /attack off
    /delay ${timetowait}s
    /if (${Target.ID}) {
        /attack
        /goto :Killoop
        }
    /echo Going to loot corpses now
    /call Lootmobs
    /echo Done Looting
    /cleanup
    /return
    }
/if (${Target.PctHPs} < ${snarehp} && ${snaring}==1) /call Snare
/goto :Killoop
/return

Sub Snare
/if (${mobsnared}==1) /return
/if (${AAEntrap}==1 && ${Me.AltAbilityReady[entrap]}) /call cast "Entrap" alt
/call cast ${snarespell} gem${snarespellgem} 7s
/delay 5
/doevents
/varset mobsnared 1
/popup ${Target.CleanName} is snared
/return

Sub Event_Snareresist
/popup Snare was resisted, retrying!
/call Snare
/return

Sub GM
:GMCheck
/echo GM is in zone! Going AFK and pausing macro for 3 minutes and then will check again for GM
/beep
/beep
/afk
/delay 3m
/if (!${Spawn[gm].ID}) {
    /echo GM is gone, resuming macro
    /afk
    /return
    }
/goto GMCheck
/return

Matt
 
Matt this looks great! (Of course just reading through it is what gives me that impression LOL).

I'll give this a run over the next couple of days and get back to you. Thanks for the work so far!

****EDIT****

Had to do some digging around for ninjadvloot.inc as it's not included in the current compile, nor hosted anywhere here on MMO. Found it on MQ2 boards through, but hope I have the correct one. See below, added in the relevant boards commentary to the notes.

Credit to A_Druid_00, post found here: http://www.macroquest2.com/phpBB2/viewtopic.php?t=12578

Code:
| Ninjadvloot.inc v1.3 
| Not to steal away toomanynames's or mystikule's thunder, since I borrowed heavily from 
| both of their work before settling on making my own. This version is a little more 
| intelligent than any of the other looting incs I've been able to find. This version uses 
| MQ2MoveUtils to move to corpses, so if you aren't a VIP, you should either donate, or 
| write up your own /moveto code. 
|
| 1/26 
| v1.3 Fixed stuff 
| 12/19 
| v1.1 Changed the keep routine so that it will right click to put the item in inventory 
|    instead of left clicking. It's a pretty good bit faster this way. 
| v1.0 Allows you 3 options for every item; Keep, Destroy, and Ignore. Tradeable items 
|    default to Keep, No Drop items default to Ignore. If you want to alter the items 
|    from the default values, you can set them in your loot.ini, which groups each item 
|    into sections based on the first letter of the item's name (It doesn't create them 
|    in alpha order for you, if you want it to look nice and pretty, do it yourself). 
| If you already have a Lore item in your inventory, it will link it in your LootChannel 
|    if you set ReportLoot to TRUE. It will also link any No Drop items left on a corpse. 
|    If you have a full stack of an item, and no free inventory space available, it will also link it in your LootChannel. 
| It will not loot if there are mobs inside your MobsTooClose radius. 
| It will loot any corpses within your CorpseRadius. 
| It will wait until your CorpseRotTime timer has expired before trying to loot again. 
|    The CorpseRotTimer gets reset anytime you encounter a new corpse that you can't loot from, 
|    so there will be some lag in the times you start re-looting corpses you leave items on. 
| It will not loot stackable items unless there's room on a stack for it, or you have a slot in your inventory free to put it in. 

#Event ALCantLoot         "#*#may not loot this corpse#*#" 

Sub SetupAdvLootVars 
/declare ALDontLoot      int    outer 
/declare CorpseRotTimer  timer  outer 
/call ALLoadVar Settings LootMobs      TRUE  bool 
/call ALLoadVar Settings CorpseRadius  100   int 
/call ALLoadVar Settings MobsTooClose  50    int 
/call ALLoadVar Settings CorpseRotTime 440s  string 
/call ALLoadVar Settings ReportLoot    FALSE bool 
/call ALLoadVar Settings LootChannel   echo  string 
/if (!${Defined[${AlertList}]}) /declare AlertList int outer 1 
/squelch /alert clear 25 
/return 

Sub ALLoadVar(IniSection,IniVar,IniValue,VarType) 
/if (!${Defined[${IniVar}]} && ${Defined[VarType]}) /declare ${IniVar} ${VarType} outer 
/declare IniString string local ${Ini[Loot.ini,${IniSection},${IniVar},NOTFOUND]} 
/varset ${IniVar} ${IniString} 
/if (${IniString.Equal["NOTFOUND"]}) { 
  /if (${IniString.Equal["NOTFOUND"]}) /varset ${IniVar} ${IniValue} 
  /ini "Loot.ini" "${IniSection}" "${IniVar}" "${${IniVar}}" 
} 
/return 

Sub LootCorpse 
/declare i          int    local 
/declare LootList   string local 
/call CheckCursor 
/loot 
/delay 3s ${Corpse.Open} 
/doevents CantLoot 
/if (${Target.ID}==${ALDontLoot} && ${Spawn[${ALDontLoot}].ID}) /squelch /alert add 25 id ${ALDontLoot} 
/delay 3s ${Corpse.Items} || ${Target.ID}==${ALDontLoot} 
/if (${Corpse.Open} && ${Corpse.Items}) { 
 /declare loottotal  int    local 
  :ALlootlag 
  /varset loottotal ${Corpse.Items} 
  /delay 1s ${loottotal}!=${Corpse.Items} 
  /if (${loottotal}!=${Corpse.Items}) /goto :ALlootlag 
  /for i 1 to ${loottotal} 
  /if (${Corpse.Item[${i}].ID} && !${Select[${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${Corpse.Item[${i}]}"]},Ignore,Keep,Destroy]}) { 
    /if (${Corpse.Item[${i}].NoDrop}) /ini "loot.ini" "${Corpse.Item[${i}].Name.Left[1]}" "${Corpse.Item[${i}]}" Ignore 
    /if (!${Corpse.Item[${i}].NoDrop}) /ini "loot.ini" "${Corpse.Item[${i}].Name.Left[1]}" "${Corpse.Item[${i}]}" Keep 
  } 
  /if (${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${Corpse.Item[${i}]}"].NotEqual[Destroy]} && !${Me.FreeInventory} && (!${FindItemCount[=${Corpse.Item[${i}].Name}]} || (${FindItemCount[=${Corpse.Item[${i}].Name}]} && ${Corpse.Item[${i}].Stackable} && !${Corpse.Item[${i}].FreeStack})) || (${Corpse.Item[${i}].Lore} && ${FindItem[${Corpse.Item[${i}]}].ID}) || ${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${Corpse.Item[${i}]}"].Equal[Ignore]}) /varset LootList ${LootList}${Corpse.Item[${i}]}, 
  /if ((!${Corpse.Item[${i}].Lore} || !${FindItem[${Corpse.Item[${i}]}].ID}) && (${Me.FreeInventory} || (${FindItemCount[=${Corpse.Item[${i}].Name}]} && ${Corpse.Item[${i}].Stackable} && ${Corpse.Item[${i}].FreeStack})) && ${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${Corpse.Item[${i}]}"].Equal[Keep]}) /call LootItem ${i} Keep right 
  /if (${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${Corpse.Item[${i}]}"].Equal[Destroy]}) /call LootItem ${i} Destroy left 
  /next i 
  /if (${Corpse.Items}) { 
    /if (${ReportLoot}) /${LootChannel} ${LootList} left on corpse. 
    /if (${Target.ID}) /squelch /alert add 25 id ${Target.ID} 
    /varset CorpseRotTimer ${CorpseRotTime} 
  } 
} 
:clickdoneffs 
/nomodkey /notify LootWnd LW_DoneButton leftmouseup 
/delay 5s !${Corpse.Open} 
/if (${Corpse.Open}) /goto :clickdoneffs 
/return 

Sub LootItem(int i,DoWhat,WhichButton) 
/declare CorpseItemID int local ${Corpse.Item[${i}].ID} 
/nomodkey /itemnotify loot${i} ${WhichButton}mouseup 
/delay 5s ${Window[ConfirmationDialogBox].Open} || !${Corpse.Item[${i}].NoDrop} 
/if (${Window[ConfirmationDialogBox].Open}) /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup 
/delay 5s ${Cursor.ID} || ${WhichButton.NotEqual[left]} 
/if (${DoWhat.Equal[Destroy]} && ${Cursor.ID}==${CorpseItemID}) /destroy 
/delay 3s !${Corpse.Item[${i}].ID} && !${Cursor.ID} 
/return 

Sub LootMobs 
/if (!${LootMobs} || ${SpawnCount[npc radius ${MobsTooClose} zradius 100 noalert ${AlertList}]} || !${SpawnCount[corpse radius ${CorpseRadius} zradius 100 noalert 25]} || ${Me.Combat} || (${Cursor.NoDrop} && !${Me.FreeInventory})) /return 
/if (!${CorpseRotTimer}) /squelch /alert clear 25 
/declare i int local 
/declare CorpseList string local | 
/for i 1 to ${SpawnCount[corpse radius ${CorpseRadius} zradius 100 noalert 25]} 
/varset CorpseList ${CorpseList}${NearestSpawn[${i},corpse radius ${CorpseRadius} noalert 25].ID}| 
/next i 
/declare DeadCount int local ${SpawnCount[corpse radius ${CorpseRadius} zradius 100 noalert 25]} 
/if (${Me.Mount.ID}) /dismount 
/for i 1 to ${DeadCount} 
/if (${Spawn[${CorpseList.Arg[${i},|]}].Deity.ID} && ${Spawn[${CorpseList.Arg[${i},|]}].ID}) /squelch /alert add 25 id ${Spawn[${CorpseList.Arg[${i},|]}].Deity.ID} 
/if (!${Spawn[${CorpseList.Arg[${i},|]}].Deity.ID}) { 
  /if (${Target.ID}!=${Spawn[${CorpseList.Arg[${i},|]}].ID}) /target id ${Spawn[${CorpseList.Arg[${i},|]}].ID} 
  /if (!${Me.Standing}) /stand 
  /delay 2s ${Target.ID}==${Spawn[${CorpseList.Arg[${i},|]}].ID} && ${Me.Standing} 
  /if (${Spawn[${CorpseList.Arg[${i},|]}].Distance}>10) /moveto loc ${Spawn[${CorpseList.Arg[${i},|]}].Y} ${Spawn[${CorpseList.Arg[${i},|]}].X} 
  /delay 10s ${Spawn[${CorpseList.Arg[${i},|]}].Distance}<10 
  /if (${Spawn[${CorpseList.Arg[${i},|]}].Distance}<15) /call LootCorpse 
  /stick off 
} 
/next i 
/return 

Sub Event_ALCantLoot 
/varset ALDontLoot ${Target.ID} 
/return 

Sub CheckCursor 
:ALauto_inv 
/if (${Cursor.ID}) { 
  /if (${Cursor.NoDrop} && !${Me.FreeInventory}) /return 
  /timed 5 /autoinventory 
  /delay 2s !${Cursor.ID} 
  /goto :ALauto_inv 
} 
/return
 
Last edited:
OK couple of things. Your details refer to loot.ini file and settings. I don't see that here, nor in any compile. I'm going to search around and see if there's a file that might match this.

Also, there's a reference to: /call SetupAdvLootVars but I don't see anything else that refers to this.

......

Now, when I actually try to run this with /mac killandloot I get the following return:

Unknown # command: #macro pausecheck(a)
unable to add macro line
unable to add macro line

(Yes it repeats 2x)

I don't see anything in the mac that even mentions pause/pausecheck.

help =)
 
Not True Sparky

[ame="http://www.mmobugs.com/forums/showthread.php?t=2377"]MMOBugs - Cheat Smarter[/ame] I've been using for months works great I use as inc file so can snippet into another macro.

sparky13 said:
Matt this looks great! (Of course just reading through it is what gives me that impression LOL).

I'll give this a run over the next couple of days and get back to you. Thanks for the work so far!

****EDIT****

Had to do some digging around for ninjadvloot.inc as it's not included in the current compile, nor hosted anywhere here on MMO. Found it on MQ2 boards through, but hope I have the correct one. See below, added in the relevant boards commentary to the notes.

Credit to A_Druid_00, post found here: http://www.macroquest2.com/phpBB2/viewtopic.php?t=12578
 
Sorry, forgot to attach the loot.ini file, all though I thought ninjadvloot.inc created one if it did not find out.

Here is what I use:

Code:
[Settings]
LootMobs=TRUE
CorpseRadius=75
MobsTooClose=50
CorpseRotTime=440s
ReportLoot=FALSE
LootChannel=/say
What will happen when you start to loot stuff it will begin to ammend the loot.ini file, in alphabetical order, after the settings, like this:
[A]
A Drop of Pure Rain=Keep

Blue Diamond=Keep
Black Sapphire=Keep

...and so on thru the alphabet.

I'll PM you v1.4 of ninjadvloot.inc and spell_routines.inc v2.41

Sparky13 said:
Also, there's a reference to: /call SetupAdvLootVars but I don't see anything else that refers to this.
This sub is in ninjadvloot.inc that is called to pull the settings from the loot.ini file.

Sparky13 said:
Now, when I actually try to run this with /mac killandloot I get the following return:

Unknown # command: #macro pausecheck(a)
unable to add macro line
unable to add macro line

(Yes it repeats 2x)
Looks like you might not have the most current spell_routines.inc file. I found this over at MQ2 which is only the reason I say that. So I'm PM'ing you my spell_routines.inc file. Problem with spell routines link. Hope that fixes it.

Matt
 
Drellisdee said:
http://www.mmobugs.com/forums/showthread.php?t=2377 I've been using for months works great I use as inc file so can snippet into another macro.

Drell, not sure which part you're thinking isn't true, I'm a bit confused (and I'm easily confused so not your fault =P).

Your script and post refers to ninjaloot.inc, not ninjadvloot.inc. Maybe the're one and the same, but I'm unsure, still a VERY VERY big novice (n00b) at this.

Thanks for the reply though, and question, your BST AFK mac, is that convertable to say a ranger version ya think?
 
Mattr33 said:
Sorry, forgot to attach the loot.ini file, all though I thought ninjadvloot.inc created one if it did not find out.

What will happen when you start to loot stuff it will begin to ammend the loot.ini file, in alphabetical order, after the settings, like this:
[A]
A Drop of Pure Rain=Keep

Blue Diamond=Keep
Black Sapphire=Keep

...and so on thru the alphabet.


No problem, and awesome thanks, no it didn't create the file, I had gone and looked for it thinking maybe it had and I could edit it if it looked self-explanatory. The one thing I didn't try that I thought about later was just creating a blank loot.ini file and seeing if that worked, but was already tucked away in a warm bed at that point =)

Mattr33 said:
I'll PM you v1.4 of ninjadvloot.inc and spell_routines.inc v2.41

This sub is in ninjadvloot.inc that is called to pull the settings from the loot.ini file.

Looks like you might not have the most current spell_routines.inc file. I found this over at MQ2 which is only the reason I say that. So I'm PM'ing you my spell_routines.inc file. Problem with spell routines link. Hope that fixes it.

Matt

Thanks, got em both, will replace the ones I have with those copies, it's quite possible I ended up with old versions, still trying to get up to speed on what's current, what's old and such LOL. And gosh-dang it, why I didn't go and look that up I don't know... I need to be flogged =)

Will let ya know t'night or tomorrow night, if I have time, think I'm raiding t'nite LOL.
 
OK replaced all the files, and something's just not working.

MQ2melee is loaded (and working), mq2moveutils is loaded, and placed the 2 inc files in both directories (since I wasn't sure which one it belonged in).

I can't get it to work whether I engage the mob or get the mob to engage me. Tried changing the hitsmode thinking maybe there was an issue with how I had it (was abbreviated) and then even put the hits into my main window (had it to separate window) and nadda...

You mentioned the following and I'm wondering if I'm missing something here:
Requirements for this to run: |
| Plugins: MQ2Melee and MQ2Moveutils (and setup properly for class |
| Inc files: ninjadvloot.inc and spell_routines.inc

/puzzled and lost
 
When you engage the mob does this line echo in your mq2 window?

Code:
Have target that I'm fighting

All the code is doing at that point is seeing that you have something targetted and that you have entered combat mode. Let me know if that text goes into your mq2 window. Does the macro end right away after starting it? I can add some debug stuff to it maybe later on tonight to try and figure it out.

For the life of me, I cannot see why it won't work on your computer. Its a simple macro and I can run it fine on my. There are no special mmobugs stuff required for it either...

Anyone else have any ideas why when Sparky runs it, it won't run?

Sparky13 said:
You mentioned the following and I'm wondering if I'm missing something here:
Quote:
Requirements for this to run: |
| Plugins: MQ2Melee and MQ2Moveutils (and setup properly for class |
| Inc files: ninjadvloot.inc and spell_routines.inc
What I meant was more for anyone else. Since you say that you can type /killthis and it will work for you, I assume that you have mq2melee and mq2moveutils setup correctly.

Matt
 
Mattr33 said:
When you engage the mob does this line echo in your mq2 window?

Code:
Have target that I'm fighting

All the code is doing at that point is seeing that you have something targetted and that you have entered combat mode. Let me know if that text goes into your mq2 window. Does the macro end right away after starting it? I can add some debug stuff to it maybe later on tonight to try and figure it out.

Nope, when I do /mac killandloot I see nothing, and when I manually engage the mob I see nothing but the "MQ2Melee::Sticking [#.## id ####]" and then "you are now sticking to a <mob>"

Exact same results when I target a mob, and /killthis

Nothing else at all enters my MQ2 window.

Mattr33 said:
For the life of me, I cannot see why it won't work on your computer. Its a simple macro and I can run it fine on my. There are no special mmobugs stuff required for it either...

Anyone else have any ideas why when Sparky runs it, it won't run?


What I meant was more for anyone else. Since you say that you can type /killthis and it will work for you, I assume that you have mq2melee and mq2moveutils setup correctly.

Matt

Yep, very puzzled here, was wondering if I missed setting up some file.

Question, when you say "Plugins: MQ2Melee and MQ2Moveutils (and setup properly for class" what exactly do you mean here? I didn't have to make any adjustments at all for mq2melee to work. Possibly I overlooked setting something up?

We'll figure it out.
 
Try typing "/melee" (without the quotes). You should get a list of options/settings telling you how MQ2Melee is set up. Make sure that "melee=on (or it may say 1). If not, type "/melee melee=1". That will at least get the macro running. Then type "/melee" again. You should get a different list of options/settings if the plugin was not on. Simply pick the settings you wish to change and type "/melee (option=1 or 0) 1 being on, and 0 being off. Try experimenting with different settings to see what works for you. Or go to http://www.macroquest2.com/wiki/index.php/MQ2Melee and read about it.
 
Thanks for the advice Anon, but it doesn't seem to be a problem with melee. That part is working fine.

It does the stick, combat, taunt, kick, etc once I engage a mob manually or using /killthis.

Something I haven't set up is what's causing the issue since Matt is able to use this and I'm not.
 
Sparky,

Try adding a couple of lines into the macro to help debug what it is not doing.

First add the ones I have bolded and italicized (this is up towards the beginning of the macro):

Code:
|-----DONT CHANGE THIS------|
/declare mobsnared int outer 0
|---------------------------|
[B][I]/echo Calling the sub to setup the loot stuff in the inc file[/I][/B]
/call SetupAdvLootVars
[B][I]/delay 5[/I][/B]
[B][I]/echo Finished calling the loot settings...[/I][/B]
:Main
/if (${Spawn[gm].ID}) /call GM
[B][I]/echo Just checked to see if GM's are around and its all clear![/I][/B]

By adding those /echo commands you should see that text in your MQ2 window when it goes to each of those spots in the macro. Try that and post back what you see.

Also, make sure the loot.ini folder is located in the same file as the macro is in. And yes, both the .inc files need to be in the macro folder as well :)

Matt

Matt
 
OK added those lines.

with no mobs targetted, I do /mac killand loot and instantly get:

Calling the sub to setup the loot stuff in the inc file
Finished calling the loot settings.
Just checked to see if GMs are around and it's all clear!

This last line, repeats hundreds of times until I /endmac, and is repeating extremely fast (had about 5 dozen lines before I could /endmac the 2nd time to see it).

I let it go a 3rd time to see if it would end on it's own and it doesn't.

Then while it was still running, I engaged a mob and no activity. Once I do /kill this I get no return to window. /endmac a few times and the scrolling finally catches up.

Some where in the spam after scrolling up hundreds of lines, you finally see the normal "you are now sticking to ...." "mq2melee::sticking ...."

then several dozen lines later "you are now sticking to ..." again

Appears we got ourselves a loop =)

I'm copying / pasting the mac code so you can make sure I didn't screw anything up, but I simply copy/pasted what you had with no real edits.

Code:
|--------------------------------------------------------------------------|
|   Killandloot.mac v1.0 by Mattr33                                        |
|                                                                          |
|   This is a simple kill and loot macro.  Requirements for this to run:   |
|   Plugins:  MQ2Melee and MQ2Moveutils (and setup properly for class      |
|   Inc files: ninjadvloot.inc and spell_routines.inc                      |
|                                                                          |
|   Start macro with /mac killandloot                                      |
|   Then when you either have a mob targeted and start attacking it        |
|   (it detects when you go into "Combat State" (crossed swords), or       |
|   a mob hits you (sitting AFK in a corner somewhere), it will fight      |
|   the mob, and then once dead, wait a specified number of seconds        |
|   to see if any other mobs are around you and already attacking you,     |
|   then it will loot the corpses around you.                              |
|                                                                          |
|   To modify the loot parameters, edit the loot.ini file under            |
|   settings to change if you loot mobs, radius to check for corpses,      |
|   radius to check for other mobs and corpse rot time.                    |
|                                                                          |
|   To change adjust snare settings see the declare settings below to      |
|   set that.  Ranger AA Entrap is untested since I don't have a ranger.   |
|                                                                          |
|   GM checking will have PC go afk and then check zone to see if GM       |
|   is in it every 3 minutes.  After GM leaves it will resume macro.       |
|   I didn't get a chance to test this part.                               |
|--------------------------------------------------------------------------|

#include ninjadvloot.inc
#include spell_routines.inc
#Event Killthis "#*#YOU#*#points of damage" 
#Event Snareresist "#*#Your target resisted the Ensnare spell#*#"

Sub Main
|---------Put the name of your snare spell here-----------------------------|
/declare snarespell string outer ensnare                                    
|---------------------------------------------------------------------------|

|---------Put gem number for snare spell here-------------------------------|
/declare snarespellgem int outer 1                                          
|---------------------------------------------------------------------------|

|---------Change value to 1 if Ranger has AA Entrap-------------------------|
/declare AAEntrap int outer 0                                             
|---------------------------------------------------------------------------|

|---Change value to 0 if you don't want macro to snare----------------------|
/declare snaring int outer 0
|---------------------------------------------------------------------------|

|---Change to what the mobs hp will be at when snare is cast (default 25)---|
/declare snarehp int outer 100
|---------------------------------------------------------------------------|

|---Change to how much time to wait after targets are all killed to loot----|
/declare timetowait int outer 5
|---------------------------------------------------------------------------|

|-----DONT CHANGE THIS------|
/declare mobsnared int outer 0
|---------------------------|

/echo Calling the sub to setup the loot stuff in the inc file

/call SetupAdvLootVars
/delay 5
/echo Finished calling the loot settings.

:Main
/if (${Spawn[gm].ID}) /call GM
/echo Just checked to see if GMs are around and it's all clear!

/varset mobsnared 0
/if (${Target.ID} && ${Me.CombatState.Equal[COMBAT]}) {
    /echo Have target that I'm fighting
    /call Event_Killthis
    }
/doevents
/goto :Main
/return

Sub Event_Killthis
/attack
:Killoop
/if (!${Target.ID} || ${Target.Type.Equal[Corpse]}) {
    /echo Target is dead
    /keypress esc
    /attack off
    /delay ${timetowait}s
    /if (${Target.ID}) {
        /attack
        /goto :Killoop
        }
    /echo Going to loot corpses now
    /call Lootmobs
    /echo Done Looting
    /cleanup
    /return
    }
/if (${Target.PctHPs} < ${snarehp} && ${snaring}==1) /call Snare
/goto :Killoop
/return

Sub Snare
/if (${mobsnared}==1) /return
/if (${AAEntrap}==1 && ${Me.AltAbilityReady[entrap]}) /call cast "Entrap" alt
/call cast ${snarespell} gem${snarespellgem} 7s
/delay 5
/doevents
/varset mobsnared 1
/popup ${Target.CleanName} is snared
/return

Sub Event_Snareresist
/popup Snare was resisted, retrying!
/call Snare
/return

Sub GM
:GMCheck
/echo GM is in zone! Going AFK and pausing macro for 3 minutes and then will check again for GM
/beep
/beep
/afk
/delay 3m
/if (!${Spawn[gm].ID}) {
    /echo GM is gone, resuming macro
    /afk
    /return
    }
/goto GMCheck
/return

Loot.ini file (I cut down the mobs too close to 5 to see if that would matter, but was sure I was doing this where I wouldn't get agro during looting)

Code:
|** What will happen when you start to loot stuff it will begin to ammend the loot.ini file, in alphabetical order, after the settings, like this:
|  [A]
|  A Drop of Pure Rain=Keep
|  [b]
|  Blue Diamond=Keep
|  Black Sapphire=Keep
|  
|  ...and so on thru the alphabet.

[Settings]
LootMobs=TRUE
CorpseRadius=75
MobsTooClose=5
CorpseRotTime=440s
ReportLoot=FALSE
LootChannel=/say

Let me know if you need the ninjadvloot.inc and spell_routines.inc but they're the 2 you sent me.

Thanks again =)
 
OK added those lines.

with no mobs targetted, I do /mac killand loot and instantly get:

Calling the sub to setup the loot stuff in the inc file
Finished calling the loot settings.
Just checked to see if GMs are around and it's all clear!

This last line, repeats hundreds of times until I /endmac, and is repeating extremely fast (had about 5 dozen lines before I could /endmac the 2nd time to see it).

Ok, all that is good. It is supposed to loop like that. What it is doing is it is after it calls the loot settings in ninjadvloot.inc, it returns to the macro. Then it checks for any GM's in zone, and the it checks to see if you have a target and you are in combat mode or are getting hit. If it doesn't then it returns back to the GM check. That is the loop. So I know that works fine.

Then for some reason EQ is not reporting that you are going into combat mode. You also tried this by having a mob agro you and letting it hit you (I think you said you tried that already)?

What kind of UI are you using? Do you have the combat states in your UI (combat, debuffed, cooldown, etc)? When you are in combat it should show crossed swords, after being resurrected it shows the flame.

Let me know :)

Matt
 
Status
Not open for further replies.