Mudlet Questions

by Rika

Back to Mechanic's Corner.

Unknown2012-01-03 04:44:20
Zynna:

I'm getting the same error message when I have any psi channels locked. It thinks I don't have balance, and won't start auto-walking until I unlock all channels. Not sure what the fix is though.


I think the trick is to redo the script to make it psi balance friendly when it's checking GMCP.
Temnota2012-01-05 05:21:06
How would I make a trigger that spans multiple lines, but the line break may shift depending on how long some names and such are?

Example:

Name swings an axe at your head.

Mynameisunnecessarilylong swings
an at axe your head.

And I want it to trigger on both of those.
Vadi2012-01-05 05:29:16
Use wrapwidth 0 in-game and Mudlet will see it as just one line.
Kelly2012-01-05 06:44:35
Aldani:

The last script/package I successfully imported was the fancy GUI. I had a bit of trouble getting the right path for the images, but I figured it out and I'm pretty sure I didn't break anything in doing that. Since then, whenever I open the scripts page and click to import, the file browser opens for a second but then vanishes, and after that the input box in the main screen no longer works. I have to quit and restart the program to input any text. I've restarted the program, I've restarted the computer, all with the same result.

EDIT: I've found http://forums.mudlet....php?f=9&t=2336, which describes the problem, so I guess my new question is: any updates and any way around this?


A friend had this problem also. I think she ended up keeping an older version of Mudlet that didn't cause problems and used that to import scripts, and then could use the updated version regularly.
Rika2012-01-05 09:19:59
Is it just me or is sourceforge broken? I can't download Mudlet :(
Vadi2012-01-05 09:23:42
I think just you - they use a lot of mirrors, so try another one (should see an option on the page).
Rika2012-01-05 09:33:37
Whenever I try to download something like http://sourceforge.net/projects/mudlet/files/Mudlet-2.0-test4b.exe/download, it ends up saying connection reset. :(
Aldani2012-01-06 02:02:56
Kelly:


A friend had this problem also. I think she ended up keeping an older version of Mudlet that didn't cause problems and used that to import scripts, and then could use the updated version regularly.

That works perfectly, thanks so much!
Saran2012-01-06 02:40:47
Well, mudlet is not acknowledging various keys, pretty much everything that is not a character :(

And yes, it is only mudlet
Unknown2012-01-07 05:21:24
I'd like to ask for a bit of help with performing math operations in Mudlet. I've seen in a few logs how the cool kids managed to, when they discern, echo a percentage enxt to the number/number thing. So I was wondering how to do it!

^You stare deep into (\\w+)\\'s soul and discern that:$

^\\w+ health stands at (\\d+)/(\\d+)\\.$
^\\w+ mana stands at (\\d+)/(\\d+)\\.$
^\\w+ ego stands at (\\d+)/(\\d+)\\.$
^\\w+ ego stands at (\\d+)/(\\d+)\\.$


I think I have that right, but the code, I'm confused about it. Anyone mind helping me?
Unknown2012-01-07 09:44:49
^\\w+\\'s health stands at (\\d+)\\/(\\d+)\\.$

cecho(" > > > " .. math.ceil((matches / matches) * 100) .. "%")


Is what you want, I suspect. :)
Unknown2012-01-07 17:47:35
Thanks!
Unknown2012-01-07 19:19:31
Also, is there some sort of GMCP for people on your enemy list that you can grab onto for code to do only certain things towards your enemies?

^You reject the friendship of (\\w+)\\.$

send("enemy " .. matches)

Is there some way I can just make that exclusive to enemies? I don't want to accidentally enemy an ally who uses love potion during a fight.
Lilia2012-01-07 20:39:38
There's not any gmcp for it, but it's not too hard to keep track of yourself. Though, if you're on m&m, you can just 'mmconfig autoreject white', and add your allies to the lustlist. That only helps with rejecting, though, so here's how I keep track of enemies.

Exact match trigger, fire length set to 50 (or some other number bigger than 30, doesn't really matter):
You consider the following adventurers your enemies:
enemylist = {}
Inside that trigger, a perl regex trigger:
^(\\w+) is an enemy\\.$
table.insert(enemylist, matches)
Also inside the first trigger, a Lua function trigger:
return isPrompt()
setTriggerStayOpen("whatever you named the first trigger", 0)
echo("\\n" ..#enemylist.. " enemies.")

A separate perl regex trigger:
^(\\w+) is now one of your enemies\\.$
table.insert(enemylist, matches)

Now you can check enemylist in your scripts.
if table.contains(enemylist, matches) then
stuff you want to do
end
Unknown2012-01-07 20:45:08
I wrote a pretty sweet script to deal with this, although I am pretty sure it was one of my commissioned ones. Can't remember who it was, and I know it's wishful thinking, but if they see this thread and are okay with it....
Rika2012-01-07 21:24:16
Just made this script. It's probably totally inefficient/bad coding, but hey, it works. I intentionally made it a temporary trigger for various reasons that you may or may not agree with.

Script:

enemyTable = {}

function addEnemy(newEnemy)
if not table.contains(enemyTable, newEnemy) then
table.insert(enemyTable, newEnemy)
end
killTrigger(addEnemyTrigger)
end

function removeEnemy(newAlly)
if table.contains(enemyTable, newAlly) then
table.remove(enemyTable, newAlly)
end
killTrigger(removeEnemyTrigger)
end


Alias: ^enemy (\\w+)$
if addEnemyTrigger then killTrigger(addEnemyTrigger) end

addEnemyTrigger = tempRegexTrigger(], )]])
send("enemy " ..matches)


Alias: ^unenemy (\\w+)$


if removeEnemyTrigger then killTrigger(removeEnemyTrigger) end

removeEnemyTrigger = tempRegexTrigger(], )]])
send("unenemy " ..matches)


Alias: ^enemyall$
for _,v in ipairs(enemyTable) do


send("enemy " .. v)
end


Perfect when when you need to enemy every again, because you got forced to unenemy all or your enemies used Gloomtide or something.

Lack of indentation ftl :(

For Nicholo:
Trigger: ^You reject the friendship of (\\w+)\\.$
if table.contains(enemyTable, matches) then


send("enemy" ..matches)
end
Neos2012-01-07 22:57:56
If you have/get IFF you can just make use of that enemy table. I know I incorporated it into my stuff.
Unknown2012-01-08 07:35:58
Thank you all for the assistance! I'll scour through the stuff posted before trying stuff! IFF made me lag so hard...And not sure how to dismantle/debug that.
Temnota2012-01-08 07:52:55
I can't seem to access my logs. The directory is:

/Users//.config/mudlet/profiles/Lusternia

but I can't go to that folder, and I can't seem to search out the logs anywhere. The .config part seemingly doesn't exist. I'm on a Mac.

Thanks for this and past help, you guys are awesome.