This is a practical use script that I wrote for myself today that will highlight the methodology that one could use to create much more complex scripts.
This script does the following:
1. Iterates through each of your vending containers
2. For each vending container, iterates through all of the items in that container.
3. For each item, searches the broker to determine the lowest price currently for sale on that item. If the price is lower than "LowestPriceWillingToSell" silver (50 silver), then remove it. Otherwise, set the item's price to match that price. If the item does not exist on the broker anywhere, it sets it to "DefaultPrice" (2 gold).
4. For each item set, it 'unlists' it, so you can list it manually with the touch of a button.
So, right now basically this script basically sets everything you you have in your vending containers to a price (and unlists it), or removes it because it's not worth anything.
To customize, you'll set the variables and you might also want to adjust the formula for the "SetPrice" line so that it sets to a certain percentage below the lowest price on the market (for example). You might also want to comment out the line that "Unlists" the items if you're so inclined and not worried if someone happens to quick buy something while you're setting up.
---
Anyway, someone could certainly take this and make a really powerful and useful script, integrating all sorts of things. Imagine it: a powerful broker script with a UI accompanying!
This script does the following:
1. Iterates through each of your vending containers
2. For each vending container, iterates through all of the items in that container.
3. For each item, searches the broker to determine the lowest price currently for sale on that item. If the price is lower than "LowestPriceWillingToSell" silver (50 silver), then remove it. Otherwise, set the item's price to match that price. If the item does not exist on the broker anywhere, it sets it to "DefaultPrice" (2 gold).
4. For each item set, it 'unlists' it, so you can list it manually with the touch of a button.
So, right now basically this script basically sets everything you you have in your vending containers to a price (and unlists it), or removes it because it's not worth anything.
To customize, you'll set the variables and you might also want to adjust the formula for the "SetPrice" line so that it sets to a certain percentage below the lowest price on the market (for example). You might also want to comment out the line that "Unlists" the items if you're so inclined and not worried if someone happens to quick buy something while you're setting up.
---
Anyway, someone could certainly take this and make a really powerful and useful script, integrating all sorts of things. Imagine it: a powerful broker script with a UI accompanying!
Attachments
-
3.3 KB Views: 279