goto.mac

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

goto.mac

Post by Amadeus » Tue Jul 23, 2002 6:59 pm

I had a thought today for those looking for new macro ideas (I just joined a guild, so I have no time lately..though I'll eventually get to it if no one else does). It would work like this:

/macro goto 24,-153

....and it would make your char walk/run to that exact location :)


Perhaps this has already been done and I'm falling asleep on the job.... :twisted:

User avatar
Goge
Macro Author
Macro Author
Posts: 71
Joined: Sat Jun 15, 2002 11:55 am
Location: Terra

Post by Goge » Tue Jul 23, 2002 8:16 pm

well something similar is in existence.
look in routiens.mac there is a goto sub that when called will walk towards a given loc and also a target.

what we need to make are pathway files for zones so you can type /goto bank and it will walk towards the nearest nav point then follow a specific number of nav point till it gets to the bank or what ever else you ask for.
this would be mainly used for inside towns/cities i suppose.
He who sleep with Itchy arse wake with Smelly finger.

gingertips
a hill giant
a hill giant
Posts: 230
Joined: Wed Jun 26, 2002 3:47 am
Location: Tseu-Qorcam

Post by gingertips » Wed Jul 24, 2002 4:56 am

Nice - i like this idea - i have a macro idea id like to incorporate this into.

yes waypoints will need to be set - will look at this a bit more

User avatar
Nuad
a ghoul
a ghoul
Posts: 93
Joined: Thu Jun 27, 2002 11:43 am
Location: Berlin, Germany

Post by Nuad » Wed Jul 24, 2002 5:26 am

Goge wrote:what we need to make are pathway files for zones so you can type /goto bank and it will walk towards the nearest nav point then follow a specific number of nav point till it gets to the bank or what ever else you ask for.
this would be mainly used for inside towns/cities i suppose.
Hmm... what about talking with the eqemu dev. team? I think they are working on a waypoint system...

nikeman
a lesser mummy
a lesser mummy
Posts: 70
Joined: Tue Jun 18, 2002 10:37 am

Post by nikeman » Wed Jul 24, 2002 8:44 am

hum just a small lil question theres a grid for every thing in every zone right? mobs can only path on this grid why not use grid to do it?

GD
a snow griffon
a snow griffon
Posts: 353
Joined: Sat Jun 29, 2002 11:57 pm

Post by GD » Wed Jul 24, 2002 8:17 pm

Because that grid is serverside most likely, as all mobs are ran serverside.
Opinions are like assholes, everyone has one, but most of them stink.

User avatar
tuxracer
Esse Quam Videri
Esse Quam Videri
Posts: 165
Joined: Fri Jul 26, 2002 1:01 am

Post by tuxracer » Thu Aug 08, 2002 10:49 pm

How about just having MacroQuest load .map files for zones, then have it so it is able to walk around walls and turn corners and such depending on the map. Somewhat complicated but it could work. Or you could have it follow pathes made in .map files. This would require making custom .map files for the zones, as apposed to being able to download already made ones, but it would make things a lot simpler. Then you can have MacroQuest follow a line of a specific color for example. "/walkpath green forward" to find the nearest green line, and walk forward on it.
[url=http://www.studentpeaceaction.org/][img]http://www.studentpeaceaction.org/images/support.gif[/img][/url]

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

Post by L124RD » Thu Aug 08, 2002 11:53 pm

Salutations,
well, if we ever get file i/o and get over macro viruses, we could do that by hand...

Cheese
a lesser mummy
a lesser mummy
Posts: 39
Joined: Fri Aug 09, 2002 6:42 am

Post by Cheese » Fri Aug 09, 2002 6:45 am

Couldn't we just put that into the C code, i.e. add some commands in such as..

/loadnavmap lakeofillomen.map
/navmap get_nearest_nav_point <current loc x,y,z>
returning a loc to us, then we do..
/walkto <nearest_nav_point_loc x,y,z>

/navmap get_num_nav to <bank loc>
returns number of points to the bank

/navmap get_nav_point to <bank loc> 0
returns another loc.
/walkto <returned loc x,y,z>

/navmap get_nav_point to <bank loc> 1
returns another loc.
/walkto <returned loc x,y,z>

get_nav_point would be done for each nav point we need to follow to get to our destination loc.

Will have a look at implementing this once I have more time, I'm still having problems with MQ on my pc's so will be a while yet.

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

Post by L124RD » Fri Aug 09, 2002 11:42 am

Salutations,
yea, but this way: 1) less work for devs, 2) bug testing for macroers!
You'll find the bugs if you do something that hasn't yet been done

