Retard useable safe to pull sub

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

tums2004
a lesser mummy
a lesser mummy
Posts: 57
Joined: Wed Oct 11, 2006 11:37 am

Retard useable safe to pull sub

Post by tums2004 » Thu Oct 30, 2008 9:01 pm

I'm looking for a sub that will let me target a mob, and tell me if that mob is safe to pull with a debuff spell. (relatively). I dont want an afk puller or anything like that, but something that lets me know which of a cluster of mobs is most likely to be able to be pulled safely.
There are things similar, but I can't make any of them work correctly.

User avatar
A_Enchanter_00
a snow griffon
a snow griffon
Posts: 473
Joined: Mon Dec 12, 2005 4:37 pm
Location: A server near you

Post by A_Enchanter_00 » Fri Oct 31, 2008 7:05 am

this will check for adds around a spawn a target with PullSingleDistance as monster aggro distance, other than that it should give you an idea on how you could do it.

Code: Select all

 
Sub CheckAdds(int SpawnSearchID, int aggroCount)
	/if ( !${PullSingleDistance} ) /return 0
	/if ( !${Defined[aggroCount]} ) /declare aggroCount int local 1
	/declare i int local 0
	/declare AggroMonsters int local 0
	/declare SpawnID int local 0
	/for i 1 to ${SpawnCount[npc loc ${Spawn[id ${SpawnSearchID}].X} ${Spawn[id ${SpawnSearchID}].Y} radius ${PullDistance} zradius ${PullDistanceZ}]}
		/varset SpawnID ${NearestSpawn[${i},npc loc ${Spawn[id ${SpawnSearchID}].X} ${Spawn[id ${SpawnSearchID}].Y} radius ${PullDistance} zradius ${PullDistanceZ}].ID}		
		/if ( ${SpawnID} != ${SpawnSearchID} && ${PullSingleDistance} ) {
			/if ( d_ValidSpawnID && ${Spawn[id ${SpawnID}].Z} > ${Math.Calc[${Spawn[id ${SpawnSearchID}].Z}-${PullDistanceZ}]} && ${Spawn[id ${SpawnID}].Z} < ${Math.Calc[${Spawn[id ${SpawnSearchID}].Z}+${PullDistanceZ}]} ) {								
				/if ( ${Spawn[id ${SpawnID}].Speed} ) {
					/if ( ${Math.Distance[${Spawn[id ${SpawnSearchID}].Y},${Spawn[id ${SpawnSearchID}].X},${Spawn[id ${SpawnSearchID}].Z}:${Spawn[id ${SpawnID}].Y},${Spawn[id ${SpawnID}].X},${Spawn[id ${SpawnID}].Z}]} < ${Math.Calc[${PullSingleDistance}*1.5]} ) {
						/varset AggroMonsters ${Math.Calc[${AggroMonsters}+1]}
						/if ( ${AggroMonsters} >= ${aggroCount} ) /return ${SpawnID}
					}
				} else {
					/if ( ${Math.Distance[${Spawn[id ${SpawnSearchID}].Y},${Spawn[id ${SpawnSearchID}].X},${Spawn[id ${SpawnSearchID}].Z}:${Spawn[id ${SpawnID}].Y},${Spawn[id ${SpawnID}].X},${Spawn[id ${SpawnID}].Z}]} < ${PullSingleDistance} ) {
						/varset AggroMonsters ${Math.Calc[${AggroMonsters}+1]}
						/if ( ${AggroMonsters} >= ${aggroCount} ) /return ${SpawnID}
					}
				}
			}
		}
	/next i
/return 0
A_Enchanter_00

Author of:
MQ2AdvPath / ISXEQAdvPath
MQ2Cast ( Author also s0rcier )
MQ2CastTimer
MQ2VoiceCommand

[quote]
If you like my work and want to give somthing back, just click [url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=aenchanter00%40gmail%2ecom&item_name=A_Enchanter_00&no_shipping=2&no_note=1&tax=0&currency_code=USD&lc=DK&bn=PP%2dDonationsBF&charset=UTF%2d8][color=green]HERE[/color][/url] to use PAYPAL.
[/quote]

tums2004
a lesser mummy
a lesser mummy
Posts: 57
Joined: Wed Oct 11, 2006 11:37 am

tried but failed

Post by tums2004 » Sun Nov 02, 2008 3:40 am

I tried to use the code you wrote, but failed. I always get back 0 no matter what? What did I do wrong?

tums2004
a lesser mummy
a lesser mummy
Posts: 57
Joined: Wed Oct 11, 2006 11:37 am

Better yet

Post by tums2004 » Sun Nov 02, 2008 3:54 am

I'll throw you 20$ on paypal if you write a sub, that takes my current target, and echos back whether it is safe to pull or not with a debuff mala/malo one of those types.

User avatar
A_Enchanter_00
a snow griffon
a snow griffon
Posts: 473
Joined: Mon Dec 12, 2005 4:37 pm
Location: A server near you

Post by A_Enchanter_00 » Mon Nov 03, 2008 6:29 pm

could be several things ...

---> /if ( !${PullSingleDistance} ) /return 0


---> d_ValidSpawnID what ever code you use to check if SpawnID is a valid spawn

Code: Select all

Sub CheckAdds(int SpawnSearchID, int PullSingleDistance, int aggroCount)
   /if ( !${Defined[aggroCount]} ) /declare aggroCount int local 1
   /declare i int local 0

   /declare AggroMonsters int local 0
   /declare SpawnID int local 0
   /for i 1 to ${SpawnCount[npc loc ${Spawn[id ${SpawnSearchID}].X} ${Spawn[id ${SpawnSearchID}].Y} radius 150 zradius 50]}
      /varset SpawnID ${NearestSpawn[${i},npc loc ${Spawn[id ${SpawnSearchID}].X} ${Spawn[id ${SpawnSearchID}].Y} radius 150 zradius 50].ID}      
      /if ( ${SpawnID} != ${SpawnSearchID} && ${PullSingleDistance} ) {
         /if ( ${Spawn[id ${SpawnID}].Z} > ${Math.Calc[${Spawn[id ${SpawnSearchID}].Z}-50]} && ${Spawn[id ${SpawnID}].Z} < ${Math.Calc[${Spawn[id ${SpawnSearchID}].Z}+50]} ) {                        
            /if ( ${Spawn[id ${SpawnID}].Speed} ) {
               /if ( ${Math.Distance[${Spawn[id ${SpawnSearchID}].Y},${Spawn[id ${SpawnSearchID}].X},${Spawn[id ${SpawnSearchID}].Z}:${Spawn[id ${SpawnID}].Y},${Spawn[id ${SpawnID}].X},${Spawn[id ${SpawnID}].Z}]} < ${Math.Calc[${PullSingleDistance}*1.5]} ) {
                  /varset AggroMonsters ${Math.Calc[${AggroMonsters}+1]}
                  /if ( ${AggroMonsters} >= ${aggroCount} ) /return ${SpawnID}
               }
            } else {
               /if ( ${Math.Distance[${Spawn[id ${SpawnSearchID}].Y},${Spawn[id ${SpawnSearchID}].X},${Spawn[id ${SpawnSearchID}].Z}:${Spawn[id ${SpawnID}].Y},${Spawn[id ${SpawnID}].X},${Spawn[id ${SpawnID}].Z}]} < ${PullSingleDistance} ) {
                  /varset AggroMonsters ${Math.Calc[${AggroMonsters}+1]}
                  /if ( ${AggroMonsters} >= ${aggroCount} ) /return ${SpawnID}
               }
            }
         }
      }
   /next i
/return 0 

/call CheckAdds ${Target.ID} "int agro distance" "int number of how manny adds you allow.(if not defined then it will use 1)"

eg:

/call CheckAdds ${Target.ID} 50 2


returning 0 of no adds founed.... if not it will return an Spawn.ID
A_Enchanter_00

Author of:
MQ2AdvPath / ISXEQAdvPath
MQ2Cast ( Author also s0rcier )
MQ2CastTimer
MQ2VoiceCommand

[quote]
If you like my work and want to give somthing back, just click [url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=aenchanter00%40gmail%2ecom&item_name=A_Enchanter_00&no_shipping=2&no_note=1&tax=0&currency_code=USD&lc=DK&bn=PP%2dDonationsBF&charset=UTF%2d8][color=green]HERE[/color][/url] to use PAYPAL.
[/quote]

tums2004
a lesser mummy
a lesser mummy
Posts: 57
Joined: Wed Oct 11, 2006 11:37 am

always a spawn id return

Post by tums2004 » Wed Nov 05, 2008 4:16 pm

So I tried the second code, and it always returns a spawn id. Even when mobs are really close.

simonh
decaying skeleton
decaying skeleton
Posts: 1
Joined: Wed Jun 28, 2006 2:52 pm

Post by simonh » Thu Nov 06, 2008 10:42 am

I'd have to say that this sounds like a very good addition to the Macro archive.

