arphile submitted a new resource:

Internal Cleaner - Clean Internal

This is my Test Script for clean Shard Internal

I found internal generates waste gems where amount just one.
so when I use command to count gems in internal where amount 1
there are above 100,000 amount of waste gems.

so I make this script to delete them.

I don`t know why they`re generated, but I can delete them.
hahaha... 8_8

Caution : It can delete some items which is dragging.
If you want to clean your internal, I recommand to use this script when server just started.
Read more about this resource...
 
Last edited:
Not sure how to fix it, would love to use it. But this is the error I get when trying to compile.

Code:
Errors:
 + Custom/Commands/Internal Clean.cs:
    CS1061: Line 35: 'Server.Item' does not contain a definition for 'ParentEnti
ty' and no extension method 'ParentEntity' accepting a first argument of type 'S
erver.Item' could be found (are you missing a using directive or an assembly ref
erence?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
 
Not sure how to fix it, would love to use it. But this is the error I get when trying to compile.

Code:
Errors:
+ Custom/Commands/Internal Clean.cs:
    CS1061: Line 35: 'Server.Item' does not contain a definition for 'ParentEnti
ty' and no extension method 'ParentEntity' accepting a first argument of type 'S
erver.Item' could be found (are you missing a using directive or an assembly ref
erence?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Can you upload your Item.cs?
This script will be placed in [RUO]/Server/
 
Last edited:
  • Like
Reactions: ExX
I think I figured it out. it seems as though JustUO doesn't use the Entity line. I just used item.parent and it seems to work.
 
I would warn this is potentially a dangerous script since it can delete items which are supposed to be there. Some custom scripts (and stock scripts, depending on what emulator you use), use internal items to hold/serialize data and do not have a parent entity. Deleting these will cause a loss of data and potentially even crash problems on restart depending how robust the original scripter made it. Although these should have their Delete() method overridden to avoid being deleted, they are often not.

This is treating symptoms of a problem rather than finding out why the problem (of internal item leaks) are occurring.

An easy way to find what items this could delete are by using the XMLFind command (requires XMLSpawner2) and doing a search for invalid internal items. If your server is functioning smoothly, there should be less than a page of invalid internal items and it should be somewhat obvious that they're supposed to be there.
 
Last edited:
Thanks for the info. I didn't really know that. I wasn't quite sure what the internal map was for and didn't understand why there would be a need for cleanup there. :)
 
Back