User avatar
tuxracer
Esse Quam Videri
Esse Quam Videri
Posts: 165
Joined: Fri Jul 26, 2002 1:01 am

Post by tuxracer » Fri Aug 09, 2002 2:52 pm

L124RD wrote:Salutations,
well, if we ever get file i/o and get over macro viruses, we could do that by hand...
I think giving MacroQuest file i/o is a bad idea. Because we will always have stupid ass little script kiddies out there making macros that will overwrite system files and such. And not everyone looks at all the code, esspecially people new to MQ and wouldn't realize MQ has that capibility. :?
[url=http://www.studentpeaceaction.org/][img]http://www.studentpeaceaction.org/images/support.gif[/img][/url]

yocal
a lesser mummy
a lesser mummy
Posts: 43
Joined: Fri Jun 14, 2002 12:28 pm
Location: Denmark
Contact:

Map

Post by yocal » Sun Aug 11, 2002 6:07 am

Salute...

Im currently working on a map.mac :)

usage: /macro map dlspires fm
(with /alias /goto /macro map)
usage: /goto dlspires fm

...will make you go from dreadlands spires to frontier mountains

currently covering the most of antonica and faydwar.


// Yoc.

Nerfy
a lesser mummy
a lesser mummy
Posts: 72
Joined: Tue Oct 15, 2002 11:37 am

Post by Nerfy » Sat Oct 19, 2002 8:09 pm

Never saw any code posted, so here's the macro. Very easy one - especially when I copy & pasted out of Fippy's Hunter.mac. Enjoy.

Code: Select all


| goto.mac
|
| Usage: /macro goto X, Y
|
| By Nerfy who copy and pasted code from
| Fippy's Hunter.mac

#define Xpos $p1 
#define Ypos $p2 
#define Xcur v51 
#define Ycur v52 
#define ThereYet v53

Sub Main 

  /press esc 
  /press esc 
  /press esc 
  /press esc 
  /press alt 
  /press shift 
  /press ctrl

  :GoToPoint 
	/varset ThereYet 0
	/face loc $Ypos,$Xpos 
          
         | If we are not within melee range then make sure we are on autorun 
         /if n $distance($Ypos,$Xpos)>15 /call Autorun 1 

         | Current Loc
         /varset Xcur $char(x) 
         /varset Ycur $char(y) 

         | Obstacle routine if stuck
         /delay 1 
         /if n $MyXLoc==$char(x) /if $MyYLoc==$char(y) /call Obstacle 
          
         | End movement when near to point.
         /if n $distance($Ypos,$Xpos)<5 { 
            /call Autorun 0 
            /varset ThereYet 1 
         } 
            
          /delay 0 
   /if n $ThereYet!=1 /goto :GoToPoint 
   /echo Here we are.
/return
  

sub Obstacle 

   | We appear to be stuck so try and backup and strafe sideways 
   /sendkey up up 
   /sendkey down down 
   /delay 2 
   /sendkey up down 
   /sendkey down ctrl 
   /if n $rand(99)>50 { 
      /sendkey down right 
   } else { 
      /sendkey down left 
   } 
   /delay 3 
   /sendkey up right 
   /sendkey up left 
   /sendkey up ctrl 
   /sendkey down up 
/return 

Sub AutoRun
   /if $p0==1 /sendkey down up 
   /if $p0==0 /sendkey up up 
/return 


----------
* Nerfy *

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Sun Oct 20, 2002 6:08 am

Ya know nerfy i like that idea, maybe using the avoidloc sub from my hunter script too then you could have quite a powefull goto routine that avoids areas but still does not need a huge list of waypoints.



As for local file access, Xylobot has this and I have not seen any major problems. Worrying about 'Script kiddies' is in my opinion not worth considering. If local access is turned off by default and the risks of turning it on are documented then whats the problem. If somebody is dumb enough to run a script that has local file access and they dont read it first then they prolly already have upteen trojans they caught from email viruses anyway.

It not like you could do more damage with local file access than without, I mean what would be worse a script that overwrote a dll with crap, (At worst a reinstall of the OS to fix) or one that auto dropped all your equipment then went into an infinite unbreakable loop. By the time you endtask eq and log back on, who knows what kit would still be on the floor.

Fippy