YATCO

Share your scripts and packages with other Mudlet users.
Knute
Posts: 87
Joined: Fri Mar 05, 2010 12:08 am

Re: YATCO 2.3

Post by Knute »

add "\n" to the end of what is sent.
--
Knute

Iktomi
Posts: 46
Joined: Sat Sep 03, 2011 4:00 am

Re: YATCO 2.3

Post by Iktomi »

Obviously! I'm just not sure where in that code it would go.

Knute
Posts: 87
Joined: Fri Mar 05, 2010 12:08 am

Re: YATCO 2.3

Post by Knute »

It would go in your append line.
--
Knute

User avatar
demonnic
Posts: 884
Joined: Sat Dec 05, 2009 3:19 pm

Re: YATCO 2.3

Post by demonnic »

If you want to make it just append a line every time you call demonnic.chat:append("ChatTabName") then find the line in the demonnic.chat:append(chat) definition that says demonnic.chat.windows[chat]:append() and then add the following line right below it:

demonnic.chat.windows[chat]:echo("\n")

And that should take care of it without having to edit all of your triggers.

phasma
Posts: 191
Joined: Sat Aug 03, 2013 7:00 pm
Discord: phasma#4694

Re: YATCO 2.3

Post by phasma »

Do I smell a new feature? :D

Iktomi
Posts: 46
Joined: Sat Sep 03, 2011 4:00 am

Re: YATCO 2.3

Post by Iktomi »

Awesome, thank you!

EDIT: Hm.. this works for every tab except for the All or bucket tab...

Inaryn
Posts: 4
Joined: Thu Oct 25, 2012 12:57 am

Re: YATCO 2.3

Post by Inaryn »

I'm an absolute failure with this kind of stuff, and tried searching places but meh, so

I created a tab to capture this text into

amelia: flick him back.
amelia: on the noise

and after much experimentation i got it to work fine

^(\w+):(.+)$

But it's also capturing this

Extra: hung quilt, door charm, hung painting
Places: comfy but worn sofa, workdesk with a desktop computer on it

So how can I tell it not to grab anything that starts with Extra: and Places: ?

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: YATCO 2.3

Post by Belgarath »

Try adding an if statement to the beginning of the script box.
Code: [show] | [select all] lua
if matches[2] == "Extra" or matches[2] == "Places" then return end
Hope that helps.

Inaryn
Posts: 4
Joined: Thu Oct 25, 2012 12:57 am

Re: YATCO 2.3

Post by Inaryn »

cheers for that, yeah it worked, I just had to create a long ass list of things I didn't want it to be grabbing

User avatar
demonnic
Posts: 884
Joined: Sat Dec 05, 2009 3:19 pm

Re: YATCO 2.3

Post by demonnic »

If you have a long list, I suggest doing it this way.
Code: [show] | [select all] lua
--if this is the only trigger you need this list for, place it in the trigger itself and make it "local inarynCaptureExclusions" instead. Otherwise, put this in a script item.
inarynCaptureExclusions = { 
  "Extra",
  "Placces",
  "WoogieBoogie",
  "Thingerbopper"
}


--change the if statement from above to

if table.contains(myTable, matches[2]) then return end

Post Reply