Page 1 of 1

how to zone in pok?

Posted: Fri Oct 29, 2004 3:43 pm
by gimp
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

Posted: Fri Oct 29, 2004 3:49 pm
by fearless
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.

Re: how to zone in pok?

Posted: Fri Oct 29, 2004 4:10 pm
by ieatacid
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.

Posted: Fri Oct 29, 2004 5:05 pm
by gimp
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?

Posted: Fri Oct 29, 2004 5:23 pm
by dont_know_at_all
/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.

Posted: Fri Oct 29, 2004 5:55 pm
by gimp
ty dont_know_at_all, your sugesstion worked perfectly!!!

Code: Select all

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

Posted: Fri Oct 29, 2004 6:47 pm
by Night Hawk
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