Help with summoning.

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 095. Note: Core 095 is no longer officially supported.
Post Reply
User avatar
The_Visitor
New User
Posts: 9
Joined: Fri Oct 26, 2007 5:29 am

Help with summoning.

Post by The_Visitor »

Hello I have a problem with ppl summoning stuff inside ppls houses when they are standing outside the house.

Code: Select all

include "include/spelldata";
include "include/client";

program summon_air( parms )

	var circle := 8;
	var caster;
	var cast_loc;
	var fromhit;

	if (parms[1] == "#MOB")
		caster := parms[2];
		cast_loc := parms[3];
		if (parms[4])
			circle := parms[4];
		endif
		if (parms[5])
			fromhit := parms[5];
		endif

	else
		caster := parms;
		cast_loc := TargetCoordinates( caster );
		if (!cast_loc)
			return;
		if(cast_loc.multi)
		SendSysMessage( caster, "You cant summon there");
		return;
		endif
	endif
	SummonCreature( caster, "airelemental", cast_loc );

endprogram
Like you can see I have added if(cast_loc.multi) but it dosent do anything.
Anyone have a clue what I can do to cancel the target if they are trying to summon inside the house from the outside?
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Re: Help with summoning.

Post by ncrsn »

TargetCoordinates() does not return multi info.

You have to work around it using the x, y and z members it does have - one way could be using GetStandingHeight (http://docs.polserver.com/pol097/single ... e=uoem.xml).
User avatar
The_Visitor
New User
Posts: 9
Joined: Fri Oct 26, 2007 5:29 am

Re: Help with summoning.

Post by The_Visitor »

Thx that did the trick :)
Post Reply