neizarr
Joined: 08 Dec 2006 Posts: 30
|
Posted: Wed Dec 13, 2006 6:14 pm Post subject: A listgump include file. |
|
|
I am not sure if there is another release that does better or if the current distro has something that compares, but this one include file has nearly revolutionized the way I handle player/staff interfacing, and I thought I would share it with others.
I also included a small sample script that I use it with. I actually use the listgump include throughout my shard's scripts, but often in far more complex systems, and this was the only one that was standalone and small enough to be demonstrative.
The listgump include is not simple by any means, but it will keep you from having to write a lot of gumps and has some pretty powerful uses even in it's simplest form, and even better once you understand it enough to get it to jump through the hoops for you.
You should put listgump.inc in your pol/scripts/include folder, and wearing.src in your pol/scripts/textcmd/gm folder(or whatever security level you wish to be able to use the .wearing command).
Questions and comments can be sent to neizarr@yahoo.com
ps I guess I should explain what it actually does. It's basic purpose is to help you to display a list of possibly multi-column rows from which you can select an item, handling all the setup and gump manipulations to make it a nice pretty list, as well as dealing with fitting on 'pages' and giving you a up and down arrow to navigate the pages with.
pps Also, the wearing script is a simple textcmd for staff, though it could be changed to be used by players too if you put in some safeguards. All it does is list everything equipped to layers 1-30, putting the item name in the left column and the layer it is on in the right, a button to the left of each row. There is also a Delete checkbox at the top right and the mobile's name at the top left. If the Delete box is unchecked(default) and you select one of the buttons, that item is dropped to the mobile's feet. If the Delete box is checked and you select one of the buttons, that item is destroyed. Since this is primarily a staff tool, no safeguards for managing layers is in place, so for instance you can drop the mobile's hair to it's feet as easily as it's shirt. As well, you can drop mount items, which is actually somewhat useful if you want to get at the mount item, check it's cprops, etc. If you were to make a player version you should probably only show clothing layers, have the Delete button become a Backpack button so players can drop to their feet or move to their backpack, make sure that the item is still equipped by the player if selected, and any other safeguards you can think of.
| Description: |
| listgump.inc & wearing.src |
|
 Download |
| Filename: |
listgump.zip |
| Filesize: |
7.69 KB |
| Downloaded: |
84 Time(s) |
|
|