UOSteam - Determine relative location

General discussion pertaining to the Demise shard. Off-topic posts will be moderated.
Post Reply
User avatar
kakel_anders
Posts: 361

UOSteam - Determine relative location

Post 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! :)
"Commander #1638" on Discord

"Don't say anything bad about someone until you've walked a mile in his shoes. That way, when you say something bad, you're a mile away, and you've got his shoes." - Jack Handey - Deep Thoughts (SNL)
Haswell
Posts: 44

Re: UOSteam - Determine relative location

Post 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
User avatar
kakel_anders
Posts: 361

Re: UOSteam - Determine relative location

Post 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!
"Commander #1638" on Discord

"Don't say anything bad about someone until you've walked a mile in his shoes. That way, when you say something bad, you're a mile away, and you've got his shoes." - Jack Handey - Deep Thoughts (SNL)
Post Reply