Jump to content

Need help with an "autosort" script.


Deleted31005User

Recommended Posts

I'm trying to create an Auto Storage system for my mod Tel Nalta II where the player can manually give certain items to a container and then the items will automatically be placed in several other containers around the home.

I followed the instructions provided by DarkFox from this tutorial:

https://www.youtube.com/watch?v=o8MnUS4Z-B8

 

He then redirects you to hes website to get the original script:

http://www.darkfox127.co.uk/resources.html (Auto-Sort Container)

 

I have the Autosort system working with all the keywords and containers, but the issue I'm having is that some items such as gold coins and other clutter items either fall into a general cathegory with a set keyword on them, or they don't have any keyword attached to them at all.

So I need to find a way to have my autosort script detect certain MiscItems so they can be placed in different containers.

 

-For example, gold001 has the "VendorItemClutter" keyword attached to it, so the script will put gold coins in the same container with all the other clutter objects, though I would like gold coins to be placed in the same container with the rest of the gems and amulets.

-Another example would be the "centurion dynamo core", this objects does not even have any keyword attached to it, so how can I tell the script to place that specific MiscItem inside a certain container?

 

EDIT: nvm I got it working like I wanted.

Edited by Guest
Link to comment
Share on other sites

replace

ElseIf akBaseItem.HasKeyword(VendorItemJewelry)

 

with

 

ElseIf akBaseItem.HasKeyword(VendorItemJewelry) || akBaseItem.HasKeyword(VendorItemClutter)

 

Also add

 

KEYWORD PROPERTY VendorItemClutter AUTO

 

and autofill your scripts again.

 

that would also add any other items with vendoritemclutter though.

 

then at the end of the if/else chain just add an else statement to send the rest of your junk to a miscellaneous container.

 

of course, don't forget to declare the new container and to autofill your properties.

Link to comment
Share on other sites

I'm sorry but can you explain in detail how this is going to help me with:

a) putting items like gold001 that are already defined with the "clutter" keyword to be placed in a different container than the rest of the items with that also have the "clutter" keyword.

b) place items with no keyword in certain containers.

 

I'm very bad with scripts so please give me a fill explanation or maybe even a new script where those changed are already added.

Also is there no way to simply make the script recognize certain "MiscItems" instead of always using "keywords" ?

 

I tried adding this "akBaseItem.MiscItem(gold001)" but of course that didn't work.

Link to comment
Share on other sites

a) my bad, thought you wanted all clutter in your jewelry container lol

b) since you're checking for keywords, everything that falls into the else statement would just get sent to a container without any keywords you searched for

 

And yes, you can search for misc items, TypeID 32 is for misc items

 

IF akbaseItem.GetType() == 32

Link to comment
Share on other sites

  • 7 years later...

replace

 

ElseIf akBaseItem.HasKeyword(VendorItemJewelry)

 

with

 

ElseIf akBaseItem.HasKeyword(VendorItemJewelry) || akBaseItem.HasKeyword(VendorItemClutter)

 

Also add

 

KEYWORD PROPERTY VendorItemClutter AUTO

 

and autofill your scripts again.

 

that would also add any other items with vendoritemclutter though.

 

then at the end of the if/else chain just add an else statement to send the rest of your junk to a miscellaneous container.

 

of course, don't forget to declare the new container and to autofill your properties.

Do any of you happen to still have this entire script? It seems DarkFox127 has removed it from his website.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...