Page 1 of 1

UOSteam - Determine relative location

Posted: January 5th, 2022, 7:54 pm
by kakel_anders
Hi all, been a while!

I'm currently working on a very interesting script for SteamUO that is just about ready for testing and publishing, i have however hit quite a brickwall today.

Is there a way to determine the relative location of an item/object within a UOSteam script?
A more precis scenario is that i'm on a boat and i need to know if the boat is in direction east or west, by for example figuring out the relative location of the tillerman.

Thanks! :)

Re: UOSteam - Determine relative location

Posted: January 6th, 2022, 3:43 pm
by Haswell
The tiller man's graphic changes depending on the direction the boat is facing:

Code: Select all

if @findtype 0x3e4e 0 'ground' 1 8
  sysmsg 'Facing north'
elseif @findtype 0x3e4b 0 'ground' 1 8
  sysmsg 'Facing south'
elseif @findtype 0x3e55 0 'ground' 1 8
  sysmsg 'Facing east'
elseif @findtype 0x3e50 0 'ground' 1 8
  sysmsg 'Facing west'
else
  sysmsg 'Tiller man not found' 33
endif

Re: UOSteam - Determine relative location

Posted: January 8th, 2022, 12:51 pm
by kakel_anders
Haswell wrote: January 6th, 2022, 3:43 pm The tiller man's graphic changes depending on the direction the boat is facing:

Code: Select all

if @findtype 0x3e4e 0 'ground' 1 8
  sysmsg 'Facing north'
elseif @findtype 0x3e4b 0 'ground' 1 8
  sysmsg 'Facing south'
elseif @findtype 0x3e55 0 'ground' 1 8
  sysmsg 'Facing east'
elseif @findtype 0x3e50 0 'ground' 1 8
  sysmsg 'Facing west'
else
  sysmsg 'Tiller man not found' 33
endif
What a brilliant solution! Thanks a heap!