Mudlet 'Plugins'

by Anisu

Back to Mechanic's Corner.

Vadi2011-04-14 01:12:58
Updated it.

Sending GMCP means sending stuff to the server. A script is executed "at once", it never pauses and waits until info gets back. So script calls sendGMCP -> script does other stuff and finishes -> command arrives at server -> server responds -> mudlet raises relevent GMCP event when it comes back.
Anisu2011-04-17 14:52:09
I updated IFF, it now makes extensive use of functions rather than aliases.

New additions:
- it now exports in to external table files (they are really just .txt files)
- naturally you can now import those external table files
- you can order iff to obtain the table files from ealhdun.be, this is laggy so do it somewhere safe (ealhdun table files were last updated 17/04/2011)
- you can opt to use vadi's getinfo plugin to obtain information on people on qwho who's alignment you don't know (or are rogue) and add it to the tables
This is -not- the same as Calixa's addition so it could still be worthwile to get that one.

Things removed:
- finally removed that debug message that kept listing every celestian line by line
- old import and export functions were removed (if for some reason you want to keep them, just copy the aliases out of the old IFF, they will still work)

Things changed:
- some commands have been renamed
- plugin now initializes on loading the session rather than login
- function calls should allow other plugins to get rid of the evil expandAlias command
- Information gets saved after every big change, you can also manually save
- help file now hints at my wish for more cheesecake

ps. I do believe linux/macOs/BSD users have to modify the import/export script file and replace '\\\\' with '/'. I think, if I am wrong well you are using linux so you can experiment and educate me.

edit:

On request you can now also add people to an org called rogue, this will colour them different from total uknowns, getinfo will also assign people to this org to prevent continious requests for info on people like spindle. Thank Calixa for this suggestion
Vadi2011-04-17 18:18:18
You should just use / because Lua will make that work on Windows as well (earlier scripts by me had a misconception about that >.>)

* downloadFile exists in 2.0 rc's and not in the latest available from the website, 1.1.1.
Anisu2011-04-17 18:34:52
QUOTE (Vadi @ Apr 17 2011, 08:18 PM) <{POST_SNAPBACK}>
You should just use / because Lua will make that work on Windows as well (earlier scripts by me had a misconception about that >.>)

* downloadFile exists in 2.0 rc's and not in the latest available from the website, 1.1.1.

hrm I switched to \\\\ because I was having issues concating it with the mudlet home directory function, and trough trial and error that fixed it. Though maybe I messed something else up since now that I am using file dialog boxes it seems to work fine.

Well except for the horrible echo: (IFF): Saving to C:\\Users\\Laurens\\Documents\\Lusternia\\IFF/iff-hallifax.txt

and yeah my script tells people to get 2.0 RC1 or later. (I think, that is what I intended it to do with a if not downloadFile then)
Actually I think I'll link 2.0 on the index page of this topic.
Vadi2011-04-17 22:26:48
echo:gsub("\\\\", "/") biggrin.gif
Fuyu2011-04-25 06:47:55
What do I tweak in the blinking chat so that the right border of the nexus-like skin doesn't cover the last word of the says/tells I capture?
Anisu2011-04-25 09:39:25
QUOTE (Fuyu @ Apr 25 2011, 08:47 AM) <{POST_SNAPBACK}>
What do I tweak in the blinking chat so that the right border of the nexus-like skin doesn't cover the last word of the says/tells I capture?

Though I don't have nexus skin installed, you could try changing either the numerical value in:

ChatStuff.wordwrap = (ChatStuff.width / ChatStuff.fontWidth) - 1

or

function ChatStuff.posX()
return mainWidth - ChatStuff.width - 15 --the -15 is to keep it from covering the scroll bar
end

Fuyu2011-04-25 09:58:36
QUOTE (Anisu @ Apr 25 2011, 05:39 PM) <{POST_SNAPBACK}>
Though I don't have nexus skin installed, you could try changing either the numerical value in:

ChatStuff.wordwrap = (ChatStuff.width / ChatStuff.fontWidth) - 1

or

function ChatStuff.posX()
return mainWidth - ChatStuff.width - 15 --the -15 is to keep it from covering the scroll bar
end


Editing the second one results in the right border overlapping with the chat window.
Aison2011-05-08 16:15:51
Hi, what am I supposed to do about the potionlist/magiclist bit? Every time I type potionlist/magiclist it doesn't show me anything except that it's configing my pagelength to 200.

CODE
config pagelength 200
magiclist
Your current pagelength: 200
(p) 5220h, 5694m, 5700e, 10p ex<>-


