[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  Aardwolf inventory in miniwindow

Aardwolf inventory in miniwindow

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1  2  3 4  

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #30 on Fri 10 Jul 2009 10:29 PM (UTC)
Message
Quote:

This is the section with the line above:

--make sql table and select from db

...

item = { ["items"] = {},["spellmod"] = {},["statmod"] = {},["resistmod"] = {},["skillmod"] = {},["drink"] = {},["weapon"] = {},["food"] = {},["container"] = {} }


That makes my eyes hurt a bit from all the quotes. You can simplify table keys by unquoting them, if they are alpha, like this:


item = { items = {}, spellmod = {}, statmod = {}, resistmod = {}, 
         skillmod = {}, drink = {}, weapon = {}, food = {}, 
         container = {} }


Now look at this:


t = {   [ "SELECT" ]    = { s },
            [ "FROM" ]      = { j },
            [ "WHERE" ]     = { "Serial = " .. "'" .. Serial .. "'"}
        }


Isn't this just too complicated? Instead of SELECT a, b, c, d etc. just do 'SELECT * FROM'. You seem to be wanting everything, so SELECT * gives it to you.

And


WHERE "Serial = " .. "'" .. Serial .. "'"


could be simplified to:


WHERE "Serial = '" .. Serial .. "'"


and indeed:


WHERE "Serial = " .. Serial 


In SQL, you don't have to quote numbers in a WHERE clause, only strings.

Now to answer your question about:


if not item["items"][1][ "Level" ]  ...


I'm not totally sure what you are doing here. You can simplify it to:


if not item.items[1].Level  ...


Quote:

If no record is found "items" table looks like this:

"items":
1:
"Serial"=164419843
"Description"="@WGueldars@w crafted leather cap@w"


Why? You have requested information on serial 155523564 and you got back information for 164419843. That doesn't sound right.



Your use of the SQL database is a great idea - I don't think I had the SQLite support in MUSHclient when I did my inventory plugin. That makes it easier to keep inventory information from one session to the next. I'm just trying to help you make the plugin a bit easier to follow - believe me in a year's time you will be wondering "why did I do that?" if things are too complex.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #31 on Sat 11 Jul 2009 04:25 AM (UTC)

Amended on Sat 11 Jul 2009 05:45 AM (UTC) by Blainer

Message
Quote:

Why? You have requested information on serial 155523564 and you got back information for 164419843. That doesn't sound right.


SELECT will always get the Description and Serial back at this
point in the script. If an invdetials has not been stored
in the database for that Serial then Level will be empty.

When the invdata is parsed I add Description and Serial to
items db table. This is because invdetails does not have the
description. So when invdetails is parsed on an item I don't
need to look up serial and Description, test if there, choose
between update or insert. In writing this it occurs to me that
this may cause a lot of lag when mousing over with big databases,
so maybe my design is just a cache and not an items database as I'd
hoped. And that I'll need to clear that cache when it reaches a
certain size.

One thing that would make alot more sense would be to change the
message about "getting details from MUD..." to Description and
"getting details from MUD..." seeing as the script has the Description
at this point. Thats done now.


The code above is now:

--make sql table and select from db
tablesT =   {   items = {}, spellmod = {}, statmod = {}, resistmod = {},
                skillmod = {}, drink = {}, weapon = {}, food = {},
                container = {} }
item = tablesT

for j,w in pairs (tablesT) do
    t = {   SELECT  = { "*" },
            FROM    = { j },
            WHERE   = { "Serial = " ..  Serial }
        }
    res, s = AardSelect (t)
    DBmsg ("cancelmouseoverInfoWin: " .. s)

    for i,v in pairs (res) do
        if res[i] ~= nil then
            table.insert (item[j], res[i])
        end
    end

end --select from db


Changed all the tables to what you suggested.

Quote:

I'm just trying to help you make the plugin a bit easier to follow - believe me in a year's time you will be wondering "why did I do that?" if things are too complex.


Thanks I really want this plugin to be easy to cut and paste
bits from and stable. If theres anything else please let me
know and I'll get it done.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #32 on Sat 11 Jul 2009 10:27 PM (UTC)
Message
Don't forget to change:


inT (sOff .. "@gGetting details form MUD... " .. sOff)


to:


inT (sOff .. "@gGetting details from MUD... " .. sOff)


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #33 on Sat 11 Jul 2009 11:17 PM (UTC)
Message

Just as a suggestion, how about trying to detect this:

... and change 3 lines of "1 use of BLACK LOTUS level 10" into a single line: "3 uses of BLACK LOTUS level 10"?


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #34 on Sat 11 Jul 2009 11:26 PM (UTC)

Amended on Sat 11 Jul 2009 11:33 PM (UTC) by Nick Gammon

Message
The other thing I tried to do with my inventory window months ago, was assess a weapon's usefulness by trying to evaluate if it was good "for its level". By comparison, in WoW, items like weapons are colour-coded, so a gray item is considered pretty useless, white is about average for its level, green is above average, blue is very good, and so on.

Thus, a simple glance can show whether you should throw away, sell, or use, an item that might have dropped from a mob.

My preliminary code used a table of the damage that a certain level *should* cause, like this:


-- see: http://www.aardwolf.com/builders/index.php?option=content&task=view&id=210&Itemid=134

avg_weapon_points = {
    3.0, 3.0, 3.0, 4.5, 4.5, 6.0, 6.0, 6.0, 6.0, 8.0,           -- 1 to 10
    8.0, 10.0, 10.0, 10.0, 10.0, 10.0, 12.0, 12.5, 12.5, 14.0,  -- 11 to 20
    14.0, 14.0, 15.0, 16.0, 16.0, 16.0, 16.0, 18.0, 18.0, 20.0, -- 21 to 30
    21.0, 22.5, 24.5, 27.0, 28.0, 28.0, 28.0, 32.0, 32.0, 35.0, -- 31 to 40
    35.0, 36.0, 36.0, 38.5, 40.5, 40.0, 39.0, 42.0, 42.0, 45.0, -- 41 to 50
    45.0, 48.0, 48.0, 49.5, 49.5, 50.0, 52.0, 52.0, 52.0, 52.0, -- 51 to 60
    55.0, 55.0, 58.5, 58.5, 58.5, 58.5, 60.5, 60.5, 63.0, 63.0, -- 61 to 70
    63.0, 65.0, 66.0, 66.0, 67.5, 70.0, 75.0, 77.0, 76.5, 80.0, -- 71 to 80
    84.5, 90.0, 96.0, 96.0, 98.0, 102.0, 110.5, 120.0, 120.0, 128.0,          -- 81 to 90 
    135.0, 144.0, 144.5, 160.0, 165.0, 162.0, 171.0, 180.0, 190.0, 190.0,     -- 91 to 100
    192.5, 192.5, 200.0, 200.0, 207.0, 207.0, 211.5, 211.5, 214.5, 214.5,     -- 101 to 110
    220.0, 220.0, 222.0, 222.0, 220.5, 220.5, 245.0, 245.0, 231.0, 231.0,     -- 111 to 120
    238.5, 238.5, 242.0, 242.0, 242.0, 242.0, 253.0, 253.0, 255.0, 255.0,     -- 121 to 130
    253.0, 253.0, 259.0, 259.0, 266.5, 266.5, 272.0, 272.0, 276.0, 276.0,     -- 131 to 140
    280.0, 280.0, 280.0, 280.0, 285.0, 285.0, 288.0, 288.0, 294.5, 294.5,     -- 141 to 150
    297.0, 297.0, 304.0, 304.0, 308.0, 308.0, 313.5, 313.5, 315.0, 315.0,     -- 151 to 160
    320.0, 320.0, 323.0, 323.0, 324.0, 324.0, 325.0, 325.0, 330.0, 330.0,     -- 161 to 170
    332.5, 332.5, 333.5, 333.5, 336.0, 336.0, 338.0, 338.0, 330.0, 330.0,     -- 171 to 180
    346.5, 346.5, 350.0, 350.0, 351.0, 351.0, 356.5, 356.5, 360.0, 360.0,     -- 181 to 199
    362.5, 362.5, 368.0, 368.0, 372.0, 372.0, 377.0, 377.0, 384.0, 384.0,     -- 191 to 200
    390.0,                                                                    -- 201
} -- end of avg_weapon_points


Thus, for example, a level 10 weapon might be expected to do 8 damage.

Now we can work out how good a weapon is, for example a level 10 weapon that did 12 damage could be classed as quite good, because from the table, you need a level 17 weapon to do 12 damage. Likewise, a level 10 weapon that did 4.5 damage could be regarded as quite poor.

The code below, which is probably not at all perfect, tried to "walk" the table and work out which was the closest level that matched the actual damage the weapon did (bearing in mind some levels have the same damage in the table), and see how far away from its actual level it is:


    local avg_damage = avg_weapon_points [item.level] or 1
    local rating = 0
    local L = item.level
    local new_points
    
    if item.weapon.avgdamage > avg_damage then
      repeat
        L = L + 1
        if L > #avg_weapon_points then
          break  -- end of table
        end -- if
        if avg_weapon_points [L] > item.weapon.avgdamage then
          break
        end -- if
        new_points = avg_weapon_points [L]
        rating = rating + 1
      until false
      
      -- drop back to first weapon that had this rating
      if new_points then
        rating = rating + 1
        while avg_weapon_points [L - 1] == new_points do
          L = L - 1
          rating = rating - 1
        end -- while
      end -- if
              
    elseif item.weapon.avgdamage < avg_damage then
      repeat
        L = L - 1
        if L < 1 then
          break  -- start of table
        end -- if
        if avg_weapon_points [L] < item.weapon.avgdamage then
          break
        end -- if
        new_points = avg_weapon_points [L]
        rating = rating - 1 
       until false    
       
       -- go forwards to first weapon that had this rating
       if new_points then
         rating = rating - 1
         while avg_weapon_points [L + 1] == new_points do
           L = L + 1
           rating = rating + 1
         end -- while
       end -- if
    end -- if
    
    if rating > 0 then
      infoline (string.format ("Rating: +%i", rating),  "lime")
    elseif rating < 0 then  -- minus sign will be shown anyway
      infoline (string.format ("Rating: %i", rating),  "slategray")
    end -- if


The end result was an information message, if the weapon's rating was not zero, showing either a +level or a -level from the current level (and a colour code).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #35 on Sun 12 Jul 2009 06:43 AM (UTC)

Amended on Sun 12 Jul 2009 06:46 AM (UTC) by Blainer

Message
Ok thats next on list. I am thinking colour coded level numbers
on list and maybe the item type and level on popup.


At the moment I am working on getting the db to track item locations
reliably.

I made this cool table last night:

eqT =   {   --flag      --desc                  --keyword   --item tbl          --wear  --table index
        {   "light",    "Used as light",        "light",    currWorn = {}   },  -- 0    -- 1
        {   "head",     "Worn on head",         "head",     currWorn = {}   },  -- 1    -- 2
        {   "eyes",     "Worn on eyes",         "eyes",     currWorn = {}   },  -- 2    -- 3
        {   "lear",     "Worn on left ear",     "ear",      currWorn = {}   },  -- 3    -- 4
        {   "rear",     "Worn on right ear",    "ear",      currWorn = {}   },  -- 4    -- 5
        {   "neck1",    "Worn around neck",     "neck",     currWorn = {}   },  -- 5    -- 6
        {   "neck2",    "Worn around neck",     "neck",     currWorn = {}   },  -- 6    -- 7
        {   "back",     "Worn on back",         "back",     currWorn = {}   },  -- 7    -- 8
        {   "medal1",   "Pinned to chest1",     "medal",    currWorn = {}   },  -- 8    -- 9
        {   "medal2",   "Pinned to chest2",     "medal",    currWorn = {}   },  -- 9    -- 10
        {   "medal3",   "Pinned to chest3",     "medal",    currWorn = {}   },  -- 10   -- 11
        {   "medal4",   "Pinned to chest4",     "medal",    currWorn = {}   },  -- 11   -- 12
        {   "torso",    "Worn on torso",        "torso",    currWorn = {}   },  -- 12   -- 13
        {   "body",     "Worn around body",     "body",     currWorn = {}   },  -- 13   -- 14
        {   "waist",    "Worn about waist",     "waist",    currWorn = {}   },  -- 14   -- 15
        {   "arms",     "Worn on arms",         "arms",     currWorn = {}   },  -- 15   -- 16
        {   "lwrist",   "Worn on left wrist",   "wrist",    currWorn = {}   },  -- 16   -- 17
        {   "rwrist",   "Worn on right wrist",  "wrist",    currWorn = {}   },  -- 17   -- 18
        {   "hands",    "Worn on hands",        "hands",    currWorn = {}   },  -- 18   -- 19
        {   "lfinger",  "Worn on left finger",  "finger",   currWorn = {}   },  -- 19   -- 20
        {   "rfinger",  "Worn on right finger", "finger",   currWorn = {}   },  -- 20   -- 21
        {   "legs",     "Worn on legs",         "legs",     currWorn = {}   },  -- 21   -- 22
        {   "feet",     "Worn on feet",         "feet",     currWorn = {}   },  -- 22   -- 23
        {   "shield",   "Worn as shield",       "shield",   currWorn = {}   },  -- 23   -- 24
        {   "wielded",  "Primary Weapon",       "wield",    currWorn = {}   },  -- 24   -- 25
        {   "second",   "Off-Hand Weapon",      "wield",    currWorn = {}   },  -- 25   -- 26
        {   "hold",     "Held",                 "hold",     currWorn = {}   },  -- 26   -- 27
        {   "float",    "Floating nearby",      "float",    currWorn = {}   },  -- 27   -- 28
        {   "sleeping", "Sleeping",             "sleeping", currWorn = {}   }   -- 28   -- 29
        }

SQL for new db table

eq =    {   -- eq table, holds current eq outfit
        [[
        CREATE TABLE IF NOT EXISTS eq(
        SetName TEXT NOT NULL,
        SetDesc TEXT,
        light INTEGER,
        head INTEGER,
        eyes INTEGER,
        lear INTEGER,
        rear INTEGER,
        neck1 INTEGER,
        neck2 INTEGER,
        back INTEGER,
        medal1 INTEGER,
        medal2 INTEGER,
        medal3 INTEGER,
        medal4 INTEGER,
        torso INTEGER,
        body INTEGER,
        waist INTEGER,
        arms INTEGER,
        lwrist INTEGER,
        rwrist INTEGER,
        hands INTEGER,
        lfinger INTEGER,
        rfinger INTEGER,
        legs INTEGER,
        feet INTEGER,
        shield INTEGER,
        wielded INTEGER,
        second INTEGER,
        hold INTEGER,
        float INTEGER,
        sleeping INTEGER
        );
        INSERT INTO eq (SetName, SetDesc) VALUES ('currEQ', 'Currently equiped items');
        CREATE INDEX xref_eq_SetName ON eq (SetName);
        ]]
        }


The way I have it working at the moment is the user wields sword.
-Script is triggered by invmon.
-Script uses action to decide what to do.
-If wield search invT table for item remove it or reduce stack count
(I may need to figure out new way to do stacks as top serial will be consumed and next serial will not be put in place).
-Add table for item from invT to currWorn above.
-Update db.
-Display modified invT again.

I hate this because it is displaying data not from the MUD in a place
that should be exactly as from MUD.

The other option is to send eqdata and invdata every time invitem or
invmon triggers. But I suspect this will slow things down a lot a "give
all player" would be impossible.

I'm pretty sure I'm over thinking this so I may just play with those colours
for a bit.

Quote:

... and change 3 lines of "1 use of BLACK LOTUS level 10" into a single line: "3 uses of BLACK LOTUS level 10"?

I assumed there was a reason it was displayed that way.

+-----------------------------------------------------------------+
| Keywords   : potion healing thin red light relief               |
| Name       : (!(Light Relief)!)                                 |
| Type       : Potion                    Level  :     1           |
| Worth      : 8                         Weight :     4           |
| Wearable   : hold                                               |
| Flags      : magic, V3                                          |
| Found at   : The Grand City of Aylor                            |
+-----------------------------------------------------------------+
| Spells     : 1 use of level 4 'cure light'                      |
|            : 1 use of level 4 'cure light'                      |
+-----------------------------------------------------------------+



Fixed the item stacks and now form is from but not posting till above
is done because nothing new yet worth testing.
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #36 on Tue 14 Jul 2009 03:21 PM (UTC)
Message
New version posted.

Didn't get inventory monitoring completed but I
did get the window to refresh when an item leaves or enters
inventory.

Can anyone with the time run this and let me know if it is
stable please. Thanks.
[Go to top] top

Posted by Norry   (16 posts)  [Biography] bio
Date Reply #37 on Tue 14 Jul 2009 08:22 PM (UTC)

Amended on Tue 14 Jul 2009 08:27 PM (UTC) by Norry

Message
Sadly, I don't play Aard much anymore but this is really cool. I tried it out today... and I have an issue.

When I mouse over "Bag of Aardwolf" (I have 2) it gives me an error:

Error number: 0
Event:        Run-time error
Description:  [string "Plugin"]:1658: attempt to index field '?' (a nil value)

stack traceback:

	[string "Plugin"]:1658: in function 'ShowDet'

	[string "Plugin"]:753: in function <[string "Plugin"]:727>
Called by:    Function/Sub: invdetailsParse called by trigger

Reason: processing trigger ""


and it puts this on my screen:

TRACE: Executing trigger script "invdetailsParse"
{invheader}35949563|108|Container|1000|-266||unique, glow, hum, magic, nosell, held, nopurge, burn-proof, v3, precious|Myndra|||||
{container}3160|100|293|42|-208|43|20

Because of the error, it refuses to parse anything else.

If I open the bag first (using the "Bags ^" option at the bottom of the window, which only shows one Aard bag and not both), the contents show up just fine. But when I mouse over any of them items, it starts to spam my window with:

TRACE: Executing trigger script "invdetailsParse"
{invheader}35949563|108|Container|1000|-266||unique, glow, hum, magic, nosell, held, nopurge, burn-proof, v3, precious|Myndra|||||
{container}3160|100|293|42|-208|43|20
TRACE: Executing trigger script "invdetailsParse"
TRACE: Executing trigger script "invdetailsParse"
{invheader}35949563|108|Container|1000|-266||unique, glow, hum, magic, nosell, held, nopurge, burn-proof, v3, precious|Myndra|||||
{container}3160|100|293|42|-208|43|20
TRACE: Executing trigger script "invdetailsParse"
TRACE: Executing trigger script "invdetailsParse"

until I disconnect.

I'm guessing it has to do with the fact that I have 2 bags with the same name, so the plugin gets confused.

Edit: I have another container, and it opens fine but when I mouse over the contents of that container, each line causes a carriage return.

TRACE: Executing trigger script "process_prompt"
TRACE: Executing Plugin Inventory_Display script "mouseoverShowDet"
TRACE: Executing trigger script "invdetailsParse"

[  3460/3460hp 2698/2698mn 2208/2208mv 1216tnl] >

TRACE: Executing trigger script "process_prompt"
TRACE: Executing Plugin Inventory_Display script "cancelmouseoverInfoWin"
TRACE: Executing Plugin Inventory_Display script "mouseoverShowDet"
TRACE: Executing trigger script "invdetailsParse"

[  3460/3460hp 2698/2698mn 2208/2208mv 1216tnl] >


Still, this is quite cool. Feels a little like WoW. :)
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #38 on Wed 15 Jul 2009 02:46 AM (UTC)

