Info Here Table

Share your scripts and packages with other Mudlet users.
Post Reply
User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Info Here Table

Post by Akaya »

For use in Achaea. Not sure if it works with other IRE games, but would be good to know if it does!

This script will take all items in a room, seen by typing IH, and place them in a table called Room_Contents
Info_Here.xml
(3.17 KiB) Downloaded 593 times
The table is updated when you type IH.

You can see what is in the table with the following:
Code: [show] | [select all] lua
display(Room_Contents)
Rather simple. I see people request this all the time so hopefully this will give you a leg up on storing the room contents.

Enjoy!

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Info Here Table

Post by Akaya »

I figured you might need help manipulating the Room_Contents table to do what you want, so here are a few examples:

Assuming that your target variable is target this function will check if your target is in the room and announce it to you:
Code: [show] | [select all] lua
function checkTarget()
	for k,v in pairs(Room_Contents) do
		if target == v then
			cecho("\n<cyan>"..target.."<yellow> is in this room!")
		end
	end
end
Stick this function into your "IH" alias for it to work.

Enjoy!

Delrayne
Posts: 159
Joined: Tue Jun 07, 2011 7:07 pm
Contact:

Re: Info Here Table

Post by Delrayne »

For the record this can easily be done behind the scenes with GMCP, thus negating the need to update it with IH

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Info Here Table

Post by Akaya »

The point of this was actually to do it without. Don't ask me why. I just see it requested for all the time.

Delrayne
Posts: 159
Joined: Tue Jun 07, 2011 7:07 pm
Contact:

Re: Info Here Table

Post by Delrayne »

Heh, no worries. Just thought I'd point it out in case you wanted some more coding ideas to keep you busy.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Info Here Table

Post by Akaya »

As a matter of fact it did keep me busy today. I rewrote a script I found here in the forums so it will work with Vyzor.

Same thing as above just uses gmcp. You can find it here

Post Reply