Request: Spawn Check By Location

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Request: Spawn Check By Location

Post by YKW-28983 » Fri Jan 03, 2003 11:34 pm

Would it be possible to implement spawn checking for mobs that spawn to a static loc? It would be useable in many of my scripts.

zedisdeadbaby
a ghoul
a ghoul
Posts: 83
Joined: Sun Nov 03, 2002 4:24 pm

Post by zedisdeadbaby » Sat Jan 04, 2003 5:16 am

seconded. :D

right now i use a crappy prog that reads input from tail -f showeqspawnlog.txt, if it's possible to do in MQ that'd make things a lot easier.

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

Post by L124RD » Sat Jan 04, 2003 6:21 am

Salutations,
I think this would be cool but, YKW: what?

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Post by YKW-28983 » Sat Jan 04, 2003 4:43 pm

Hmm... What What? What are you asking.

Would it be possible to stuff it in alert?

$target(y) $target(x) $target(z)

Code: Select all

/alert add # [pc,npc,corpse,any] [loc x,y,z] [range min max] [radius radius] spawn

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Post by YKW-28983 » Sat Jan 04, 2003 5:02 pm

You could also do it this way and put the distance of the lock into an array that you can look for. I haven't bothered getting the giants spawn. Doing that right now.
$distance(y,x)
Returns the distance to a location

Code: Select all

| name: igcheck
| Use  /macro igcheck [NORTH, SOUTH, BACK]

#define NORTHX "-6464.00"
#define NORTHY "2005.00"

#define SOUTHX "-6463"
#define SOUTHY "1758"
 
#define BACKX "-6864.00"
#define BACKY "1834.00"

#define LocDistance v1
#define BeepCount v2

Sub Main
 :DISTANCE CHECK
 /varset LocDistance $distance($p0y,$p0x)
 :Alert
 /alert clear 1
 /alert add 1 npc Range $LocDistance $LocDistance giant
 :AlertBeep
 /if $alert(1)==TRUE {
  /varadd BeepCount 1
  /if BeepCount < 6 {
   /beep
  }
 }
 /goto :AlertBeep
/return

Hmm whoa, I think I did it.

Updated the code, I think it should work now.
Last edited by YKW-28983 on Sun Jan 05, 2003 5:02 pm, edited 1 time in total.

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

Post by L124RD » Sat Jan 04, 2003 8:38 pm

Salutations,
YKW: I have no clue what I was talking about
this makes total sense, and is a great idea, I'd say it should be used more in a sense of 'targets the nearest to a location'

Code: Select all

/target loc x,y,z Guard

Code: Select all

/alert add 1 loc x,y,z Guard

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Post by YKW-28983 » Sun Jan 05, 2003 2:32 am

Aye, would be verry nice to have.... :D . I haven't even gotten a chance to test my little script above out but i'll be trying it soon.

Eh, UPDATE:

it won't let me set distance to the distance from loc...

it inputs the range as 0 0 instead of what it should be.

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

Post by L124RD » Sun Jan 05, 2003 3:21 am

Salutations,
to find a dist between a loc and another loc you need to use trig :twisted:

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Hmm

Post by YKW-28983 » Sun Jan 05, 2003 8:09 pm

Alls it should be doing is finding the distance between where I am and another loc, it works fine when I echo it manually, but when I put it to echo in script it gets f'ed. It will echo 6755 no matter what I put in.

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

Post by SingleServing » Mon Jan 06, 2003 1:00 am

Code: Select all

|***********************************************************|
| Note All these values are guessed looking at a map of everfrost
| the values on the headings assume East is 0 and the gotoloc
| is also a [b]bad[/b] estimate. 
|
| IMPORTANT!!
| I have not tested this so you [b]must[/b] to fix the headings,
| the gotoloc and any other bugs that might occur
| 
| Disclaimer : If this macro downloads gay porn and emails 
| it to your wife's friends, drinks your beers or flushes 
| the toilet while you are in the shower I am not responsible
|***********************************************************|


#define tID1 a(1,1)
#define tID2 a(1,2)
#define tID3 a(1,3)
#define GiantTotal a(1,4)
#define East a(1,5)
#define North a(1,6)
#define South a(1,7)
#define Counter v01

#include routines.mac

Sub Main 

/gotoloc 1750,-6600

:Top

/zapvars
/press Esc
/target npc giant

/if "$target(name)"=="NULL" { 
	/mqlog No Giants pausing for 15s
	/delay 15s
	/goto :Top
}


/varset tID1 $target(id)
/call CheckSpawn

/call GetNTarg
/varset tID2 $target(id)

/if n $tID1==$tID2 {
	/call DResults
	/return
}