Amended on Wed 15 Jul 2009 03:04 PM (UTC) by Blainer

Message
That was a bad trigger, didn't account for the - in the trigger.

Grab it again and see if it's working now.



edit
Found another problem with the script trying to stack bags. This is fixed now.
[Go to top] top

Posted by Norry   (16 posts)  [Biography] bio
Date Reply #39 on Sun 19 Jul 2009 05:22 PM (UTC)
Message
Sorry I didn't reply sooner. I just picked up the newest copy, deleted both the state file and the dbase so things are clean. I'm still getting some weird things.

The plugin doesn't seem to notice I have 2 Aard bags. I'm not sure if this is possible to change; no big deal if not. (Side note: I was sure there was a way to combine/uncombine items in the inventory, so instead of "(2) Bag of Aardwolf" they would be listed on 2 separate lines. I can't seem to change this.)

First, random errors. They seem to happen on a reinstall (possibly a fresh install?). Mousing over Aard bag causes this:
Error number: 0
Event:        Run-time error
Description:  [string "Plugin"]:1658: attempt to index field '?' (a nil value)

stack traceback:

	[string "Plugin"]:1658: in function 'ShowDet'

	[string "Plugin"]:753: in function <[string "Plugin"]:727>
Called by:    Function/Sub: invdetailsParse called by trigger

Reason: processing trigger ""



Opening my other container (a collection box) and mousing over the contents causes this:

Error number: 0
Event:        Run-time error
Description:  [string "Plugin"]:1658: attempt to index field '?' (a nil value)

stack traceback:

	[string "Plugin"]:1658: in function 'ShowDet'

	[string "Plugin"]:740: in function <[string "Plugin"]:727>
Called by:    Function/Sub: invdetailsParse called by trigger

Reason: processing trigger ""


Again, these are random and do not always happen; I can't really figure out a pattern, except they seem to happen first thing after a reinstall.

If I don't get an error, mousing over the Aard bag still causes the invdetails to appear on my screen, and the info window to show info from some other, random item.
#1 http://home.comcast.net/~norry/aard_inv_bag_mouseover.jpg

Usually opening the Aard bag shows the contents of one bag, but mousing over the contents causes the invdetails of the bag to spam on my screen until I disconnect. This looks like it's coming from the mud, because my "spam prevention" goes off and tries to send "look" to the mud.
#2 http://home.comcast.net/~norry/aard_bag_contents.jpg

Ocassionally, it's actually let me mouse over the items and not spam, but the info window flashes "Getting details from mud..." for the correct item then displays random information (often the container I'm looking at), not the item I'm mousing over. This always happens when I open the box, plus a carriage return appears to be sent with each mouseover.
#3 (Aard bag open) http://home.comcast.net/~norry/aard_bag_contents2.jpg
#4 (collection box open) http://home.comcast.net/~norry/aard_box_contents.jpg

