mIRC Home    About    Download    Register    News    Help

Print Thread
#128706 28/08/05 07:35 PM
Joined: Aug 2005
Posts: 4
B
Bl1nk Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Aug 2005
Posts: 4
Hey...

I really need you guys help. I need a automessage script. ect. If i say: !rules. The rules will display for all users in the chat...

Do anybody know how to make a script like that? frown

Can i use a bot for it???

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You can use a bot, in fact I would recommend that you do.

This type of thing has been asked lots of times in the past
Here's an example of what the code could look like
Code:
 on *:join:#:{
.inc %visit
.inc $+(%,visit,.,$address)
describe # Welcomes $nick to $chan for the $ord($($+(%,visit,.,$addrss),2))
.msg $nick You are the $ord(%visit) visitor to $chan
}
on *:text:!help:*:{ .play $nick help.txt 1500 }
on *:text:!rules:*:{ .play $nick rules.txt 1500 }
 


For the above code to work, you would need two text files in your mIRC directory. One called help.txt (which would contain the help information) and one called rules.txt (which would contain the rules for the room)

As I said, the above is just an example of how it could be done. There are lots of other possibilities

Joined: Feb 2005
Posts: 74
S
Babel fish
Offline
Babel fish
S
Joined: Feb 2005
Posts: 74
This is tested and it works:
Code:
on *:text:!rules:*:{
  if ($nick != yournick) {
    msg $nick You don't have access 
  }
  else {
    set %i 1
    set %all $nick(#,0)
    while (%i <= %all) {
      /play $nick(#,%i) rules.txt
     inc %i
    }
  }
}
  


[color:red]m[color:blue]IRC[color:green] for EvEr

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
That might work on a channel with up to 4 users, but for a channel with 100 users or more, you're either flooded off immediately or your flood protection has a queue of 2 days...

For a bot:
on owner:!rules:#channelname:play $chan rules.txt

for you:
just type //say !rules | play # rules.txt
in the correct channel.


Ps: skyd: setting global vars isn't necessary in this case, there's even few cases when it's really needed...

Joined: Aug 2005
Posts: 4
B
Bl1nk Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Aug 2005
Posts: 4
Quote:
That might work on a channel with up to 4 users, but for a channel with 100 users or more, you're either flooded off immediately or your flood protection has a queue of 2 days...


The record at my channel is 16, and i got a flood projecter... But im home at my friend, and 'ill try both of the scripts, when i come home.. I'll be back smile

Thanks for the help.. smile

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just wondering... why do you want everyone to see the rules when someone types !rules? Why not just tell the rules to the person who types !rules? Everyone else probably has already seen them before.


Invision Support
#Invision on irc.irchighway.net
Joined: Aug 2005
Posts: 4
B
Bl1nk Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Aug 2005
Posts: 4
Thanks that worked smile

Joined: Aug 2005
Posts: 4
B
Bl1nk Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Aug 2005
Posts: 4
What about the bot?

Do any body got a script for that??


And if you are really good, you know one coded in php smile


Link Copied to Clipboard