• Content count

  • Joined

  • Last visited

Everything posted by Mthec

  1. Buyer Merchant What does it do? Introduces a new type of NPC, based on the merchant, that will buy items from players instead of selling them. How to use Simply head to your nearest Trader and buy the new "personal buyer contract" and place it as you would a merchant. The name will have a "Buyer_" prefix to distinguish from merchants. Then right click on the contract and choose "Manage traders". This will bring up a menu like the merchants but with "Manage Prices" and "Add Item" buttons. Go through the add item menu (see the screenshots below) to add an item to the buyer's Price List and when a player trades all the items on the list will be shown, along with prices and minimum ql requirements. Trade some money to your buyer to get them started. You can remove it any time you want before it's spent. Features Screenshots Beta Everything should now be working as it should. However I haven't tested it on a populated server, and with all the item possibilities something might come up. I also wanted some feedback on how it works. Menu improvements, etc. Requirements ago's Mod Launcher Instructions Download the zip file Copy contents of zip into your Wurm Server mod directory Settings Delivery Contracts A new type of contract that facilitates placing heavy items on a merchant. Have the spirits deliver piles of bricks, forges, ovens, and many other items. The bearer can take it all the way across the server without worrying about the weight, then have it delivered to their village token or a nearby waystone. Want to be a carpenter and sell carts on a merchant? Now you can. Want to sell "kits" such as starter packs or sets of tools (e.g. smithing set/carpenter set)? Now you can. Note - You cannot highlight a range of items and only pack those. If you pack one item in a group it packs all the others of that type in the container/inventory. Requirements ago's Mod Launcher Instructions Download the zip file Copy contents of zip into your Wurm Server mod directory Settings
  2. Sure thing, shouldn't be too difficult. The price scales with the weight of an item, so for the moment you could just set the price differently and it should charge the appropriate cost. The default weights come from the ItemTemplates, but obviously some items differ when it comes to what the end product weighs. As a side note, I've checked out the 1.9 beta and my current mods all seem to be compatible as is. Which is nice.
  3. [WIP] Ghost Tower Guard Mod

    I've not used it myself yet, but modlauncher has a ServerPollListener interface. Not sure how often it gets called though. I just follow ago's creature demo and put it in init and it seems to work fine. I imagine there might be errors with creatures being loaded from the database during server load and not finding the template? This might not have happened with yours as they are created on demand rather than "living" on the server. The one thought I had is you could also check if they are on a village tile, unless the asker has some appropriate village permissions.
  4. Mini Update Download Changed GM Destroy action so that it destroys items that have fallen out of a contract. Added a server command (#dcCleanup) to check for the above and remove across the whole server. Limited to once per minute because it could cause lag with a lot of items on the server. Added two options to .properties, default for both is false. no_decay_in_contract If true items inside a contract will not be subject to decay. no_decay_food If true food inside a contract will not be subject to decay. Overridden by no_decay_in_contract. Fixed bug with items in containers in contracts.
  5. Fix Delivery Contracts download Fixed issue with packed items not being cleaned up properly. Mini Update Buyer Merchant download Changed Copy Price List to two actions, for copying in each direction, to help clarify things. Sorry about that, it originally cleaned things up better but then I changed over to keeping the contract around until all items were gone. I forgot all about destroying with a wand and possibly some other ways. I have added it back in and now it works properly. I've run out of time tonight for the clean up command, but will get it done tomorrow. If it is a problem in the mean time and you're okay with using SqliteBrowser open up the wurmitems.db, got to the ITEMS table and filter the TEMPLATEID column by 769, MAILED by 1 and MAILTIMES by 0. That should show up the ghost items. It's the other way around. Although I think your way is probably going to be more common, so I've changed it to two options. "To Contract Buyer" will copy the list from the buyer you right click on to the one who is controlled by the contract. "To This Buyer" will copy the list from the contract buyer to the one you right click on. Hopefully that will clear things up. Let me know if there's anything else I can do to make it more obvious. Thank you very much for being my guinea pig.
  6. Mini Update - Delivery Contracts Download Added Multi-Packā„¢. You can now "Pack up" multiple times with the same contract, overcoming the maximum items per pile limit. Added new option to .properties max_items Higher numbers may cause performance issues when trading with Buyers with price and minimum purchase calculations. Default 1000. Higher should be okay, just something to be aware of. Sorry, don't know why I left that in. That'll teach me to try rushing out an update in the evening. What happened was when I was first working things out I hit an issue with the maximum items per tile limit. I tried to get it working without making it possible for contracts to hold onto any un-dropped items, but ended up having to do it in the end. I already planned to add multi-pack at this point this but needed some more time so released as it was. I could have at least taken out the 99 item drop limit, but oh well, it's all done now.
  7. Update Buyer Merchant download Delivery Contracts download Made contracts compatible with buyers. If all of the items in the delivery note meet the requirements then they can now be accepted by buyers. Both mods need to be updated for it to work. Also, as I was going through I noticed a possible exploit. Minimum purchase items could be accepted even if they were underweight, which I assume is not the expected behaviour (you want 100 rock shards not 100 0.01kg rock shards). So I have now changed it so that any items that are not full weight are not accepted to fulfil a minimum purchase. Normal buying will still correctly scale the price based on the weight. You're quite welcome.
  8. [WIP] Ghost Tower Guard Mod

    I haven't quite gotten my head around load order myself yet, so someone may have a better answer. But I just gave it a quick try and if you move the onPlayerMessage code out of your mod class and into another and just call that from the onPlayerMessage method it doesn't cause the same error. There is probably a better way, but it should get things done as a workaround. Not tested it fully of course. Only just learning about it myself, but I've thought of two ideas. One, create your own extension to the CreatureAI class, then in the pollCreature method returning true signals that the Creature should die. The big drawback to this one is that you'd need to implement the combat stuff yourself. The easier way would be to hook on setOpponent and check if it receives null, then just call the die method.
  9. Default is 1c. The price is configurable in the .properties file. I don't think I ever used the mail system when playing Wurm Online and have been out of touch with delivery price changes so the default may be way out. Figured server admins may want to set different prices anyway. No worries, that's actually a good idea I hadn't thought of. I will have a chat with the guy who made the buyer mod and work something out.
  10. Yes, if by buyer you mean merchant. I haven't actually tested sending items across server, but I just checked the one thing that might have complicated things and it wasn't an issue. The items are just stored inside the contract, so it should transfer just like any container. Sorry, should have been more clear. So you buy a "delivery contract" off a trader, then when you pack the items it renames the contract to "delivery note", and also sets the description based on the contents. You then set the price and put the "delivery note" on your merchant to sell. Then the player who buys it takes it to the place they want it delivered and it disappears once all the items have been dropped. If there are any complications in delivering some of the items (e.g. too many items already on the tile) the note stays and you can re-deliver the rest later. One other thing I forgot to mention, unfortunately you can't select a range of items in your inventory, this ability is controlled by the client. So if you select one item in a group (i.e. where there is one entry for all the iron lumps and you click the + to see them all) it will also pack all of the others in that group.
  11. Multi Item Contract for Selling on Merchants

    For anyone looking at this thread in the future. Delivery Contracts
  12. New Mod Beta Release Delivery Contracts Download Purchase one of these from your local trader. Activate and right click on an item or pile and select Pack up. The spirits will then take the items and hold them for later delivery. You can now sell this item on a merchant no matter the weight. For the buyer, all they have to do is activate and right click on either their villages token or a nearby waystone and select Deliver Here and the spirits will deliver the items in front of them. For use with heavy piles and items (e.g. piles of bricks, logs, high ql dirt, forges/ovens, etc.) Note - You cannot highlight a range of items and only pack those. If you pack one item in a group it packs all the others of that type in the container/inventory. There were a lot of permissions and restrictions involved, so if I missed any just let me know and I'll add them to the list. Sorry it took longer than I originally thought. So many little loose ends to clear up. Think this fits your requirements. @McKenna
  13. Mini Update Download Added Copy Price List action. With both buyers placed take the contract of the buyer you want to copy to, right-click on the other buyer and select Copy Price List. You must own both buyers to dissuade people from copying other people's price lists and setting up easy competition. Note - This will destroy the old price list. Thank you. Not that it matters now, but if you select Look > Equipment as a GM, as well as the normal body window, you get a window showing the creatures inventory. I have been learning a lot about the action system recently and decided that would be the simplest way to add this. I thought about copying price lists before I first released this mod, by allowing the owner to drag a copy down when trading, but didn't want any angry admins blaming me for creating free paper.
  14. Bugfix Download Fixed issue with adding and removing pages. Sorry about that, one of those "don't know how I didn't notice" things. Think I've fixed the bug but you might still have issues if it has already affected the item. If you still have trouble it would help if you could examine the buyers inventory with a GM character (looking for the book, how many pages its contains, and if any pages are in the inventory but outside the book) and any log entries you might think apply. If the buyer wasn't important it might be simpler to dismiss and summon a new one, but if that is difficult let me know. Sorry again.
  15. Update Download You can now sort the price list using the Sort button on Manage Prices. First it sorts alphabetically by name, then by minimum QL in descending order. (e.g. acorn, log 50ql, log 10ql.) Updated Buyers to use books instead of a single sheet of papyrus. This multiplies the space for entries by 10. Old price lists will be silently updated. There were also some other minor fixes. I'm still working on Delivery Contracts. Hit a few small snags but starting to get there.
  16. Sorting shouldn't be difficult. The reason for the limit is that the mod uses paper inscriptions instead of the database. However, whilst working on my next mod, I realised it might be a good idea to use a book, then just add more pages. That would multiply the maximum by ten (which should be more than enough?) and be somewhat realistic.
  17. Thank you. I've had a quick go and it definitely seems doable. There are just a few more details I need to work out. The one issue I can think of is that it will mean people can store an infinite weight of items whenever they want (or can afford the cost), also bypassing the bulk storage system increasing item count on a server, but I guess that's just a drawback some server owners will be happy to take. From this and the other posts on the forum I think McKenna means a type of contract that will bundle up a bulk set of goods to be sold as a single item on a merchant, and then deliver them when the player gets the contract back home. At least I hope that's correct now that I've started.
  18. How very strange. I can't even imagine a situation when the mod would would send a url to event. I've played around with it and checked all my logs and haven't received anything like that. Could it be another mod that sent the url and it's just a coincidence that you pressed a button at the same time? Sorry I can't be of help.
  19. Sorry, I don't quite understand. What is this url you are getting? Do you want a way to copy a price lists data to use on multiple Buyers? If so I can work something out.
  20. Mini Update Download Added new contracts_on_traders option. If false then new traders will not have buyer contracts added to them, and if update_traders is also true then any contracts already on traders will be removed. Default is true. *hides bribe from Eject's players*
  21. Mini Update Download Added turn_to_player_max_power option. All trader types will now turn to face the player they are trading with so long as their power is not higher than this setting (default is 1). Note, Traders and Merchants will always turn to face a player of power 1 or lower. Added shop total to GM start trading message when free_money is true. Done. By items do you mean not coins? Are you the owner? If so the buyer won't ever accept items from their owner. I can't see a problem otherwise, are you getting anything in the server logs? I have extended the "I do not require any money." message to always tell power 3+ GMs (the only time you'd see that message in the first place) how much cash they have on them. Hopefully it will clear things up a little.
  22. Fix Download Note - Remove any coins traded to buyers whilst free_money was true, or set the shop database total in the database, before using this version. Fixed issue where money traded whilst free_money is true was not setting the buyer's shop total. I, wrongly, assumed that people would either be using free_money as true or false, not swapping. Have fixed this issue now. I mean, I can change this behaviour if people want me to. I'm guessing it is this way because the developers don't want GMs affecting the world unless they mean to. They face south because that is the default spawn rotation, and I'm guessing summon just moves the character and does not rotate them.
  23. Strange, works fine for me. I did wonder actually why they weren't turning when I was testing them with a GM account, so I had a quick look through the code and players with GM power 2 or higher won't turn any type of trader. Could that be causing some issue? No worries, Merry Christmas to you too.
  24. Update Download Added Minimum Purchase option. If set the Buyer will only make a trade if that many items or more are offered in a single trade. If the option isn't set it will default to 1 and appear no differently. The price is per item. e.g. You want at least 100 bricks for 1c, then set the price to 1i. This also gave me the opportunity to clear up some message spam. Instead of saying not authorised, no damage, etc. for every invalid item it will only say it once per trade change. @EjectLet me know if it's not quite right.
  25. No sound

    There is, it's OpenAL (site). Lower case Ls just look like I. Confuses things.