Achaea, Inventory Organizer

Share your scripts and packages with other Mudlet users.
Post Reply
mortagona
Posts: 3
Joined: Wed Jun 22, 2011 2:53 am

Achaea, Inventory Organizer

Post by mortagona »

These two primitive triggers will replace your inventory with two aligned columns, making it easier to read. Thanks to Iocun for help with string.split and string.format. This was created with Mudlet 1.2. and I don't know if it works on Mudlet 2.0 or not. If you get it to work on 2.0 please post. Thank you

To Install, just import the XML files into Mudlet.
Update: Added more formatting and a screenshot:



Thanks to Korwyn, I now know this only works if you have configured screenwidth to 0
Attachments
InventoryScreenShot.png
ItemsYouAreWearing.xml
(2.57 KiB) Downloaded 952 times
ItemsYouAreHolding.xml
(3.04 KiB) Downloaded 984 times
Last edited by mortagona on Wed Jun 22, 2011 5:59 pm, edited 2 times in total.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Achaea, Inventory Organizer

Post by Vadi »

It's not really an issue, have people use sw0 in-game and Muldet wrap for them. Everyone will be switching to it anyway - m&m in Lusternia is sw0 only and nobody had an issue, svo in Achaea is sw0 as well.

Manni
Posts: 116
Joined: Tue May 31, 2011 9:00 pm

Re: Achaea, Inventory Organizer

Post by Manni »

How would you adjust this to pull from ii instead? Using commas as the separator adds items that don't exist at times. ie a wispy, dawn coloured dress would be (1) wispy and (1) dawn coloured dress.

my idea is to pull the items from ii, when you type i or inv, while leaving the ii command untouched. Is this a plausible modification to the script?

mortagona
Posts: 3
Joined: Wed Jun 22, 2011 2:53 am

Re: Achaea, Inventory Organizer

Post by mortagona »

Good question! I have asked around on the mudlet clan and had some suggestions using GCMP instead. Eld suggested modifying Demonnic's script (http://forums.mudlet.org/viewtopic.php? ... nnic#p9759). I will look into it

SalieriM
Posts: 1
Joined: Fri Sep 02, 2011 5:57 pm

Re: Achaea, Inventory Organizer

Post by SalieriM »

And how do I set this screenwidth to 0?
/newbie question

Manni
Posts: 116
Joined: Tue May 31, 2011 9:00 pm

Re: Achaea, Inventory Organizer

Post by Manni »

I'm trying to learn a bit of GMCP so I can make this change now, and I want to make sure that I understand counting with tables. Is it t["name"] = t["name"] + 1?

also, just to help my understanding. GMCP would be faster then this one, right?

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Achaea, Inventory Organizer

Post by Rakon »

SalieriM wrote:And how do I set this screenwidth to 0?
/newbie question
For IRE games, its normally an in game command such as : config screenwidth 0
Manni wrote:I'm trying to learn a bit of GMCP so I can make this change now, and I want to make sure that I understand counting with tables. Is it t["name"] = t["name"] + 1?

also, just to help my understanding. GMCP would be faster then this one, right?
Counting with tables?? Can you elaborate? Do you mean iterators or arithmetic adding of table values?

Manni
Posts: 116
Joined: Tue May 31, 2011 9:00 pm

Re: Achaea, Inventory Organizer

Post by Manni »

I'm counting the number of items there are... so what I'm trying to do is say I have 25 pearls. I'm trying to use the gmcp table to track my inventory. This one starts a new item at any ',' found, so I was thinking of creating a counter like:
Code: [show] | [select all] lua
local list = gmcp.Char.Items.List
  if list.location == "inv" then invItems = {} 
     for _, i in ipairs(list.items) do
	if invItems[i.name] == nil then 
		invItems[i.name] = 1
	else
		invItems[i.name] = invItems[i.name] + 1
	end
    end
end
then I would use this table to display the items in your inventory based on what you're wearing, wielding and the amounts your have...

I probably don't have the right gmcp to pull right, but I wanted to go ahead and start trying to make this script a reality

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Achaea, Inventory Organizer

Post by Rakon »

As long as the table value 'invItems[i.name]' is an integer, then yes your method of

Code: Select all

invItems[i.name] = invItems[i.name] + 1
will increment the value as you expect.

Post Reply