Is all I see. Same thing even when the system isn't paused. Only way I can get it to show up is by turning triggers off.
Anisu2011-05-08 16:33:53
QUOTE (Aison @ May 8 2011, 06:15 PM) <{POST_SNAPBACK}>
Hi, what am I supposed to do about the potionlist/magiclist bit? Every time I type potionlist/magiclist it doesn't show me anything except that it's configing my pagelength to 200.

CODE
config pagelength 200
magiclist
Your current pagelength: 200
(p) 5220h, 5694m, 5700e, 10p ex<>-


Is all I see. Same thing even when the system isn't paused. Only way I can get it to show up is by turning triggers off.

if you are using demmonic's script, it gags it to send to the miniwindow. using more a few times might help in case it also gags that line
Aison2011-05-08 17:23:37
QUOTE (Anisu @ May 8 2011, 08:33 AM) <{POST_SNAPBACK}>
if you are using demmonic's script, it gags it to send to the miniwindow. using more a few times might help in case it also gags that line


Tried it multiple times but the potions bit never loaded up, it just stayed blank. The herbs bit worked fine as far as I could tell and my rift was never gagged.

Becoming further frustrated with the IFF script. Half the aliases don't work, and I can't change the org colors. And futhermore! Doing "lua echo("hi")" doesn't present to me an echo of any kind (even with a correct alias Kelly asked me to set up). As far as I'm aware I've either broken something horribly (I really don't know how, though, to be quite honest), or maybe it is Mudlet 2.0 acting like a bizznatch.
Vadi2011-05-08 21:24:51
See what happens in the Errors view when you try running that Lua alias.
Aison2011-05-09 09:09:55
QUOTE (Vadi @ May 8 2011, 02:24 PM) <{POST_SNAPBACK}>
See what happens in the Errors view when you try running that Lua alias.


No errors pop up at all sad.gif
Kelly2011-05-09 20:06:32
Forum noob question: how do you make the script link thing if you wanted to add one here? Tried upload but got an error, and figuring that's not the right way to do it.
Anisu2011-05-09 20:26:40
QUOTE (Kelly @ May 9 2011, 10:06 PM) <{POST_SNAPBACK}>
Forum noob question: how do you make the script link thing if you wanted to add one here? Tried upload but got an error, and figuring that's not the right way to do it.

you can't upload xml, so you either rename it to something like txt, or you upload it to another place and then link it via http
Lilia2011-05-09 20:59:05
Or make it a zip file.
Kelly2011-05-09 21:23:37
Ahh, okay, thanks for the help! Went with the zip, but anyone have a recommendation for a reliable file sharing site? I tried to do it through my Dropbox but I'm guessing that's not the way to go.

Anyway, really quick script for the lazy butts who want to automatically squad draft everyone in your current room. You'll need an alias like this:

CODE
Pattern: ^autodraft$
Script:
send("who here",false)
enableTrigger("Draft Capture")


The code uses the m&m do function, so no system=no go. Also you can "undoall" to stop it.

Disclaimer: I am not responsible for any poor, poor novices who get unwillingly snatched up to Astral, Muud, or any other such (un)?pleasant locations.

Neos2011-05-09 22:02:13
QUOTE (Kelly @ May 9 2011, 05:23 PM) <{POST_SNAPBACK}>
Ahh, okay, thanks for the help! Went with the zip, but anyone have a recommendation for a reliable file sharing site? I tried to do it through my Dropbox but I'm guessing that's not the way to go.

Anyway, really quick script for the lazy butts who want to automatically squad draft everyone in your current room. You'll need an alias like this:

CODE
Pattern: ^autodraft$
Script:
send("who here",false)
enableTrigger("Draft Capture")


The code uses the m&m do function, so no system=no go. Also you can "undoall" to stop it.

Disclaimer: I am not responsible for any poor, poor novices who get unwillingly snatched up to Astral, Muud, or any other such (un)?pleasant locations.


I've uploaded zip files to my dropbox and gotten it to work for people to download. Not sure why yours isn't working.
Kelly2011-05-09 22:15:13
QUOTE (AquaNeos @ May 9 2011, 06:02 PM) <{POST_SNAPBACK}>
I've uploaded zip files to my dropbox and gotten it to work for people to download. Not sure why yours isn't working.


Ah, I was uploading the xml.
Vadi2011-05-09 22:18:42
QUOTE (Aison @ May 9 2011, 04:09 AM) <{POST_SNAPBACK}>
No errors pop up at all sad.gif



Are you checking the errors view, or the main window? Errors view is bottom-left in the script editor.