Can somone help with this script please?

Moderator: GeekShed.Net Staff

Can somone help with this script please?

Postby Will » Tue Sep 07, 2010 5:49 pm

New to this.
Here is the script I am having trouble with:


on 1:text:test:#mychat: { /notice $nick My Message
}

-------------------
My question is,

When somone in the channel types the word test the notice is sent to that person. How do I make this so that if the person types the word test in a sentence it will send the notice as well?

Thanks in advance for any help
Will
 
Posts: 9
Joined: Thu Aug 19, 2010 6:13 pm

Re: Can somone help with this script please?

Postby GrimReaper » Tue Sep 07, 2010 6:19 pm

Will, There are two way's of doing this.. You can either do
Code: Select all
on 1:TEXT:*test*:#channelname: { notice $nick Your message }


or

Code: Select all
on 1:TEXT:*:#channelname: { if (test isin $1-) { notice $nick Your message } }


I hope this helps you out. :)
GrimReaper
 
Posts: 73
Joined: Wed Oct 28, 2009 4:34 pm
Location: In your router, Resetting your connection.

Re: Can somone help with this script please?

Postby Will » Tue Sep 07, 2010 6:51 pm

Thanks so much for the fast reply GrimReaper. That works great and is just what I was looking for. One thing I forgot to ask though, do I have to enter that line of script each time I want to add an additional word to be triggered?
Will
 
Posts: 9
Joined: Thu Aug 19, 2010 6:13 pm

Re: Can somone help with this script please?

Postby GrimReaper » Tue Sep 07, 2010 7:22 pm

with the second one I posted,
Code: Select all
on 1:TEXT:*:#channelname: { if (test isin $1-) { notice $nick Your message } }

You could space it out more and add more words under it.

Code: Select all
on 1:TEXT:*:#channelname: {
  if (test isin $1-) {
    .notice $nick Your message
  }
  elseif (word2 isin $1-) {
    .notice $nick blah blah
  }
}


But most people prefer to use !triggers. and changing
Code: Select all
if (test isin $1-) {
to
Code: Select all
if ($1 == !test) {
Will make thing's easier.
GrimReaper
 
Posts: 73
Joined: Wed Oct 28, 2009 4:34 pm
Location: In your router, Resetting your connection.

Re: Can somone help with this script please?

Postby Will » Tue Sep 07, 2010 7:30 pm

Thanks again for the help GrimReaper. I look forward to learning from everyone here at GeekShed.
Will
 
Posts: 9
Joined: Thu Aug 19, 2010 6:13 pm

Re: Can somone help with this script please?

Postby GrimReaper » Tue Sep 07, 2010 7:35 pm

Well.. If you even would like to talk to me, I'm usually in #bots under the nick Danneh, Peer or GrimReaper. Depending on what nick I decide :)
GrimReaper
 
Posts: 73
Joined: Wed Oct 28, 2009 4:34 pm
Location: In your router, Resetting your connection.

Re: Can somone help with this script please?

Postby Will » Tue Sep 07, 2010 9:04 pm

Right on, I will keep that in mind because I am sure I will be seeking more help in the furture. :)
Will
 
Posts: 9
Joined: Thu Aug 19, 2010 6:13 pm


Return to Script help

Who is online

Users browsing this forum: No registered users and 9 guests

cron