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 » Thu Aug 07, 2014 1:35 am

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 » Thu Aug 07, 2014 1:40 am

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 » Thu Aug 07, 2014 2:40 am

It would go in your append line.
--
Knute

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

Re: YATCO 2.3

Post by demonnic » Thu Aug 07, 2014 3:45 am

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.

fetaera
Posts: 191
Joined: Sat Aug 03, 2013 7:00 pm

Re: YATCO 2.3

Post by fetaera » Thu Aug 07, 2014 4:32 am

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 » Sun Aug 10, 2014 1:22 am

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 » Mon Sep 01, 2014 5:18 am

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#2283

Re: YATCO 2.3

Post by Belgarath » Mon Sep 01, 2014 9:47 am

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 » Mon Sep 01, 2014 10:17 am

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: 557
Joined: Sat Dec 05, 2009 3:19 pm

Re: YATCO 2.3

Post by demonnic » Sun Sep 14, 2014 4:42 pm

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

Who is online

Users browsing this forum: Baidu [Spider] and 6 guests