Maybe make something for a HUD that just puts the targets name in green if it's a single pull and red if it got adds?

If that's at all possible, but so far over the years with using and abusing MQ2, it seems like the sky is the limit...

toomanynames
a grimling bloodguard
a grimling bloodguard
Posts: 1844
Joined: Mon Apr 11, 2005 11:10 am

Re: always a spawn id return

Post by toomanynames » Thu Nov 06, 2008 10:52 am

tums2004 wrote:So I tried the second code, and it always returns a spawn id. Even when mobs are really close.
I don't think you're doing it right (but I only briefly looked at the code)

Mobs close = number
No Mobs close = 0
[quote="DKAA"]You cant. Only the server knows.[/quote]

User avatar
A_Enchanter_00
a snow griffon
a snow griffon
Posts: 473
Joined: Mon Dec 12, 2005 4:37 pm
Location: A server near you

Re: always a spawn id return

Post by A_Enchanter_00 » Thu Nov 06, 2008 12:37 pm

toomanynames wrote:
tums2004 wrote:So I tried the second code, and it always returns a spawn id. Even when mobs are really close.
I don't think you're doing it right (but I only briefly looked at the code)

Mobs close = number
No Mobs close = 0
correct
A_Enchanter_00

Author of:
MQ2AdvPath / ISXEQAdvPath
MQ2Cast ( Author also s0rcier )
MQ2CastTimer
MQ2VoiceCommand

[quote]
If you like my work and want to give somthing back, just click [url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=aenchanter00%40gmail%2ecom&item_name=A_Enchanter_00&no_shipping=2&no_note=1&tax=0&currency_code=USD&lc=DK&bn=PP%2dDonationsBF&charset=UTF%2d8][color=green]HERE[/color][/url] to use PAYPAL.
[/quote]

User avatar
A_Enchanter_00
a snow griffon
a snow griffon
Posts: 473
Joined: Mon Dec 12, 2005 4:37 pm
Location: A server near you

Post by A_Enchanter_00 » Thu Nov 06, 2008 12:42 pm

simonh wrote:I'd have to say that this sounds like a very good addition to the Macro archive.

Maybe make something for a HUD that just puts the targets name in green if it's a single pull and red if it got adds?

If that's at all possible, but so far over the years with using and abusing MQ2, it seems like the sky is the limit...
Could use /mapfilter targetradius # ( aggro distance )

This will made a circle around your target then if there is no monsters within the aggro distance then you can single pull it...
A_Enchanter_00

Author of:
MQ2AdvPath / ISXEQAdvPath
MQ2Cast ( Author also s0rcier )
MQ2CastTimer
MQ2VoiceCommand

[quote]
If you like my work and want to give somthing back, just click [url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=aenchanter00%40gmail%2ecom&item_name=A_Enchanter_00&no_shipping=2&no_note=1&tax=0&currency_code=USD&lc=DK&bn=PP%2dDonationsBF&charset=UTF%2d8][color=green]HERE[/color][/url] to use PAYPAL.
[/quote]

tums2004
a lesser mummy
a lesser mummy
Posts: 57
Joined: Wed Oct 11, 2006 11:37 am

Works

Post by tums2004 » Thu Nov 13, 2008 12:52 pm

Ok it does work, I was screwing it up. I get paid tom,. Ill donate then

tums2004
a lesser mummy
a lesser mummy
Posts: 57
Joined: Wed Oct 11, 2006 11:37 am

payment Made

Post by tums2004 » Fri Nov 14, 2008 12:09 pm

Payment made as promised :) Thanks.

User avatar
A_Enchanter_00
a snow griffon
a snow griffon
Posts: 473
Joined: Mon Dec 12, 2005 4:37 pm
Location: A server near you

Post by A_Enchanter_00 » Mon Nov 17, 2008 3:40 pm

welcome and thanks
A_Enchanter_00

Author of:
MQ2AdvPath / ISXEQAdvPath
MQ2Cast ( Author also s0rcier )
MQ2CastTimer
MQ2VoiceCommand

[quote]
If you like my work and want to give somthing back, just click [url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=aenchanter00%40gmail%2ecom&item_name=A_Enchanter_00&no_shipping=2&no_note=1&tax=0&currency_code=USD&lc=DK&bn=PP%2dDonationsBF&charset=UTF%2d8][color=green]HERE[/color][/url] to use PAYPAL.
[/quote]

xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Retard useable safe to pull sub

Post by xyilla » Tue Sep 02, 2025 6:20 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: Retard useable safe to pull sub

Post by xyilla » Tue Sep 02, 2025 6:57 pm