How can I test whether x, y, z, realm is inside a multi?

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
Yukiko
Distro Developer
Posts: 2502
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

How can I test whether x, y, z, realm is inside a multi?

Post by Yukiko » Thu Oct 12, 2017 10:13 pm

The way I've always seen this done is by moving an invisible item, usually a gold coin, to the location in question. Then testing the object for the multi member, ie. object.multi.

Is there a better way to do this?

I thought there was but I can't remember it.

It would be handy to have a Core function to do this check. Something like IsLocationInAMulti(x, y, z, realm)
Return values: 0=no, 1=yes, and error-Location not valid for the realm, error-Invalid realm parameter.

Something like that.
Sincerely,
Yukiko

I would tell you a UDP joke but you might not get it.

Titus 2:13

DevGIB
Grandmaster Poster
Posts: 204
Joined: Mon Feb 06, 2006 6:12 am

Re: How can I test whether x, y, z, realm is inside a multi?

Post by DevGIB » Fri Oct 13, 2017 12:18 am


Turley
POL Developer
Posts: 644
Joined: Sun Feb 05, 2006 4:45 am

Re: How can I test whether x, y, z, realm is inside a multi?

Post by Turley » Fri Oct 13, 2017 7:12 am

Yes that's exactly the function you should use:
Var ismultiloc:=listmultisinbox(x,y,z,x,y,z,realm).size()>0;

Yukiko
Distro Developer
Posts: 2502
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: How can I test whether x, y, z, realm is inside a multi?

Post by Yukiko » Fri Oct 13, 2017 8:43 am

Just set both sets of coordinates to the same x, y, and z like Dev and I discussed on Discord. Sounds good to me. Thanks guys.
Sincerely,
Yukiko

I would tell you a UDP joke but you might not get it.

Titus 2:13

Post Reply