However, clicking on any of the contents brings up the proper menu. But choosing one of the options seems to try to focus the container, so I get something like:
id 35949507
You do not have that item.

and the miniwindow goes back to displaying the full inventory.
#5 http://home.comcast.net/~norry/aard_box_contents_menu.jpg
#6 (see red box) http://home.comcast.net/~norry/aard_box_id_result.jpg
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #40 on Sun 19 Jul 2009 06:44 PM (UTC)
Message
OK this is basically triggers not matching info coming from the MUD. I have changed all the tiggers to allow for negative numbers. So this should fix that. Posted a new version.
Due to the commands this plugin uses manipulating items using their serial in bags does not work. So if I do “get <serial> from bag” MUD will say no item found. I can however view the item listed when I look in a bag just can’t do anything to it. This script operates in a kind of batch mode. It runs through over and over flipping switches and at this stage there is no switch to say this is a bag list.
I wanted to at least be able to look at items in bags and if the item had been moused over when *not* in a bag (the details would be in the database) I wanted them to display. The way this script works if the serial was not in the database and the item was in a bag it displayed the previous moused over item. So I decided to show the bag details instead of say a sword from main inventory when viewing a sword in a bag. If you want this to stop remove the item from the bag mouse over it or use menu to Update Database then put it back in bag and it will display normally. At this stage I think we are in for a long wait for these commands to be finished. But I think the ability to once an item is in DB view it is better than not viewing bags at all. One other problem is viewing empty bags, the window will disappear. I haven’t fixed that in this version however “inw” will bring the window straight back showing main inventory.
I have been working on another plugin for awhile but intend to look at this again with what I have learned since.
[Go to top] top

