mIRC Home    About    Download    Register    News    Help

Print Thread
#41121 11/08/03 01:40 PM
Joined: Aug 2003
Posts: 73
D
Babel fish
OP Offline
Babel fish
D
Joined: Aug 2003
Posts: 73
Can any 1 tell me how i do a command were if sum 1 says there name my bot can reply saying sum thing and a command were i can turn it off and on confused


IRC (Idiots Relay Chat) :tongue:

{]TDN[}Deadly-Sin
#41122 11/08/03 03:06 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
This will reply if a user say "its_own_nick hi" it will also turn the script off if you add your
self to the %master with "/set %master your_nick" typed in the bot status window
then you can enable the script by type "your_nick enable" and disable it by type "your_nick disable"

if you remove "($1 == $nick) &&" the bot will reply to anyone saying "hi" in the channel.
if you change $1 to $me "($me == $nick) &&" the bot will reply to people saying the bots nick in
the channel.

;------ start here

on 1:TEXT:*:#: {
if ($1 == $nick) && ($2 == hi) && (%enable == 1) { msg $chan hi $nick $+ . how are you today? }
if ($nick == %master) && ($2 == enable) { set %enable 1 | msg $chan Script Enabled | halt }
if ($2 == disable) { set %enable 2 | msg $chan Script Disabled }
}

;----- end here

the script should be in your remote.. press ALT + R in mirc.. then paste everything between

;------- start here


;------- stop here

in to the file you see.. i dont know if this was what you looking for, but for more help i would
recomend you to go to Quakenet and #help.script, then ask your question there smile

and yes i know, its a messy code but im to tired to do somthing bether wink wink wink


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#41123 11/08/03 08:19 PM
Joined: Aug 2003
Posts: 73
D
Babel fish
OP Offline
Babel fish
D
Joined: Aug 2003
Posts: 73
hey m8 thx for replying but it is not working mad


IRC (Idiots Relay Chat) :tongue:

{]TDN[}Deadly-Sin
#41124 11/08/03 08:23 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
what dosent work then? cool


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#41125 11/08/03 08:49 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
Put This in remote:

menu menubar,channel,stats {
.Enable Auto Reply: .enable #reply
.Disable Auto Reply: .disable #reply
}
on *:TEXT:*:#:{
if ($me == $1) && ($2 == hello) || ($2 == $me) && ($1 == hello) {
msg # hi $nick $+ !
}
}


new username: tidy_trax
#41126 11/08/03 08:52 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
on 1:TEXT:*:#: {
if ($1 == $nick) && ($2 == hi) && (%enable == 1) { msg $chan hi $nick $+ . how are you today? }
if ($nick == %master) && ($2 == enable) { set %enable 1 | msg $chan Script Enabled | halt }
if ($2 == disable) { set %enable 2 | msg $chan Script Disabled }
}


this is my code.. and it should all be in remote.. and you type in the status of that mirc you running that in: /set %master "Your nick here" <press enter>

then when you talk to your bot in the channel.. just say
"your-nick enable"

and it work just fine, tested it in a mir just a fev minutes ago smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#41127 11/08/03 09:17 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I don't see why you would want a script that replys to someone else's nickname but here you go.
Code:
on 1:TEXT:*:#: {
  if ($nick isin $1-) { commands here. }
}

on 1:TEXT:!bot*:#: {
  if ($2 == $null) { notice $nick Valid syntax: !bot [on|off] }
  if ($2 == on) { msg $chan The bot has been activated | .enable #bot }
  if ($2 == off) { msg $chan The bot has now been de-activated | .disable #bot }
}

#bot on
Your commands and events here.
#bot end


For security purposes it is advised that you use "Access Levels" /help Access levels.
If you don't know how to do this simply.
/guser 100 NickName 3

So instead of on 1:TEXT:!bot*:#:
it would be on 100:TEXT:!bot*:#:


Link Copied to Clipboard