/call CheckSpawn

/call GetNTarg

/varset tID3 $target(id)
/if n $tID1==$tID3 {
	
	/call DResults
	/return
}

/if n $tID2==$tID3 {
	
	/call DResults
	/return
}

/call CheckSpawn
/call DResults

/return 
|*******************************************|

Sub GetNTarg 

:Loop 

/target id $target(next) 
/if "$target(name,clean)"!~"An Ice Giant" /goto :Loop 

/return

|*******************************************|

Sub CheckSpawn

/face nopredict

/if n $char(heading)==350 {
	/varadd GiantTotal 1
	/varset East 1
	/return
}

/if n $char(heading)==120 {
	/varadd GiantTotal 1
	/varset North 1
	/return
}

/if n $char(heading)==260 {
	/varadd GiantTotal 1
	/varset South 1
	/return
}
/return

|*******************************************|

Sub DResults

/beep
/delay 5
/beep
/delay 5
/beep
/if n $East==1 /echo East spawn is up!
/if n $North==1 /echo North spawn is up!
/if n $South==1 /echo South spawn is up!
/echo A total of $GiantTotal spawns are up!
/return
[color=DarkBlue]Everything,[/color] [color=DarkBlue][b]is[/b][/color] [color=black]black[/color] [color=DarkBlue]and[/color] [color=white]white[/color][color=DarkBlue], when you zoom out it looks[/color] [color=gray]grey[/color][color=DarkBlue].[/color]

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Post by YKW-28983 » Mon Jan 06, 2003 2:15 pm

Single can you just leav me alone? you don't know what i'm trying to do, and it's verry clear that you don't with that script you just wrote.
/target npc giant
If there are no ice giants up then you will get a spider or something else.


And you don't look east when you are camping the back giant...

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

Post by SingleServing » Mon Jan 06, 2003 10:27 pm

YKW-28983 wrote:Single can you just leav me alone? you don't know what i'm trying to do, and it's verry clear that you don't with that script you just wrote.
/target npc giant
If there are no ice giants up then you will get a spider or something else.


And you don't look east when you are camping the back giant...
1. I'm pretty sure I know what you are trying to do, and if I don't then it is a communication problem on your part and not my problem.

2. I forgot about the giant spiders in the zone but since you like to flame it appears you too damn dumb to change it to /target npc "an ice giant" or something else that will only target ice giants.

3. As I made sure to state in my post THIS WAS NOT TESTED AND REQUIRED DEBUGGING!!!!!!

4. I was only trying to help and find a useful application for the mob cycling idea, get off your high horse Mr. I can't figure out a way to do this (that works).

5. Finally, I tried to guess a location between all three giants based on a map. I did not test or find any of these values in game. The code should work if you change them. :idea: :idea: Find a location your happy with target each giant find the heading to each giant at the "gotoloc" and update the code with real in game values.

PS $char(heading) does not return north east south west it returns a polar value. You need that value and not "East". East, north, and south are simply ways to indicate what giant is up. The north most giant, the east most giant or the south most giant. If you prefer back instead of east who cares change it
[color=DarkBlue]Everything,[/color] [color=DarkBlue][b]is[/b][/color] [color=black]black[/color] [color=DarkBlue]and[/color] [color=white]white[/color][color=DarkBlue], when you zoom out it looks[/color] [color=gray]grey[/color][color=DarkBlue].[/color]

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Post by YKW-28983 » Tue Jan 07, 2003 2:20 pm

YOU DO NOT CAMP ALL 3 GIANTS AT ONCE! YOU CAN NOT JUST PICK ONE SPOT TO FIND EVERYTHING!
I forgot about the giant spiders in the zone but since you like to flame it appears you too damn dumb to change it to /target npc "an ice giant" or something else that will only target ice giants.
I was not flaming, I was simply telling you, that your script had an error in it. You said you wanted tests and debugging, so go screw yourself.

Malachi
a hill giant
a hill giant
Posts: 227
Joined: Tue Nov 19, 2002 1:29 am
Contact:

Sniff sniff

Post by Malachi » Tue Jan 07, 2003 6:33 pm

Sniff sniff, I smell poo. Who is throwing the poo?

I have this picture of two professor type monkeys sitting in their zoo cage and throwing poo at each other, and then fighting over who threw the poo.

Monkey 1: I didn't fro no poo!
Monkey 2: Yesh you did, you stinky poo thrower!
Monkey 1: You da stinky poo frower, you poo frowin stinky monkey!
Monkey 2: Go to hell you monkey!

Yeah, so I'm easily amused. I bet this thread'll get locked soon.

~Malachi
~Oh danny boy, the pipes the pipes are calling.~