Page 1 of 1

Achaea, Inventory Organizer

Posted: Wed Jun 22, 2011 3:00 am
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

Re: Achaea, Inventory Organizer

Posted: Wed Jun 22, 2011 12:31 pm
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.

Re: Achaea, Inventory Organizer

Posted: Wed Jul 20, 2011 5:22 am
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?

Re: Achaea, Inventory Organizer

Posted: Sun Jul 24, 2011 8:25 pm
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

Re: Achaea, Inventory Organizer

Posted: Fri Sep 02, 2011 5:58 pm
by SalieriM
And how do I set this screenwidth to 0?
/newbie question

Re: Achaea, Inventory Organizer

Posted: Sat Sep 03, 2011 5:28 am
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?

Re: Achaea, Inventory Organizer

Posted: Sat Sep 03, 2011 7:39 pm
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?

Re: Achaea, Inventory Organizer

Posted: Sat Sep 03, 2011 8:46 pm
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

Re: Achaea, Inventory Organizer

Posted: Sat Sep 03, 2011 8:55 pm
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.