[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Miniwindows
. . -> [Subject]  Mini-window for public chatter

Mini-window for public chatter

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1  2  3  4  5  6  7  8 9  

Posted by Halig   Portugal  (123 posts)  [Biography] bio
Date Reply #105 on Wed 11 Mar 2015 09:27 AM (UTC)
Message
Hi Nick. I see that this Mini Window is exactly what i need. I saw on your firsts posts that it has a version 2, then 2.2, till 2.4. Where can i find the last version?
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #106 on Wed 11 Mar 2015 01:58 PM (UTC)

Amended on Wed 11 Mar 2015 01:59 PM (UTC) by Fiendish

Message
As far as I know, Nick doesn't constantly update his genericized version to keep pace with my whims in my Aardwolf package development. He did the original conversion as a community service.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Halig   Portugal  (123 posts)  [Biography] bio
Date Reply #107 on Wed 11 Mar 2015 02:33 PM (UTC)
Message
Thank you again Fiendish.
I'm strugling on some regex, they don't want to work.
This is what i need:

1) Player1 is in Somewhere [200]
2) Player2 is in Somewhere [200]
3) Player3 is in Somewhere [200]
4) Player4 is in Somewhere [200]
5) Player5 is in Somewhere [200]
6) Player6 is in Somewhere [200]
7) Player7 is in Somewhere [200]
8) Player8 is in Somewhere [200]

I need to capture and send to the mini window only the player name, not the rest...
When i had triggers to do that, i only had this:

(.*) (.*) is in (.*)

But if i do this, it shows nothing on the Mini Window.
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #108 on Wed 11 Mar 2015 04:02 PM (UTC)

Amended on Wed 11 Mar 2015 04:03 PM (UTC) by Fiendish

Message
Quote:
i only had this:

(.*) (.*) is in (.*)

Useless incomplete information.

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Halig   Portugal  (123 posts)  [Biography] bio
Date Reply #109 on Wed 11 Mar 2015 04:04 PM (UTC)
Message
<triggers>
<trigger
enabled="y"
match="(.*) (.*) is in (.*)"
regexp="y"
send_to="12"
sequence="100"
>
<send>player = "%2"

print(player)</send>
</trigger>
</triggers>


Like this it works, but how do i put that into the mini window code? Is just replace the trigger?
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #110 on Wed 11 Mar 2015 05:30 PM (UTC)
Message
Either replace the triggers in the plugin or follow http://mushclient.com/forum/?id=10728&reply=76#reply76

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Halig   Portugal  (123 posts)  [Biography] bio
Date Reply #111 on Wed 11 Mar 2015 05:40 PM (UTC)
Message
If i replace the trigger it sends the print to the world, and i want it to be displayed on the mini window.
The timestamp is there, i only need the name of the player.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #112 on Wed 11 Mar 2015 08:01 PM (UTC)
Message
That thread is so long I can't remember everything in it. However from the first page:


 <trigger
    enabled="y"
    match="You tell * '*'"
    script="chats"
    omit_from_output="y"
    sequence="100"
    ></trigger>


All the triggers intended to put things in the chat window have "chats" as their script function.

Your posted trigger does not.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Halig   Portugal  (123 posts)  [Biography] bio
Date Reply #113 on Wed 11 Mar 2015 08:07 PM (UTC)
Message
You are right Nick, and i changed that. Still no luck. It must be something in the Regex, but i can't figure out what.
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #114 on Wed 11 Mar 2015 09:50 PM (UTC)
Message
The chats script function isn't really meant to do only partial capture. If you want to only record a certain bit of information, I think you should add the storeFromOutside function as shown in http://mushclient.com/forum/?id=10728&reply=76#reply76 and then call it from your world trigger as shown in the comment for that function.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Halig   Portugal  (123 posts)  [Biography] bio
Date Reply #115 on Thu 12 Mar 2015 06:24 AM (UTC)
Message
Fiendish, thank you for your help, and sorry in advance for asking this.
If i want to do what you are saying, how do i do that? Where do i put that function and what would it say?
Put that inside the chat plugin? Make a new one?
Sorry for this questions, but i really didn't follow you on this.
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #116 on Thu 12 Mar 2015 07:22 PM (UTC)
Message
You put the function in the chat plugin next to all the other functions.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Halig   Portugal  (123 posts)  [Biography] bio
Date Reply #117 on Thu 12 Mar 2015 08:39 PM (UTC)
Message
Thank Fiendish. It worked.

<triggers>
<trigger
enabled="y"
match="(.*) (.*) is in (.*)"
script="chats"
send_to="12"
sequence="100"
>
<send>CallPlugin ("6e6499aaa51cd07b6d2aa031", "storeFromOutside", "%2")</send>
</trigger>
</triggers>

And then put the function:

function storeFromOutside(text)
chats (nil, nil, nil, mw.ColoursToStyles(text))
end


There is only one problem. It shows what i want, but shows the all line again, meaning, i get the name and the all sentence in the next line. How do i remove the all line and keep only the name?
Thank you again.
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #118 on Fri 13 Mar 2015 12:43 AM (UTC)

Amended on Fri 13 Mar 2015 12:45 AM (UTC) by Fiendish

Message
Your new trigger has a pattern that looks like it should be a regexp but it is not flagged as one.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Halig   Portugal  (123 posts)  [Biography] bio
Date Reply #119 on Fri 13 Mar 2015 06:55 AM (UTC)
Message
I've tried that, an still no luck. It get's doubled.
It shows the name only (what i want) and the all string in the next line.


<triggers>
<trigger
enabled="y"
match="(.*) (.*) is in (.*)"
regexp="y"
script="chats"
send_to="12"
sequence="100"
>
<send>CallPlugin ("6e6499aaa51cd07b6d2aa031", "storeFromOutside", "%2")</send>
</trigger>
</triggers>
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


326,971 views.

This is page 8, subject is 9 pages long:  [Previous page]  1  2  3  4  5  6  7  8 9  [Next page]

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]