Help with triggers

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Help with triggers

Post by Heiko »

fonesdvm wrote:hello heiko, my name is cris. i am not particularly programming inclined but do enjoy a particular mud (everwar). I like mudlet a lot but am having troubles with a few things. i have previously posted this on the board but am unable to find my post. I was unable to create an original post (the board said there were similar posts and prevented me from originating a thread). my questions are these (and I am sorry to inbox this, feel free to guide me in generating a legitimate post):

1) I can make basic triggers. i would like to learn how to make a trigger with a variable.
Example: In a group, the group leader tells me to enter 'XYZ', my trigger inputs 'enter XYZ'.
On my screen this would show up as:

Poncho tells the group 'enter cave'
I would like my character to automatically input 'enter cave'

2) I would like to learn how to input a more complex trigger for scanning enemies.
Example:
I input 'scan'
Mud replies:
You scan in all directions:
+* Illithid*+ is immediately west.

i would like that combination to cause my character to input:
Group tell "enemy contact 1 west"

3) I could not get the mapper to work. Every time i walked into a new room, the mapper would generate a growing list of numbers and characters on my screen that eventually made it so i could not see the mud script. I have disable the mapper, which is fine. The mud has a built-in mapper. however, the mapper is supposed to remain at the top of the screen (apparently it does on zmud). On mudlet, the mapper repopulates with each move, so that every time I move, the mapper repopulates above the room description. On backscroll, I have a new map for every time I move.

I have other questions as well, but these will make my mudding experience immediately more rewarding.

Again, sorry for inboxing you directly. And I'm sorry I don't know/understand the scripting lingo. Any help would be much appreciated.

-Cris
fontesdvm

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Help with triggers

Post by Heiko »

ad 1 + 2: http://mudlet.sourceforge.net/wordpress ... 1384630528

ad 3: You still have installed the nowadays unsupported generic mapper script package. You need to change this script to adapt it to your particular game. Uninstall this package and write your own game specific mapper script when you are a bit more familiar with Mudlet scripting.

fontesdvm
Posts: 7
Joined: Thu Sep 12, 2013 7:32 pm

Re: Help with triggers

Post by fontesdvm »

exellent. thank you! I may never figure out the mapper, but the triggers will help tremendously. I had not seen that page before. Thanks again!

I also need to figure out how to set a delay. I need a trigger to send a command but with a 0.3 second delay after the defined pattern is output from the mud. I will browse that link for an answer.
Thanks again.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Help with triggers

Post by Akaya »

Code: [show] | [select all] lua
tempTimer(0.3, [[send("do stuff")]] )
or
Code: [show] | [select all] lua
tempTimer(0.3, dostuff() )

fontesdvm
Posts: 7
Joined: Thu Sep 12, 2013 7:32 pm

Re: Help with triggers

Post by fontesdvm »

never used lua before but will give it a go. thanks!

fontesdvm
Posts: 7
Joined: Thu Sep 12, 2013 7:32 pm

Re: Help with triggers

Post by fontesdvm »

so I am still having issues with my variable trigger. I used the regex option.

trigger is set for :
tells the group 'en (.*)'

input is set for:
en (.*)

the problem is that the trigger inputs (.*) instead of substituting (.*) for whatever word was in the original text.

so if:
Someone tells the group 'en cave'
I would like for the trigger to input: en cave. substitute 'cave' for whatever else we may be entering.

Is there some text or formula that I need to input into the Lua box as well to make this work?

Any help appreciated.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Help with triggers

Post by Akaya »

If your trigger line is like so (with perl regex selected from the dropdown)...
^.* tells the group 'en (.*)'$

You can put this in the big white box...
send("en "..matches[2])

fontesdvm
Posts: 7
Joined: Thu Sep 12, 2013 7:32 pm

Re: Help with triggers

Post by fontesdvm »

worked great, thanks!

fontesdvm
Posts: 7
Joined: Thu Sep 12, 2013 7:32 pm

Re: Help with triggers

Post by fontesdvm »

for the temp timer, what box to i put this text into:

tempTimer(0.3, [[send("do stuff")]] ) ?

and what option on the dropdown list?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Help with triggers

Post by Vadi »

Into the bix white box (that's where code goes).

Post Reply