Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2015, 01:50 PM
Asylum
Sarnak
 
Join Date: Jun 2013
Posts: 81
Default

"So the ghanja's code works, but it sends me to the zone safe spots rather than the druid ring. Would it make sense to add the x,y,z,h values into the $porthash array and call them in a quest::movenpc rather than a quest::zone command?"

You will want to use quest::movepc(zone_id,x,y,z,h) not quest::movenpc because the object you're trying to port is the player character. Just using quest::zone sends to the save coordinates of the zone. Simply run to the druid rings of your destination zone, target yourself, type #loc (NOT /loc unless you like reversing x and y), and use that location in the quest::movepc command. The zone_id portion will accept numbers for the zone IDs or pass it the zone shortname with $text. I haven't searched the plugins folder for it but someone may have made a plugin that converts zone shortname to ID#.
Reply With Quote
  #2  
Old 04-18-2015, 08:08 PM
Asylum
Sarnak
 
Join Date: Jun 2013
Posts: 81
Default

As if on cue, thanks Kingly

http://www.eqemulator.org/forums/showthread.php?t=39579
Reply With Quote
  #3  
Old 04-18-2015, 11:17 PM
markusdabrave's Avatar
markusdabrave
Sarnak
 
Join Date: Jan 2012
Location: Plano, TX
Posts: 70
Default

Quote:
Originally Posted by Asylum View Post
"So the ghanja's code works, but it sends me to the zone safe spots rather than the druid ring. Would it make sense to add the x,y,z,h values into the $porthash array and call them in a quest::movenpc rather than a quest::zone command?"

You will want to use quest::movepc(zone_id,x,y,z,h) not quest::movenpc because the object you're trying to port is the player character. Just using quest::zone sends to the save coordinates of the zone. Simply run to the druid rings of your destination zone, target yourself, type #loc (NOT /loc unless you like reversing x and y), and use that location in the quest::movepc command. The zone_id portion will accept numbers for the zone IDs or pass it the zone shortname with $text. I haven't searched the plugins folder for it but someone may have made a plugin that converts zone shortname to ID#.
I'm a derp. Should learn to not write code at 2am probably. I actually had the quest::movepc correct in the quasi-working script. Though trying to use those coordinates in my array has resulted in my NPC not responding (even with the movenpc->movepc fixed). Right now I'm trying to dig up an example of pulling multiple values from an array to see where my syntax went sideways. I'm suspect probably this that's breaking it:

Code:
quest::movenpc($porthash{$key}[1],[2],[3],[4],[5]);
Markusdabrave = Perlnoob
Reply With Quote
  #4  
Old 04-18-2015, 11:28 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

1) You have to access the hash elements the same way every single time.

Code:
quest::movepc($porthash{$key}[1], $porthash{$key}[2], $porthash{$key}[3], $porthash{$key}[4], $porthash{$key}[5]);
2) The API call is quest::movepc not quest::movenpc
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:25 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3