View Full Version : Help with quest::set_proximity
JrFaust
12-14-2006, 02:36 PM
So far what I
Cripp
12-14-2006, 02:46 PM
heres a working example of a proximity..
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
quest::set_proximity($x - 20, $x + 20, $y - 8, $y + 8, $z - 15, $z + 50);
}
sub EVENT_ENTER
{
quest::movepc(34,-780,2120,5);
}
quest::set_proximity(minx,maxx,miny,maxy,miz,maxz) is what it is so you have to specify the exact locs you can even just make it like..
quest::set_proximity(200,-200,100,-100,10,-10);
this would make a proximity at those same coords.
hope this makes sense and helps :)
edit: yours is probably working but you have to go to the coords 0,30
Angelox
12-14-2006, 02:47 PM
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 30, $x + 30, $y - 30, $y + 30);
}
EDIT;
I fixed the last line, yours was bad
JrFaust
12-14-2006, 03:09 PM
oh see I thought that the code ment the distance away from the NPC.
sub EVENT_SPAWN {
quest::set_proximity(0,30,0,30,0,30);
}
So that 0 would be right on top of the NPC and 30 would be 30 units away from the NPC in all directions. But what your saying is that it means that I have to be at 0,30 to get the reaction, yes or no?
JrFaust
12-14-2006, 03:26 PM
I just tested the code below and that works just as I wanted thank you Angelox and Cripp.
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
quest::set_proximity($x - 30, $x + 30, $y - 30, $y + 30, $z - 30, $z + 30);
}
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.