Posted by Norry   (16 posts)  [Biography] bio
Date Reply #41 on Mon 20 Jul 2009 10:50 AM (UTC)
Message
Ha, yeah, that would be my fault for not completely reading the post on the first page, or I'd've known you can't do anything with items in a bag.

I picked up the new copy and it seems to be functional now. It registers the Aard bag correctly, and doesn't freak out when I open it and mouse over the contents.

Thanks for putting this out there. I like seeing new uses for the miniwindows.
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #42 on Tue 21 Jul 2009 09:43 AM (UTC)
Message
Any other errors please post them.
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #43 on Tue 04 Aug 2009 11:21 AM (UTC)
Message
New version at:
http://code.google.com/p/aardinvwin/

- bags will no longer stack
- empty bags will now display an empty window
- added a maximum description width option

Just save the Inventory_Window_2.xml over the old one and
re-install with alias or in File -> Plugins dialog.
[Go to top] top

Posted by Aps   (5 posts)  [Biography] bio
Date Reply #44 on Wed 05 Aug 2009 03:36 AM (UTC)
Message
Run-time error
Plugin: Inventory_Display (called from world: Aardwolf)
Function/Sub: mouseoverShowDet called by Plugin Inventory_Display
Reason: Executing plugin Inventory_Display sub mouseoverShowDet
[string "Plugin"]:1180: attempt to index field '?' (a nil value)
stack traceback:
[string "Plugin"]:1180: in function 'ShowDet'
[string "Plugin"]:1657: in function <[string "Plugin"]:1654>
Error context in script:
1176 :
1177 : end --select from db
1178 :
1179 : --heading and spaces to ensure popup is never too small
1180*: HeadingText = sOff .. item.items[1].Description:gsub("a ", "", 1) .. sOff
1181 : inT (string.rep (" ", math.max (25, mw.strip_colours(HeadingText):len())))
1182 :
1183 : --get details if not already in database
1184 : if not item.items[1].Level or GetVariable("UseCache") == "false" then
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


179,311 views.

This is page 3, subject is 4 pages long:  [Previous page]  1  2  3 4  [Next page]

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]