ServUO Version
Publish 57
Ultima Expansion
Endless Journey
apple.jpgPeach.jpg
과일나무에서 과일을 모으고 싶어서 나무수집 스크립트를 참고하여 과일수집 스크립트를 만들었습니다. 문제는 위 사진처럼 과일나무를 추가해서 나무를 파냈더니 위 사진에 보이는 사과나무만 수집 가능하고 복숭아나무는 수집이 안된다는 점이었습니다.
#region Tile lists
private static int[] m_PearTile = new int[]
{
3492, 3496
};
#endregion
The item IDs for peach trees are 0x0D9C and 0x0DA0 and I tried entering 0x4D9C,0x4DA0 by adding hex ID values, but it didn't work, so I tried entering the item IDs of 3492, 3496 as above, but it didn't work. As above, other trees did the same. There are trees that work and there are trees that don't work, so can I know why? Maybe I think I'm missing something because of my lack of knowledge, but I don't know what it is. I need help.
 
If they are for Lumberjacking, you must add them to the master list.
Thank you for your reply. Of course I added it there. There are trees that are problematic and there are trees that are not. Even if it wasn't a tree type, it was possible for other decorations. I tried adding it in hexadecimal and if it didn't work, I also added it as an item number. But it still doesn't work. Maybe it's because of the transparency of the option, so I tested it after turning off the effect, but I still couldn't collect the tree I added..
 
Fixed an issue. I typed the item number and hex together and it became collectable. Thank you very much for your help.
Hello! I am having the same issue. I tried your fix, but still have the same issue. I am not sure I did it the same way you did. Would you mind sharing your Lumberjacking script? Thanks in advance!
 
Hello! I am having the same issue. I tried your fix, but still have the same issue. I am not sure I did it the same way you did. Would you mind sharing your Lumberjacking script? Thanks in advance!
#region Tile lists
private static int[] m_PeachTile = new int[]
{
3484, 0x4D9C
};
#endregion
trees.jpg
Hello. I'm making and using a script similar to the Lumberjacking script for individual fruit harvesting. I made it because I wanted to make it possible to collect only peaches from peach trees. In the picture above, I put item ID 3484 and 0x4D9C together and tested it, and I succeeded in collecting peach trees.
treess.jpg
The problem is that the wood I'm using in the second picture was not collectable. I think it's probably a similar situation to mine. Strangely collectable item id and impossible id. Or maybe I don't really understand hexadecimal. I'm trying to find a way but I'm sorry I couldn't help you.
 
Thanks! I have done a similar thing on my shard, separating each type of tree so that it gives a particular type of wood, as well as bonus items specific to that tree.

I have had no trouble adding tree graphics that already existed on the client to Lumberjacking.cs, but I cannot get it to recognize custom art that I have added. I get "You can't use an axe on that."

It could be that I am not converting the hexadecimals correctly, or perhaps it is an issue with the client version and the version of RunUO I am using. I've tried it with hexadecimals with and without the number and get the same result. Not sure.

I am going to keep fiddling with it. Thanks for the info!
 
Thanks! I have done a similar thing on my shard, separating each type of tree so that it gives a particular type of wood, as well as bonus items specific to that tree.

I have had no trouble adding tree graphics that already existed on the client to Lumberjacking.cs, but I cannot get it to recognize custom art that I have added. I get "You can't use an axe on that."

It could be that I am not converting the hexadecimals correctly, or perhaps it is an issue with the client version and the version of RunUO I am using. I've tried it with hexadecimals with and without the number and get the same result. Not sure.

I am going to keep fiddling with it. Thanks for the info!
You're experiencing exactly the same symptoms as my current situation. I've also tried a lot to find a solution, but I haven't found the cause for something that's impossible to collect yet. If I find a solution one day, I'll definitely share it with you. Thank you!
is this why grapes can be picked in yew?
I think it will be easy if it is a tree that can be collected.
 
Your answer will be found by looking and adjusting this line most likely.

