Sponsored Links




Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#259 - 12/10/07 02:42 PM Triggers (like !rules)
usrbingeek Administrator Offline
WyldRyde Staff

Registered: 07/31/06
Posts: 513
Loc: Burlington, VT
If you'd like to create some !triggers for your channel copy and paste this script in to your Remotes in mIRC.

Note: You'll need to make some modifications before it'll be ready to use. These modifications are explained below the code. Also, these triggers cannot be invoked by you if they're running on the copy of mIRC you are using to chat. So, if you wish to invoke these triggers yourself you'll need to run two copies of mIRC. One for you to chat with and another one that'll run this script (and possibly others. It'll essentially be a "bot.")

Code:
on 1:text:!rules:#channel: {
    if (($calc(($ctime - %lastupdatetime)) >= 15) || (!%lastupdatetime)) {
      set %lastupdatetime $ctime
  /msg $chan Your-rules-or-message-goes-here 
  }
}


You'll need to change #channel on the 1st line to your channel's name.

The 2nd and 3rd line calculates how long ago this trigger was used and prevents it from being triggered again in so many minutes. In this example it can only be triggered once every 15 minutes. You can make it shorter or longer by changing the 15 to however many minutes you want it to be.

The 4th line contains the message you want sent to the channel. Leave /msg $chan the way it is and replace Your-rules-or-message-goes-here with whatever you want sent.


How to have more than one trigger:
You can copy this script and change the 1st and 4th lines to send different messages. Just place every copy below the preceding one in mIRC's Remotes.

Example:
Code:
on 1:text:!rules:#channel: {
    if (($calc(($ctime - %lastupdatetime)) >= 15) || (!%lastupdatetime)) {
      set %lastupdatetime $ctime
  /msg $chan If you repeat yourself, talk in caps, are abusive, or use sexually explicit language you won't be able to chat anymore. 
  }
}
on 1:text:!voice:#channel: {
    if (($calc(($ctime - %lastupdatetime)) >= 15) || (!%lastupdatetime)) {
      set %lastupdatetime $ctime
  /msg $chan To get voiced you need to behave and follow the rules. 
  }
}
on 1:text:!cam:#channel: {
    if (($calc(($ctime - %lastupdatetime)) >= 15) || (!%lastupdatetime)) {
      set %lastupdatetime $ctime
  /msg $chan I'm using a Logitech Quick Cam 
  }
}
_________________________
WyldRyde IRC Network
Steve Mermelstein
Root Admin

#!/usr/bin/geek
My Amazon.com Wishlist

Please no PMs. Please post to a topic instead so your question(s) may benefit others.

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top
#571 - 01/06/08 03:55 PM Re: Triggers (like !rules) [Re: usrbingeek]
Gastroopa Offline
n00b

Registered: 01/06/08
Posts: 22
Loc: Wisconsin
Ok, so am I to assume this script will work just as well with a "what is" question as opposed to a ! word? Being that I would replace the ! with a what is?

Top
#572 - 01/06/08 04:01 PM Re: Triggers (like !rules) [Re: Gastroopa]
usrbingeek Administrator Offline
WyldRyde Staff

Registered: 07/31/06
Posts: 513
Loc: Burlington, VT
that's correct gastroopa
_________________________
WyldRyde IRC Network
Steve Mermelstein
Root Admin

#!/usr/bin/geek
My Amazon.com Wishlist

Please no PMs. Please post to a topic instead so your question(s) may benefit others.

Top
#577 - 01/06/08 08:30 PM Re: Triggers (like !rules) [Re: usrbingeek]
se7enFold Offline
n00b

Registered: 01/06/08
Posts: 11
Loc: Canada
Nice little trigger script thanks.
How about it being "network" specific?

Top
#583 - 01/07/08 04:42 PM Re: Triggers (like !rules) [Re: se7enFold]
Gastroopa Offline
n00b

Registered: 01/06/08
Posts: 22
Loc: Wisconsin
Awesome, thank you.

