Achaea room tracking

Share your scripts and packages with other Mudlet users.
Post Reply
vakuran
Posts: 1
Joined: Fri Sep 24, 2010 4:34 pm

Achaea room tracking

Post by vakuran » Fri Sep 24, 2010 4:52 pm

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:
room_tracking.png
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)
Attachments
inforoom.xml
room tracking in achaea
(3.16 KiB) Downloaded 369 times

User avatar
Vadi
Posts: 4732
Joined: Sat Mar 14, 2009 3:13 pm

Re: Achaea room tracking

Post by Vadi » Fri Sep 24, 2010 5:37 pm

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)

traxtin
Posts: 7
Joined: Wed Nov 23, 2011 8:20 am

Re: Achaea room tracking

Post by traxtin » Mon Nov 28, 2011 4:51 am

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.

User avatar
Gilmo
Posts: 25
Joined: Fri Feb 11, 2011 11:43 am

Re: Achaea room tracking

Post by Gilmo » Tue Feb 14, 2012 9:44 pm

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)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests