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 12-28-2009, 05:44 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

As a workaround, until you are able to upgrade, you could call $client->SetHeading(<heading>) right before quest::movepc.
Reply With Quote
  #2  
Old 12-28-2009, 06:56 AM
Lillu
Hill Giant
 
Join Date: Sep 2008
Posts: 204
Default

Thanks for the workaround Derision, works perfectly!
__________________
Reply With Quote
  #3  
Old 12-29-2009, 02:43 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Thanks, Derision, but for some reason it's still not working. Here is the script for my transporter NPC:

Code:
sub EVENT_SPAWN
	{
	$x = $npc->GetX();
	$y = $npc->GetY();
	quest::set_proximity($x - 60, $x + 60, $y - 60, $y + 60);
	}

sub EVENT_ENTER
	{
	$client->SetHeading(0);	
	quest::movepc(16,-63,-802,59);
	}
The transporter stands at a point that forces a PC to enter his proximity at a heading of SE. When the PC enters the proximity of the transporter, I can see by my compass that the heading changes from SE to N right before zone (hence, the $client function is working, at least initially). However, when I land in the destination zone, I end up facing SE again.

Lillu, I'd be interested in knowing if my script works on your server (particularly, whether you end up facing North in Beholder coming from a heading of SE in the sending zone as you enter the transporter's proximity using my script). I'd also like to see if I can reproduce your results with the script that you said works perfectly. Could you post that script here? Thanks.
Reply With Quote
  #4  
Old 12-29-2009, 03:30 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

You will need to put a heading parameter in the quest::movepc call. Any heading, it doesn't matter what. If you leave the heading parameter off, it will default to a heading of zero.

If there is a heading there, the bug in the code prior to 1063 will mean it will use whatever heading you are currently facing, which should be the heading you set with $client->setheading().

This is the quest I used to to test the workaround:
Code:
sub EVENT_SAY {
        if($text=~/Hail/i){
                quest::say("I am Guard Philbin.");
                $client->SetHeading(45);
                quest::movepc(2, -223, 694, 4, 128);
        }
}
And I ended up in North Qeynos with a heading of 45.

Edit: After reading your post again, my explanation doesn't make sense, but try putting a random heading in the movepc call and see if it uses the heading from your $client->SetHeading call
Reply With Quote
  #5  
Old 12-29-2009, 04:33 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Thanks, Derision; that failed to work as well. My code now looks like this:
Code:
sub EVENT_SPAWN
	{
	$x = $npc->GetX();
	$y = $npc->GetY();
	quest::set_proximity($x - 60, $x + 60, $y - 60, $y + 60);
	}

sub EVENT_ENTER
	{
	$client->SetHeading(0);	
	quest::movepc(16,-63,-802,59,0);
	}
I also tried plugging in your headings, and placing the $client function after the quest::movepc function, and got the same results.
Reply With Quote
  #6  
Old 12-29-2009, 05:08 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

I did some further testing on this and found an oddity. I changed the event from an ENTER to the following SAY, and it works:

Code:
sub EVENT_SAY
	{
	if($text=~/Hail/i)
		{
		quest::say("You are taking a dangerous road, $name.Beware.");
		$client->SetHeading(255);
		quest::movepc(16,-63,-802,59,255);
		}
	}
The PC successfully faces north (incidentally, I tried 0 in place of 255--which should also face north--and it it ignored). When I change it back to an ENTER event, . . .
Code:
sub EVENT_SPAWN
	{
	$x = $npc->GetX();
	$y = $npc->GetY();
	quest::set_proximity($x - 60, $x + 60, $y - 60, $y + 60);
	}

sub EVENT_ENTER
	{
	quest::say("You are taking a dangerous road, $name. Beware.");
	$client->SetHeading(255);
	quest::movepc(16,-63,-802,59,255);
	}
. . . the heading is again ignored, and I simply land in Beholder facing SE again. The only difference between these scenarios is the event I am using. I am facing the same direction when triggering both events, and the functions are otherwise identical. Is it possible it it the ENTER event that is broken and not the quest::movepc() function?
Reply With Quote
  #7  
Old 12-29-2009, 05:25 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

I found the same thing (works in EVENT_SAY but not EVENT_ENTER). Even the fix I made in Rev1063 behaves oddly in EVENT_ENTER, even though it worked fine in EVENT_SAY.

I'll take another look at it in the next day or two.
Reply With Quote
  #8  
Old 08-31-2010, 05:04 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by neiv2 View Post
I did some further testing on this and found an oddity. I changed the event from an ENTER to the following SAY, and it works:

Code:
sub EVENT_SAY
	{
	if($text=~/Hail/i)
		{
		quest::say("You are taking a dangerous road, $name.Beware.");
		$client->SetHeading(255);
		quest::movepc(16,-63,-802,59,255);
		}
	}
The PC successfully faces north (incidentally, I tried 0 in place of 255--which should also face north--and it it ignored). When I change it back to an ENTER event, . . .
Code:
sub EVENT_SPAWN
	{
	$x = $npc->GetX();
	$y = $npc->GetY();
	quest::set_proximity($x - 60, $x + 60, $y - 60, $y + 60);
	}

sub EVENT_ENTER
	{
	quest::say("You are taking a dangerous road, $name. Beware.");
	$client->SetHeading(255);
	quest::movepc(16,-63,-802,59,255);
	}
. . . the heading is again ignored, and I simply land in Beholder facing SE again. The only difference between these scenarios is the event I am using. I am facing the same direction when triggering both events, and the functions are otherwise identical. Is it possible it it the ENTER event that is broken and not the quest::movepc() function?
Perhaps have the '$client->SetHeading();' process AFTER quest::movepc();
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 03:42 PM.


 

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