Top
#655 - 01/16/08 08:35 PM Re: Triggers (like !rules) [Re: Gastroopa]
Gastroopa Offline
n00b

Registered: 01/06/08
Posts: 22
Loc: Wisconsin
How would i make a trigger that will include a question no matter how it is wrote? Like, "How do I change my name?" Or "Can i change my name?" or if they subbed the word Nick for Name is there a way to make one trigger that will pickup any of those key words?

Top
#656 - 01/16/08 09:49 PM Re: Triggers (like !rules) [Re: Gastroopa]
usrbingeek Administrator Offline
WyldRyde Staff

Registered: 07/31/06
Posts: 513
Loc: Burlington, VT
You'll have to make a trigger for each variation. There is no way for it to understand that it means the same thing.
_________________________
WyldRyde IRC Network
Steve Mermelstein
Root Admin

#!/usr/bin/geek
My Amazon.com Wishlist

Please no PMs. Please post to a topic instead so your question(s) may benefit others.

Top
#657 - 01/16/08 11:04 PM Re: Triggers (like !rules) [Re: usrbingeek]
Gastroopa Offline
n00b

Registered: 01/06/08
Posts: 22
Loc: Wisconsin
Ok, no wildcards then. NP. Easy enough, thanks as always. :-)

Top
#709 - 01/30/08 11:54 AM Re: Triggers (like !rules) [Re: Gastroopa]
DnTVideos Offline
newbie

Registered: 01/29/08
Posts: 29
Loc: Michigain
What about having triggers that only ops and hops can use?
I have one that only ops can use but i want HOP and OP's to be able to use the trigger. I have
if (($nick ishop $chan) || ($nick isop $chan))) && ($address($nick,2) != WyldRyde.org)) {
but that doesnt work, only hops can do the trigger, is there a way to have hops AND ops do a trigger?


Top
#748 - 02/09/08 11:30 PM Re: Triggers (like !rules) [Re: Gastroopa]
Sam Ferry Offline
newbie

Registered: 02/08/08
Posts: 45
Loc: Illinois, USA
These Also Work In IceChat7 Scripting, With A Little Modification. Such As:

on *:TEXT:!trigger:#Channel:{
/say Your Text Goes Here
}

The "What Is" triggers are a bit iffy though (In IceChat 7)

-Sam (TheCellist42)


Edited by Sam (02/09/08 11:51 PM)
_________________________
Sam Ferry (Sam, SamF, samferry)
http://www.samferry.com

Top
Page 1 of 2 1 2 >


Recent Posts
RSS Feed for Topics
by usrbingeek
01/08/09 11:57 PM
Lost Voice
by ruben32
01/08/09 10:52 AM
Newstracker
by DragonHeart
01/07/09 10:08 AM
Rules for Voiced (+v) users in #Chris
by Christian
01/06/09 09:10 PM
CHannel Support? @ #Chris
by Mataniah
01/06/09 02:38 PM
Accept - Reject Pm script. Final Version.
by Phil
01/06/09 02:04 PM
Script to join channels with 30+ users.
by usrbingeek
01/05/09 02:32 PM
Ustream IRC Auto Identtifyer
by Dark_Aaron
01/05/09 10:42 AM
IRC Bot Platforms
by Sam Ferry
01/05/09 02:58 AM
Get a free forum for your channel!
by Sam Ferry
01/05/09 02:48 AM
Ban Appeal Process
by Sam Ferry
01/05/09 02:36 AM
Flood Protection
by Dark_Aaron
01/03/09 08:14 PM
Recent Pics
Xchat
mIRC on Linux
mIRC on Linux???
Who's Online
1 registered (1 invisible), 12 Guests and 9 Spiders online.
Key: Admin, Global Mod, Mod
Top Posters
usrbingeek 513
Kat 281
Phil 116
iPhone 109
Freekie 88
Justin 81
CCMike 78
techman224 75
tengrrl 58
wirelesspacket 53
Terms Of Use
Use of this community signifies your agreement to the Terms Of Service and Conditions of Use.