mIRC Home    About    Download    Register    News    Help

Print Thread
#169810 28/01/07 05:30 PM
Joined: Jan 2007
Posts: 4
F
Fabrice Offline OP
Self-satisified door
OP Offline
Self-satisified door
F
Joined: Jan 2007
Posts: 4
Hi, I'm pretty new to mIRC coding, and I'd like to do two things in my channel.

1.) I would like to auto voice everyone that joins my channel.

2.) I was also thinking about having commands in my channel. If someone were to go !website in my channel, I would automatically say http://google.com. I've seen this sort of thing in other channels, just wondering if you guys could help me out.

Thanks in advance.

Fabrice #169813 28/01/07 06:04 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
on !@*:join:#:/mode $chan +v $nick

on *:text:*!google:#:/msg $chan http://www.google.com

DJ_Sol #169814 28/01/07 06:12 PM
Joined: Jan 2007
Posts: 4
F
Fabrice Offline OP
Self-satisified door
OP Offline
Self-satisified door
F
Joined: Jan 2007
Posts: 4
Almost perfect, but is there a way to change the colors for the !google thing? I tried, but then it doesn't work.

DJ_Sol #169816 28/01/07 07:29 PM
Joined: Dec 2006
Posts: 80
Babel fish
Offline
Babel fish
Joined: Dec 2006
Posts: 80
Code:

 on *:text:*!google:#:/msg $chan 12 http://www.google.com 

 


That color code (12) is Blue. Press Control + k to enter a color code before the text... and then close it after text (for good practice) with one as well.


Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)
Scripto #169826 28/01/07 09:47 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
This is probably one that you have seen, it works like "!google whatever you are going to google"

Code:
on *:TEXT:!google *:#:{ 
  msg $chan 12http://www.google.com/search?hl=en&q= $+ $replace($2-,$chr(32),$chr(43))
}


-Kurdish_Assass1n
Scripto #169828 28/01/07 11:56 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
That will display blue for people on mirc, but if by chance you want webchat to show blue, you will have to know your server's font code and send the message using the servers font code.

Fabrice #169892 30/01/07 01:49 PM
Joined: Oct 2006
Posts: 37
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2006
Posts: 37
just made the simplest clan bot out of
Quote:
on *:text:*!google:#:/msg $chan http://www.google.com

and ive never even thought of ever making a script in my life! it was easy just a few edits here and there! THNKS!!


while ($noob = $true) { .stfu }
Fabrice #169895 30/01/07 02:21 PM
Joined: Oct 2006
Posts: 37
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2006
Posts: 37
ok can anyone tell me how to make the code so i can type !set roster in the chan and it will auto set the command so i dont have to edit it in the script! this is wat it looks like now:
Code:
on *:text:*!roster:#:/msg $chan YOUR ROSTER GOES HERE

on *:text:*!league:#:/msg $chan YOUR LEAGUE GOES HERE


on *:text:*!news:#:/msg $chan YOUR NEWS GOES HERE


on *:text:*!website:#:/msg $chan YOUR WEBSITE GOES HERE


on *:text:*!sponsors:#:/msg $chan YOUR SPONSOR GOES HERE


on *:text:*!record:#:/msg $chan YOUR RECORD GOES HERE

on *:text:*!botinfo:#:/msg $chan CBot16 Created By Rich on GameSurge #Team.FH


on *:text:*!commands:#:/notice $nick !roster !leagues !news !website !sponsors !record !botinfo
}



I got this from someone
Code:
on *:text:!set roster *:#:{
if ($nick isop #) {
!set %roster $3-
!msg $chan done!
} 

but doesnt change the text in the script!

Last edited by RieDeLL; 30/01/07 06:16 PM.

while ($noob = $true) { .stfu }
RieDeLL #169909 30/01/07 06:44 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
changing the script without actually editing it by yourself would be kind of hard. You would have to use something like /write and /load -rs. %variables hold some data, it seems good for what you're doing. I honestly don't know exactly what you are trying to do, can you try and be more specific please?


