kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 21 Aug 2013 01:08 PM |
What I'm trying to do here is if someone's chat, anywhere in it, it will activate it. It doesent matter what they say before or after it. It will do that I want it to. The activation words are kingmatt2, and OnChatted.
if msg:match("OnChatted") or msg:match("kingmatt2")then name = msg:match("(%w+)OnChatted(%w+)") or msg:match("(%w+)kingmatt2(%w+)")
|
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
| |
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 21 Aug 2013 01:32 PM |
I've been reading the Wiki and it doesent make sence. From all I know is I should be able to put OnChatted in the pattern and it would do the same as I need... |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
| |
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
| |
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
| |
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
| |
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 21 Aug 2013 02:17 PM |
| I've been sitting here about 3 hours! |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 21 Aug 2013 02:19 PM |
And the others have been waiting longer. It's not just you, wait til someone can help. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 21 Aug 2013 02:20 PM |
| FINE. Do you know about string.match ? |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 21 Aug 2013 02:22 PM |
No,
Just try using wikis example of string patterns and changing it a bit |
|
|
| Report Abuse |
|
|
ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 21 Aug 2013 02:23 PM |
I can help wait one second
Lobster in disguise |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 21 Aug 2013 02:24 PM |
| I've been reading the wiki, and thank you cold. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 21 Aug 2013 02:34 PM |
| um... If you new what you were doing you might have done this already? Or am I wrong? I'm only saying this because I saw you post on other threds. |
|
|
| Report Abuse |
|
|
ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 21 Aug 2013 02:40 PM |
Well you see I'm not very familiar with string.match
other threads the scripts I'm talking about simply use string.gsub which is really easy, I just got thrown off by you saying you needed it to match two words
and then I got distracted...
Lobster in disguise |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 21 Aug 2013 02:42 PM |
It doesent have to be sting.match.
I just need it so when someone gets OnChatted, than it happens. But the OnChatted could be anywhere in the test they do Example:
32..'//0()_*0=2OnChatted329>';. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
| |
|