how to zone in pok?

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

User avatar
gimp
a grimling bloodguard
a grimling bloodguard
Posts: 584
Joined: Fri Oct 29, 2004 9:28 am
Location: internet

how to zone in pok?

Post by gimp » Fri Oct 29, 2004 3:43 pm

hi all, the impatient noob speaking again :-)
im trying to get a script spanning multiple zones working. as long as the zoning is a matter of move-in-this-direction, i dont have a problem, but in pok (and anywhere where you have to click on something to zone/teleport) im stuck

atm im standing at tranquility stone in pok, trying to make a script to zone in there.

Code: Select all

|POKPTPORT500 is the 'door' name of potranquility stone in pok
/doortarget POKPTPORT500
/face nolook door
this much i figured out from looking at other example code, but from here, i cant seem to figure out how to 100% accuratley make the click-on-stone zoning to happen. i have experimented a bit, for example:

Code: Select all

/click left
works, IF mouse cursor is in center of screen, AND IF no other player/npc is in front of what im trying to click. also, i cant figure out how to center mouse cursor in screen (without having to define constants in the script depending on current resolution) with the /mouseto command

Code: Select all

/mouseto 0 0
moves mouse cursor to top left corner, is there a variable somewhere that is storing the current x & y resolution? so i could something like (THIS CODE IS NOT VALID!!):

Code: Select all

/mouseto ${Math.Abs[${Window.Width}/2]} ${Math.Abs[${Window.Height}/2]}
I apologize if that was a stupud question, but i've looked for an answer throughout in forums and chm manual

edit: added note about the window.width etc code is NOT VALID

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Fri Oct 29, 2004 3:49 pm

I believe other people have used the "activate" function to do this . . . IE pressing the "u" key or whatever you have it mapped to.

Take a look at advpath and how it handles it.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Re: how to zone in pok?

Post by ieatacid » Fri Oct 29, 2004 4:10 pm

gimp wrote:

Code: Select all

/click left
works, IF mouse cursor is in center of screen, AND IF no other player/npc is in front of what im trying to click
This would work

Code: Select all

/click left target

but

Code: Select all

/keypress U
works fine too.

User avatar
gimp
a grimling bloodguard
a grimling bloodguard
Posts: 584
Joined: Fri Oct 29, 2004 9:28 am
Location: internet

Post by gimp » Fri Oct 29, 2004 5:05 pm

Thanks for the feedback! I tried

Code: Select all

/doortarget
/face nolook door
/click left target
(im in first-person-view. standing at -147.96, -317.79, -152.87 in pok, rigth in front of potranq stone), but it just spit out:

Code: Select all

Targeted (NPC): POKPTPORT
Right click on the NPC to consider him.

Code: Select all

/keypress U
does nothing at alll to me, but a simple press on U key in same condition works fine. i also tried target a player and /click right target, and just got the con message. Can this depend on my /toggleinspect setting in eq?

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Fri Oct 29, 2004 5:23 pm

/click left target does not work on doors:

Code: Select all

pEverQuest->LeftClickedOnPlayer(pTarget);
You need to use keypress:

Code: Select all

/keypress use hold
/delay 1
/keypress use
There is some sort of polling going on with the doors where a simple keypress doesn't always work.

User avatar
gimp
a grimling bloodguard
a grimling bloodguard
Posts: 584
Joined: Fri Oct 29, 2004 9:28 am
Location: internet

Post by gimp » Fri Oct 29, 2004 5:55 pm

ty dont_know_at_all, your sugesstion worked perfectly!!!

Code: Select all

/doortarget
/face nolook door
/keypress use hold
/delay 1
/keypress use

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Fri Oct 29, 2004 6:47 pm

I just use, similar to what AdvPath uses I think.

Code: Select all

Sub ExitZone
   /declare ZoneTimer timer outer
   /declare InCurrZone string local
   /varset InCurrZone ${Zone.Name}

   /doortarget
   /delay 3
   
   /if (${Target.Distance}<=50) {
      /face fast nolook door
      /keypress USE hold
      /keypress USE
      /delay 1
      /keypress USE hold
      /keypress USE
      /varset ZoneTimer 5s
      :WaitForZone
      /delay 1
      /if (${Zone.Name.NotEqual["${InCurrZone}"]}) /goto :Zoned
      /if (${ZoneTimer}>0) /goto :WaitForZone
   }
   :Zoned
/return