Rent Tracker

... A place to ask for help on any topic whether it be starting out to player killing to IT issues.
Post Reply
Perdue
Posts: 15
Joined: Fri Feb 20, 2015 11:46 am

Rent Tracker

Post by Perdue » Wed May 20, 2015 10:48 pm

So I created this script to track items in rents across multiple characters. I've been working with it for the last few days to work the bugs out and I think I have most of them worked out.

This script will only work in CMud. You simply need to import the XML file located here: http://1drv.ms/1K3tVNd.

To import this XML file simply open up Package Editor within Cmud, Click 'File' from the menu and then 'Import XML'. Browse out to the XML file you downloaded and import it.

Command: lrs
Using the script itself is pretty simple. When you 'list' at the various rents it will record what items you have rented there. By simply typing 'lrs' you will get a list of all the items that have stored:

Code: Select all


Rec                   Cost     Days  Player               City                     Rent Name                               Item Name                               
-------------------------------------------------------------------------------------------------------------------------------------------------------------
PerdueRotQsB0             0g 0c   2d     Perdue              Caemlyn             Reception of the Queen's Blessing                           a thin vial of yellow fluid     
PerdueRotQsB1            54g 16c  1473d  Perdue              Caemlyn             Reception of the Queen's Blessing                           an ivy bracelet     
PerdueRotQsB2            54g 18c  577d   Perdue              Caemlyn             Reception of the Queen's Blessing                           an ivy bracelet     
PerdueRotQsB3            31g 15c  105d   Perdue              Caemlyn             Reception of the Queen's Blessing                           a silver medallion     
PerdueRotQsB4             7g 17c  78d    Perdue              Caemlyn             Reception of the Queen's Blessing                           a thin vial of yellow fluid     
PerdueRotQsB5             7g 17c  78d    Perdue              Caemlyn             Reception of the Queen's Blessing                           a thin vial of yellow fluid     
PerdueRotQsB6             3g 2c   31d    Perdue              Caemlyn             Reception of the Queen's Blessing                           a thin vial of yellow fluid     
PerdueRotQsB7             7g 16c  31d    Perdue              Caemlyn             Reception of the Queen's Blessing                           a gold ring delicately carved with ivy     
PerdueRotQsB8             2g 12c  26d    Perdue              Caemlyn             Reception of the Queen's Blessing                           a glass of apple cider     
PerdueRotQsB9             0g 0c   2d     Perdue              Caemlyn             Reception of the Queen's Blessing                           a thin vial of yellow fluid     
-------------------------------------------------------------------------------------------------------------------------------------------------------------
You have 10 items stored.
The formatting may not be perfect on here, but you get the idea. You can also do 'lrs <string>' to search for a certain string. It will search on the 'Rec, Player, City, Rent Name, and Item Name' fields and return any matches. For example if did 'lrs ring' it would bring back any rings that you have stored, as well as any character with the letters 'ring' in the name.

Command: dri
You can delete single records by using the 'dri' command. 'dri PerdueRotQsB9' would delete the last record in the above list.

Whenever you list your items at rent it will delete any items already kept at that location and repopulate them in the database. It also tries to keep track of how long since you last look at a rent, the time the item has been in the rent, and the cost. It will then use these to try and 'guess' how much the item will cost to remove it from rent even if you haven't visited it in sometime. NOTE: This has been sparingly tested and I don't know how accurate it is. It may be completely off. Doing a new 'list' at a rent will always refresh this data.

Variable: RentRooms

Within the script is a RentRooms variable. This was done really to add the 'City' information to the script. So you would easily know what city an item was in without having to memorize all the Rent location names. I haven't populated anywhere near all the Rent rooms with their corresponding cities or locations. If you find one and want the easy city name, you will have to add it to the script yourself. I may add a couple of commands later on to manage this variable.

I think that should be it for now. I hope this is useful and isn't too buggy or problematic.

Let me know if there are any issues.

Iskveri
Posts: 53
Joined: Sat Oct 17, 2015 2:55 pm

Re: Rent Tracker

Post by Iskveri » Wed Oct 21, 2015 1:20 pm

Is CMUD's stuff compatible with ZMUD? Looking for something similar, hopefully with some readout at the end that spits out "You have 20 jcuffs. You have 12 heron mediums. "

Thuvia
Posts: 146
Joined: Sun Feb 22, 2015 12:22 pm

Re: Rent Tracker

Post by Thuvia » Thu Oct 22, 2015 5:12 pm

I'm not sure that the following has the entire functionality you're looking for, but here are two links to zMUD rent scripts.

http://www.wotmudarchives.org/forum/vie ... f=8&t=2409

http://www.wotmudarchives.org/forum/vie ... f=8&t=2318

I think they're basically the same, but the first one mentions it was edited from the original, which I assume is the second one.

vantom
Posts: 5
Joined: Sun Jul 26, 2015 8:27 pm

Re: Rent Tracker

Post by vantom » Sat Oct 24, 2015 7:52 pm

I think I have an idea on how to convert this to Lua scripts for Mudlet. I'll even give you credit for it even if you're one of those wolfbrothers who oughta be balefired.

Vantom of the Ruined Keep.

Jomin
Posts: 160
Joined: Thu Feb 19, 2015 3:54 pm
Location: White Tower Libraries or Deepest Wiltshire, UK

Re: Rent Tracker

Post by Jomin » Tue Nov 03, 2015 8:54 pm

@Vantom: At this very moment I am tweaking the addition of coding for Area and Map user data structures to the Mudlet codebase (source code available at our GitHub repository) with the same lua script access functionality as the Room user data but obviously for data for each area and a single one for the whole map - setXXXXUserData(...); getXXXXUserData(...); getAllXXXXUserData(...); clearXXXXUserData(...); clearXXXXUserDataItem(...) and searchAreaUserData(...) [XXXX being now "Area" or "Map" as well as "Room"] - the Map one might be of use if you want to store rented equipment data in one spot rather than in a room location AND wanted to save it with a map as opposed to a package that you sync between alts...!

Light be with you

Jomin al'Bara - Journey Accepted
aka. Slysven - A Mudlet Maker

Neveyan
Posts: 193
Joined: Thu Jun 09, 2016 1:43 pm

Re: Rent Tracker

Post by Neveyan » Thu Aug 20, 2020 6:11 am

Has something similar been created for mudlet?

Asandra
Posts: 766
Joined: Mon May 13, 2019 11:30 am

Re: Rent Tracker

Post by Asandra » Thu Aug 20, 2020 6:20 am

I have something a lot less elegant than Jomin is proposing here.
Does not sync over profiles or pc's or anything, just dumps it in a database and you can use commands to search per Character, City or item.

Edit: not quite sure how to share the mudlet things, I'll get back to you on that.

astrid
Posts: 43
Joined: Sun Dec 20, 2015 9:15 pm

Re: Rent Tracker

Post by astrid » Fri Aug 21, 2020 11:24 pm

Asandra wrote:
Thu Aug 20, 2020 6:20 am
Edit: not quite sure how to share the mudlet things, I'll get back to you on that.
copy the xml into a code block, then people can copy it into their own xml file and import!

Post Reply