mIRC Homepage
Posted By: xyzzy auto reply(talk) - 06/06/08 06:51 PM
hey can sm1 help me abt
that if some say in room or channel i want reply them auto
ex sm1 said hello first time ill reply as heya howsu sm1
n other1 said hello again this time my reply as welcome other1 hows going cani do smthng like that ? sorry for ma bad english :S thnxx a lot smile
Posted By: AWEstun Re: auto reply(talk) - 06/06/08 07:26 PM
Code:
on *:TEXT:*:#: {
  if (hello isin $1-) {
    set %rndnmbr $rand(0.4)
    if (%rndnmbr == 0) { set %rslt Greetings }
    elseif (%rndnmbr == 1) { set %rslt Hey }
    elseif (%rndnmbr == 2) { set %rslt Hi }
    elseif (%rndnmbr == 3) { set %rslt What's up }
    elseif (%rndnmbr == 4) { set %rslt Sup }
    msg $chan %rslt $nick
  }
}



This is untested, but I'm sure someone else will have a better code, or at least tweak this code for you.
Posted By: xyzzy Re: auto reply(talk) - 06/06/08 07:35 PM
not works :S thnx for try helping
Posted By: AWEstun Re: auto reply(talk) - 06/06/08 07:44 PM
Originally Posted By: xyzzy
not works :S thnx for try helping


Try it again, I corrected and updated it.
Posted By: xyzzy Re: auto reply(talk) - 06/06/08 07:55 PM
still same not reply confused
Posted By: AWEstun Re: auto reply(talk) - 06/06/08 08:04 PM
Originally Posted By: xyzzy
still same not reply confused


Are you trying to test it yourself? Someone else has to say hello, etc on the room. ???

Also, you're putting the code in the remote.ini file, right?
Posted By: xyzzy Re: auto reply(talk) - 06/06/08 08:06 PM
of course a friend says hello but not reply
its reply as %2 nick smirk
Posted By: hixxy Re: auto reply(talk) - 06/06/08 08:11 PM
Code:
on *:TEXT:*hello*:#:{
  var %words = Greetings,Hey,Hi,What's up,Sup
  msg $chan $gettok(%words,$r(1,$numtok(%words,44)),44)
}
Posted By: xyzzy Re: auto reply(talk) - 06/06/08 08:18 PM
thnxx hixxy n AWEstun its work great smile
Posted By: AWEstun Re: auto reply(talk) - 06/06/08 08:27 PM
See, I knew there was a better way to do it, but I just didn't know how.
Posted By: sehardepp Re: auto reply(talk) - 07/06/08 01:24 AM
Ahan nice topic ,well ummm do i have to copy this code to alias???or where wuld u guys plz help me:S
Posted By: RusselB Re: auto reply(talk) - 07/06/08 04:18 AM
The code would go in the remotes section of the client that you want to run the code.
© mIRC Discussion Forums