Thank you for letting me know the solution. However, I think it is almost impossible with my current knowledge about how to modify the part you told me and what to modify. If possible, could I ask you to elaborate on that part a little more?
 
I think there is an issue in that loop that sometimes marks it as over 0.

So I would change :

C#:
for (int i = 0; dist < 0 && i < Tiles.Length; ++i)


to:

C#:
for (int i = 0; dist != 0 && i < Tiles.Length; ++i)


and see if it changes the results.


This at least works for me when using mining instead of the < operator due to having a lot of custom tiles/textures and not wanting to always re-order my list in numerical order since I am lazy.
 
You're experiencing exactly the same symptoms as my current situation. I've also tried a lot to find a solution, but I haven't found the cause for something that's impossible to collect yet. If I find a solution one day, I'll definitely share it with you. Thank you!

I think it will be easy if it is a tree that can be collected.


And I will do the same if I find a solution. Thank you!
I think there is an issue in that loop that sometimes marks it as over 0.

So I would change :

C#:
for (int i = 0; dist < 0 && i < Tiles.Length; ++i)


to:

C#:
for (int i = 0; dist != 0 && i < Tiles.Length; ++i)


and see if it changes the results.


This at least works for me when using mining instead of the < operator due to having a lot of custom tiles/textures and not wanting to always re-order my list in numerical order since I am lazy.

Thanks for the information and the example. I gave it a try but no luck. I will keep at it. Thanks again!
 
Last edited:
I think there is an issue in that loop that sometimes marks it as over 0.

So I would change :

C#:
for (int i = 0; dist < 0 && i < Tiles.Length; ++i)


to:

C#:
for (int i = 0; dist != 0 && i < Tiles.Length; ++i)


and see if it changes the results.


This at least works for me when using mining instead of the < operator due to having a lot of custom tiles/textures and not wanting to always re-order my list in numerical order since I am lazy.
Thank you for your reply! I tried as you told me, but I think I was unlucky like Archaaz... but I really appreciate that you let me know that there are some parts like that.
 
Weird...With that code change and using the ItemIDs 0x4D9C and 0x4DA0 adding in where Vox said they work for me.
 
I think there is an issue in that loop that sometimes marks it as over 0.

So I would change :

C#:
for (int i = 0; dist < 0 && i < Tiles.Length; ++i)


to:

C#:
for (int i = 0; dist != 0 && i < Tiles.Length; ++i)


and see if it changes the results.


This at least works for me when using mining instead of the < operator due to having a lot of custom tiles/textures and not wanting to always re-order my list in numerical order since I am lazy.

The harvest tile arrays are actually sorted for you with Array.Sort, so feel free to make them messy :p

--

That code has to do two jobs, it treats tiles as sequential or ranged and the "dist" computation is a convoluted way of doing an equals or within-range check.

The type of comparison is determined by the RangedTiles property that can be set on the harvest definition where the tile lists are assigned.

The reason the tile lists require 0x4000 to be added to their values is because anything lower than 0x4000 is treat as a land tile entry - this goes back to the traditional ways of storing land and statics in a contiguous format; which is quite an inconvenience when dealing with things like this.
 
Then it does not in the copy I use I tracked when doing extra textures in and coming up with 1 a lot. So I changed it to != to get around it coming up with a 1 and exiting the verify. So if it is supposed to it might not do it at least my copy does not seem to but I have been butchering mine as a lot of systems are customized and it is not up to date to current.
 
The harvest tile arrays are actually sorted for you with Array.Sort, so feel free to make them messy :p

--

That code has to do two jobs, it treats tiles as sequential or ranged and the "dist" computation is a convoluted way of doing an equals or within-range check.

The type of comparison is determined by the RangedTiles property that can be set on the harvest definition where the tile lists are assigned.

The reason the tile lists require 0x4000 to be added to their values is because anything lower than 0x4000 is treat as a land tile entry - this goes back to the traditional ways of storing land and statics in a contiguous format; which is quite an inconvenience when dealing with things like this.
Well, then, how can we make it possible for items that cannot be collected? It is becoming a very difficult task for me..
 
Back