-Kurdish_Assass1n
Joined: Oct 2006
Posts: 37
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2006
Posts: 37
im trying to make a clan bot that displays info about gaming clans! and when u type !roster it displays the team roster ex:oWn, Kid, Ipwn, Riedell but say one member drops from the team then the bot owner types !set roster oWn, Kid, Ipwn, and it changes the roser to that!

Last edited by RieDeLL; 30/01/07 06:48 PM.

while ($noob = $true) { .stfu }
RieDeLL #169911 30/01/07 07:16 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on *:text:!set roster *:#: {
  if ($nick isop $chan) {
    set %roster $3-
  }
}

on *:text:!roster:#: {
  msg $chan Roster: %roster
}


Rather than checking if the nick is an op for setting the roster, you could use:

if ($nick == somenick) { }

Or, you can put the nick in your User List with a level such as 500 and then change the first line to:

on 500:text:!set roster *:#: {


Invision Support
#Invision on irc.irchighway.net
Riamus2 #169913 30/01/07 07:53 PM
Joined: Oct 2006
Posts: 37
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2006
Posts: 37
yea i got that in another site but i can only add one cuz when i add multiples and it wont work! how would i add multiple ones like:
Code:
on *:text:!set roster *:#:{
  if ($nick isop #) {
    !set %roster $3-
    !msg $chan done!
  }
}



on *:text:!set league *:#:{
  if ($nick isop #) {
    !set %league $3-
    !msg $chan done!
  }
}



on *:text:!set news *:#:{
  if ($nick isop #) {
    !set %news $3-
    !msg $chan done!
  }
}



on *:text:!set website *:#:{
  if ($nick isop #) {
    !set %website $3-
    !msg $chan done!
  }
}


while ($noob = $true) { .stfu }
RieDeLL #169915 30/01/07 08:29 PM
Joined: Oct 2006
Posts: 37
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2006
Posts: 37
Got it ty


while ($noob = $true) { .stfu }
RieDeLL #169919 30/01/07 10:50 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Besides needing to remove the ! before msg, you can combine your triggers into a single event.

Code:
on *:text:!set *:#:{
  if ($nick isop $chan) {
    if (!$3) { .notice $nick Incorrect format.  Use !set followed by roster, league, news, or website and then the data you want stored.  Example: !set website http://www.google.com/ | return }
    if ($2 == roster) {
      set %roster $3-
    }
    elseif ($2 == league) {
      set %league $3-
    }
    elseif ($2 == news) {
      set %news $3-
    }
    elseif ($2 == website) {
      set %website $3-
    }
    else { .notice $nick Incorrect format.  Use !set followed by roster, league, news, or website and then the data you want stored.  Example: !set website http://www.google.com/ | return }
    msg $chan done!
  }
  else { .notice $nick You are not an op and cannot use that command. }
}


Now, that's combining all of the commands that only ops can do that start with !set. You could then combine other commands that are open to everyone in a similar way.


EDIT: The above code works fine and is easy to understand (I think). Below, you can see another method that might be more difficult to understand, but is a bit smaller. You may find it interesting to look at.

Code:
on *:text:!set *:#:{
  if ($nick isop $chan) {
    if (!$3) { .notice $nick Incorrect format.  Use !set followed by roster, league, news, or website and then the data you want stored.  Example: !set website http://www.google.com/ | return }
    if ($istok(roster league news website,$2,32)) {
      set % $+ $2 $3-
    }
    else { .notice $nick Incorrect format.  Use !set followed by roster, league, news, or website and then the data you want stored.  Example: !set website http://www.google.com/ | return }
    msg $chan done!
  }
  else { .notice $nick You are not an op and cannot use that command. }
}


Last edited by Riamus2; 30/01/07 10:54 PM.

Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard