Mudlet help

Need some help with your MUD client? Forgot your password? Get help here.
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
palaver
Beginner
Posts: 21
Joined: 05 May 2017 23:59

Mudlet help

Post by palaver » 26 May 2017 19:58

I've been toying with Mudlet. It seems powerful and flexible, but to use it fully, I need to become way more familiar with it. The learning curve is steep. Can we use this thread to compile resources and tips for people who are using this client?

Question: Can I set up a timer that triggers can turn on and off? Here's what I have in mind:

Timer sends combat command every x.x seconds.
Trigger activates the timer on something like "attacks you."
Trigger de-activates the timer on something like "The __ died."
Is such a setup possible?
"When I die, throw me to the wolves. I'm used to it."
- Diogenes the Cynic (trans. Davenport)

palaver
Beginner
Posts: 21
Joined: 05 May 2017 23:59

Re: Mudlet help

Post by palaver » 28 May 2017 03:43

Another question.

I want a trigger firing from

Code: Select all

^You attack the (.+)$
Then I want a special guild appraisal of (.+), which is my target.
But (.+) captures the full stop in, e.g., "You attack the foul-smelling orc."
So Genesis goes "What?"
Would something like

Code: Select all

^You attack the (\w+)$
grab all the words but not the full stop?

Thanks for any advice on this, or just learning how Mudlet works in general, you might be able to offer. The manual is helpful to an extent but obviously I could use some help. Plus I think maybe this isn't even Mudlet specific.
"When I die, throw me to the wolves. I'm used to it."
- Diogenes the Cynic (trans. Davenport)

User avatar
Ckrik
Wizard
Posts: 226
Joined: 05 Mar 2015 03:18

Re: Mudlet help

Post by Ckrik » 28 May 2017 05:14

palaver wrote:Another question.

I want a trigger firing from

Code: Select all

^You attack the (.+)$
Your regex is capturing the period. Try this:

Code: Select all

^You attack the (.+)\.$

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: Mudlet help

Post by Tarax the Terrible » 28 May 2017 10:44

palaver wrote:I've been toying with Mudlet. It seems powerful and flexible, but to use it fully, I need to become way more familiar with it. The learning curve is steep. Can we use this thread to compile resources and tips for people who are using this client?

Question: Can I set up a timer that triggers can turn on and off? Here's what I have in mind:

Timer sends combat command every x.x seconds.
Trigger activates the timer on something like "attacks you."
Trigger de-activates the timer on something like "The __ died."
Is such a setup possible?
Does this help?
http://wiki.mudlet.org/w/Manual:Timer_Engine
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

Drazson
Titan
Posts: 499
Joined: 24 Jan 2016 21:27

Re: Mudlet help

Post by Drazson » 28 May 2017 10:56

Is there a way to use the mentioned (.+) in the browser triggers?
e.g. You find a (.+) --> put (.+) in backpack or something?

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: Mudlet help

Post by Tarax the Terrible » 28 May 2017 11:09

Drazson wrote:Is there a way to use the mentioned (.+) in the browser triggers?
e.g. You find a (.+) --> put (.+) in backpack or something?
Britannica almost does that in an example here
https://www.genesismud.org/forums/viewt ... =37&t=3307

Using args to check then a command, could probably use args in the command too

Look here too
https://www.genesismud.org/forums/viewt ... =37&t=3285
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

palaver
Beginner
Posts: 21
Joined: 05 May 2017 23:59

Re: Mudlet help

Post by palaver » 29 May 2017 00:45

Tarax the Terrible wrote:Does this help?
http://wiki.mudlet.org/w/Manual:Timer_Engine
It's incredibly nice of you to look this up, since you're not even a Mudlet user. I've looked at various parts of the manual, including this one.
I get the basic commands, but I don't see how to make the enabling / disabling dependent on something like the MUD spitting out
"The [target] died" - inside a trigger. I think I could figure out how to make it its own trigger, but not how to embed this condition itself
in a trigger.

P.S. Haven't looked at the Britannica stuff yet - but I will, and I appreciate it.
"When I die, throw me to the wolves. I'm used to it."
- Diogenes the Cynic (trans. Davenport)

palaver
Beginner
Posts: 21
Joined: 05 May 2017 23:59

Re: Mudlet help

Post by palaver » 29 May 2017 01:47

Ckrik wrote:Your regex is capturing the period. Try this:

Code: Select all

^You attack the (.+)\.$
Great. I will try this. Thank you.
"When I die, throw me to the wolves. I'm used to it."
- Diogenes the Cynic (trans. Davenport)

palaver
Beginner
Posts: 21
Joined: 05 May 2017 23:59

Re: Mudlet help

Post by palaver » 29 May 2017 05:26

palaver wrote:I don't see how to make the enabling / disabling dependent on something like the MUD spitting out
"The [target] died" - inside a trigger. I think I could figure out how to make it its own trigger, but not how to embed this condition itself
in a trigger.
Maybe an even more elegant solution would be to put the kill switch in the timer itself? I'll see if I can figure out how to do that.
"When I die, throw me to the wolves. I'm used to it."
- Diogenes the Cynic (trans. Davenport)

palaver
Beginner
Posts: 21
Joined: 05 May 2017 23:59

Re: Mudlet help

Post by palaver » 03 Jun 2017 23:58

I realize this is no longer really about Mudlet, but about Perl regex. Sorry about that.
Ckrik wrote:Your regex is capturing the period. Try this:

Code: Select all

^You attack the (.+)\.$
This worked beautifully. Now I'm wondering how I can capture just the last word. I find this suggestion:

Code: Select all

\s(\w+)$
but I wonder how to put that into the trigger pattern. I'm guessing I can't do

Code: Select all

^You attack the (.+)\s(\w+)\.$
I apologize in advance for anyone who reads that and finds it hideous, which I'm sure it is.
The basic question is, what do I put between the known beginning of the pattern "You attack ..." and the unknown stuff up until the last word, which is what I want to capture?
"When I die, throw me to the wolves. I'm used to it."
- Diogenes the Cynic (trans. Davenport)

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/