Creating plugins, specifically, an Aardwolf Auction plugin

Posted by Zantiln on Fri 07 Nov 2008 01:29 PM — 4 posts, 18,641 views.

#0
Does anyone know if there is an Aardwolf Auction plugin for MUSHclient? Something that just updates the bid table in a seperate window (or world?) and maybe shows info for items just put onto auction?

If not, and maybe even if there is, how would I create a simple plugin to do something like that from scratch? Still pretty new to MUSHclient, so I don't know my way around very well yet, but I know Perl5 somewhat well, and willing to learn lua if I need to. I just get confused easily with drawn-out tutorial introductions and what-not. Any recommendations on where I might start?
Australia Forum Administrator #1
I would use Lua preferably, most of the existing plugins for Aardwolf I wrote in Lua, so you can use them as a base.

I would take a look at some of the existing ones here for Aardwolf, see:

http://www.gammon.com.au/mushclient/plugins/Aardwolf/

Some of them (like the Score one) do something similar, where it scrapes stuff off the screen, and redisplays it in a more helpful way.
#2
Thanks Nick, I took your advice and started to mess around with copies of some of the existing scripts. In the Aardwolf_Chats script, I was trying to figure out which lines of code print the stored information from the regex match to the already created "Chats" world. I wrote a similar forum post earlier, http://www.gammon.com.au/forum/?id=9035.

Anyway, once I figure out how to make a simple plugin that stores a line of MUD text gathered from a trigger, and then prints out the line to an existing world, I should be on my way to creating a cool Auction plugin for Aardwolf. Loving the challenge.

The only problem is that there are no {} tags for Aardwolf Auction information like there are for other information, like the {map} {tell} or {stats} tags. So I don't think I would be able to create a plugin similar to the Stats_Detector plugin to gather Auction information. I'm thinking that I would have to make a timer that would send the bid command to the MUD (and hiding the bid command on the main window), then capture all the text received from that command and print it to a "Dummy" world. Then clear the screen and do it again. Does this sound plausible? Or maybe there could be an easier and/or more efficient way to do it? Only asking for advice, not asking for anyone to write this for me please! :)

Once I get a good base plugin that just does the above, then I can start adding code that actually creates the new "Dummy" world, changes window position/size etc, and saving the new world and stuff like that. Then on to adding triggers to display the item stats of any items just put on to auction, and other kewl stuff. Should be fun!
Australia Forum Administrator #3
I think a timer is about the only way to go, unless you can detect a message that indicates that you should re-gain the bid information.