Page 1 of 1

Achaea room tracking

Posted: Fri Sep 24, 2010 4:52 pm
by vakuran
Tested this in Achaea a bit for rats and stuff.. This script will track items in the room using gmcp, and will also track things entering and leaving the room (ie if a rat enters or leaves). The xml of the script is attached. Add a call to doItemBox() to your resizewindowevent

Note: I just started using Mudlet experimentally to see what I could do with it and just started writing my first LUA code yesterday so excuse some wackiness or completely the wrong way I've done things (please comment on anything I did that was wrong)

Here is a screenshot of it:
screen shot in action
screen shot in action
When anything enters/leaves it echos to screen and it also updates the top right item list box, whose items are targetable using your own target script with function dotarget(target)

A question to you scripters out there: is there a better way of doing something like this:

Code: Select all

echoLink("itemboxlist", " " .. i .. "  " .. j .. "\n", "assert(loadstring(\"dotarget(" .. i .. ")\"))()", "target " .. i)
(to add a clickable link for targetting.... this way its ... awkward)

Re: Achaea room tracking

Posted: Fri Sep 24, 2010 5:37 pm
by Vadi
You can use sysWindowResize event now (and should) to track window size changes.
Code: [show] | [select all] lua
echoLink("itemboxlist", " " .. i .. "  " .. j .. "\n", [[dotarget("]] .. i .. [[")]], "target " .. i)

Re: Achaea room tracking

Posted: Mon Nov 28, 2011 4:51 am
by traxtin
Sorry for bringing back such an old subject BUT...
I recently downloaded this and I am using it now and I have to say once i figured out how to move it into a good location I am quite pleased. Have there been any updates made over the past year to this script though?

The update I would be most interested in would be the one that fixes the issue in this script presently:

If you empty the contents of a room entirely whether it be denizens or items the itembox will go back to listing everything that was in the room when you last looked at it.

Re: Achaea room tracking

Posted: Tue Feb 14, 2012 9:44 pm
by Gilmo
That's because the updated Char.Items.List is sent only after you MAP or LOOK kind.
Managing the Char.Items.Add and Remove tables with a separated handler (like gmcp.Char.Items.List for the List part an gmcp.Char.Items.Add / Remove ) and tracking what's in the room within a separated table worked great for me.

I can post mine if you still need, but it's nothing like written for public purpose (eheh)