Log in

View Full Version : Client Location


Esildor
02-04-2017, 04:49 PM
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. 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.