EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Client Location (https://www.eqemulator.org/forums/showthread.php?t=41134)

Esildor 02-04-2017 04:49 PM

Client Location
 
Is there a way to get grab a client's current location for spawning an NPC?

Like how you can do $x = $npc->GetX();

Kingly_Krab 02-04-2017 05:15 PM

NPCs export $x, $y, $z, and $h. However, clients do not. So you'd have to do something like this.
Code:

sub EVENT_SAY {
    if ($text=~/#Test/i) {
        quest::spawn2(ID, 0, 0, $client->GetX(), $client->GetY(), $client->GetZ(), $client->GetHeading());
    }
}


Esildor 02-04-2017 07:08 PM

Awesome thank you KK.

I had tried that or something similar but did GetH(); insteading of GetHeading() ... should have double checked my syntax on the perl reference sheet.


All times are GMT -4. The time now is 12:53 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.