View unanswered posts | View active topics It is currently 16 Jan 2018 19:41

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.



Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Mudlet help 
Author Message
Beginner

Joined: 05 May 2017 23:59
Posts: 21
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)


26 May 2017 19:58
Profile
Beginner

Joined: 05 May 2017 23:59
Posts: 21
Another question.

I want a trigger firing from
Code:
^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:
^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)


28 May 2017 03:43
Profile
Wizard
User avatar

Joined: 05 Mar 2015 03:18
Posts: 45
palaver wrote:
Another question.

I want a trigger firing from
Code:
^You attack the (.+)$



Your regex is capturing the period. Try this:

Code:
^You attack the (.+)\.$


28 May 2017 05:14
Profile
Myth
User avatar

Joined: 09 Mar 2010 20:33
Posts: 1331
Location: UK
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 :)


28 May 2017 10:44
Profile
Adept

Joined: 24 Jan 2016 21:27
Posts: 147
Is there a way to use the mentioned (.+) in the browser triggers?
e.g. You find a (.+) --> put (.+) in backpack or something?


28 May 2017 10:56
Profile
Myth
User avatar

Joined: 09 Mar 2010 20:33
Posts: 1331
Location: UK
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
viewtopic.php?f=37&t=3307

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

Look here too
viewtopic.php?f=37&t=3285

_________________
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)


28 May 2017 11:09
Profile
Beginner

Joined: 05 May 2017 23:59
Posts: 21
Tarax the Terrible wrote:


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)


29 May 2017 00:45
Profile
Beginner

Joined: 05 May 2017 23:59
Posts: 21
Ckrik wrote:
Your regex is capturing the period. Try this:

Code:
^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)


29 May 2017 01:47
Profile
Beginner

Joined: 05 May 2017 23:59
Posts: 21
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)


29 May 2017 05:26
Profile
Beginner

Joined: 05 May 2017 23:59
Posts: 21
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:
^You attack the (.+)\.$


This worked beautifully. Now I'm wondering how I can capture just the last word. I find this suggestion:

Code:
\s(\w+)$


but I wonder how to put that into the trigger pattern. I'm guessing I can't do
Code:
^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)


03 Jun 2017 23:58
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 20 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.