Message
| OK, after some minor changes this appears to work as far as it goes. :)
http://github.com/nickgammon/plugins/blob/master/aardwolf/Aardwolf_Inventory_v3.xml
This code is released "as is", it has design flaws, in particular the way it is written it will be hard to make another window for shops or equipped items. It needs major work to make things like the tabbed window be able to be instanced more than once.
When first used it tries to get spell information. I got an error when doing that, but after closing and re-opening the world it seemed to go away, so not sure about that.
The basic way it works is, when getting an inventory, it turns on tags to get this sort of stuff:
{invdata}
62567556,,a short stabbing sword,44,5,0,-1,-1
62567535,HKG,a long sleeved @RAard @YZoo@w tshirt,21,7,1,-1,-1
62567534,,@G(>@rBlood@WStone @rGauntlets@G<)@w,41,7,1,-1,-1
62567533,HI,@r:@W:@y:@WSmooth Moves@y:@W:@r:@w,41,7,1,-1,-1
62567532,,@G(>@YW@yh@Yi@ys@Yp@ye@Yr@ys @Wof the @YE@ya@Yr@yt@Yh@G<)@w,41,7,1,-1,-1
62567531,,@G(>@YW@yh@Yi@ys@Yp@ye@Yr@ys @Wof the @YE@ya@Yr@yt@Yh@G<)@w,41,7,1,-1,-1
62567530,,@W(>@cAs@Cura@W's Az@Buri@Wte P@Cea@crl@W<)@w,41,7,1,-1,-1
62567529,HKG,a hero's leggings,21,7,1,-1,-1
62567528,,@WCan@ytera Ado@Wquin @GBo@Wdy Ar@Gmor@w,41,7,1,-1,-1
62567527,HKG,@B-@Y)@BM@bask @Bo@bf @BP@brediction@Y(@B-@w,41,6,1,-1,-1
62567526,G,a bright ball of light,0,1,1,-1,-1
62567525,G,a bright ball of light,0,1,1,-1,-1
62567524,,@yhenchman's leather vest@w,54,7,0,-1,-1
62567523,,a six shot rifle,54,5,0,-1,-1
62567522,,@yhenchman's leather vest@w,54,7,0,-1,-1
62567521,,a six shot rifle,54,5,0,-1,-1
62567520,,@yhenchman's leather vest@w,56,7,0,-1,-1
62567519,,a six shot rifle,54,5,0,-1,-1
62567518,,@yhenchman's leather vest@w,54,7,0,-1,-1
62567517,,a six shot rifle,54,5,0,-1,-1
62567515,G,blood shot eye,18,3,0,-1,-1
62567514,,scale of the enforcer,34,7,0,-1,-1
62567513,,scale of the enforcer,32,7,0,-1,-1
62567511,G,a bright ball of light,0,1,1,-1,-1
62567510,,@yhenchman's leather vest@w,52,7,0,-1,-1
62567509,,a six shot rifle,54,5,0,-1,-1
62567508,,the quivering palm style,48,5,0,-1,-1
62567507,,the dragon style,38,5,0,-1,-1
62567506,,the scorpion style,39,5,0,-1,-1
62567505,,the centipede style,41,5,0,-1,-1
62567504,K,the iron head style,44,5,0,-1,-1
62567503,K,chin kang palm,35,5,0,-1,-1
62567502,,@WS@we@Wa@wr@Wi@wn@Wg @wB@Wl@wa@Wz@we,20,5,1,-1,-1
62567501,,@WG@wa@Wv@we@Wl @wof @WJ@wu@Ws@wt@Wi@wc@We@w,50,5,1,-1,-1
62567500,K,a @gsmall bag@w,0,11,0,-1,-1
62567492,K,a @gsmall bag@w,0,11,0,-1,-1
62567486,K,Hretan's Battlegear,35,7,0,-1,-1
62567485,G,a heavy slab of granite,36,7,0,-1,-1
62567484,HK,Vladia's Shopping List,1,10,0,-1,-1
62567483,K,a hemp bracelet,20,7,0,-1,-1
{/invdata}
Then as you mouse-over your inventory it tries to get more details about an item, eg. by sending "invdetails 62567534" it gets:
{invdetails}
{invheader}62567534|41|Armor|5600|5|hands|unique, magic, burn-proof, v3||House of Touchstone||2|||60
{statmod}Damage roll|4
{statmod}Dexterity|2
{statmod}Strength|2
{/invdetails}
(see next page for screenshot of what this looks like)
This is used to display the mouse-over floating window. The details are then cached so it doesn't need to get details for 62567534 again in that session.
<advertisement>
The details are cached to save time and make the plugin much more responsive than it would have been without the caching.
</advertisement>
If you make improvements to the plugin I am happy to pull your changes back into my copy for general release. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|