ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: ameyesonly on November 24, 2010, 01:51:53 PM

Title: Need help in getting the tile number I am standing on
Post by: ameyesonly on November 24, 2010, 01:51:53 PM
I am a beginning scripter and was wondering how I would go about getting the tile number I am standing on


Thanks

am
Title: Re: Need help in getting the tile number I am standing on
Post by: seeriusly on November 24, 2010, 02:22:02 PM
Do you mean coordinates?

Open easyUO and under character info in the right pane it will tell you #charposX: and #charposY:


Or tiletype # ?

To get the #tiletype where u are standing run this code with your character:

Code: [Select]
Tile init

Tile cnt #charPosX #charPosY #cursKind
tile Get #charPosX #charPosY #tileCnt #cursKind
display ok The tileType value of the tile at X: , #charPosX , #spc , / Y: , #charPosY , #spc , is: , #spc , #tileType $
+Remember: There are #tileCnt layers and the informations given are for the topmost layer
halt

also check here for more tile related variables:
http://wiki.easyuo.com/index.php?title=TileType (http://wiki.easyuo.com/index.php?title=TileType)
Title: Re: Need help in getting the tile number I am standing on
Post by: ameyesonly on November 24, 2010, 05:01:22 PM
I guess maybe I need to pull the layers or description of them
Title: Re: Need help in getting the tile number I am standing on
Post by: seeriusly on November 25, 2010, 09:07:35 AM
Maybe we can help if you described in slightly more detail as to what you are trying to achieve
Title: Re: Need help in getting the tile number I am standing on
Post by: ameyesonly on November 26, 2010, 04:25:44 AM
In ter mur because its different in the other areas I am trying to chop wood I have my script running with bandaids basicly I had to do the following in order for it to work.

I know that #ltargettile has to be there in order for you to be able to chop wood and it has to be correct so I am looking for a way to pull that info from the coordnaes of the tree thats there.

if #charposx = 886  ;and #charposy = 3354
  {
   set %termur 611
   set #ltargetx #charposx - 1
   set #ltargety #charposy
   set #ltargetz #charposz
   set #ltargettile 3283
   set #ltargetkind 3
   gosub chop_tree
   set %termur 612
   return
   }


I also found that the #ltargettile is actually a number value for a tree stlye but I have no way to pull that info I only know how to hard code it in and I set my char in the same spot next to each tree I chop and I dont know if the and statement is correct so I commented it out

any help woul be great

thanks

am
Title: Re: Need help in getting the tile number I am standing on
Post by: Khameleon on November 26, 2010, 05:27:52 AM
I don't think Tiles work in Termer.... unless cheffe updating them at one point.. doubtful though...

my fualt.. it seems to be working now.