mIRC Home    About    Download    Register    News    Help

Print Thread
#241610 05/05/13 09:50 PM
Joined: May 2013
Posts: 8
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: May 2013
Posts: 8
hi i want to check if nick is equal to 1

my var
Code:
%Jorger22 1


My script
Code:
on *:TEXT:*:?:{
  var %nicknom = $nick
  if (%nicknom == 1) {
    .msg $nick yes 1
  }
}

but this does not check if nick is one, thank you very much for your prompt help

Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Code:
on *:TEXT:*:?:{
  if ($eval($+(%,$nick),2) == 1) {
   .msg $nick yes
  }
}

Deega #241612 06/05/13 12:52 AM
Joined: May 2013
Posts: 8
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: May 2013
Posts: 8
thank you very much helped me, I would like to know how to check this variable:

my vars:
Code:
Jorge22tiempo 1

script
added to the code $+ tiempo

Code:
  if ($eval($+(%,$nick),2)$+ tiempo == 1) {


ud apology as I would do it, thank you very much again

Last edited by Eliasayala1; 06/05/13 12:53 AM.
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Code:
if ($eval($+(%,$nick,tiempo),2) == 1) {

Deega #241615 06/05/13 02:00 AM
Joined: May 2013
Posts: 8
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: May 2013
Posts: 8
Thank you very much again for helping Deega.
I have this script and do not know how could I do to only show the result "ada"

in txt
Code:
ada
adam
adams


in script
Code:
on *:TEXT:*:?:{
  var %s = 1, %f = names.txt
  while (%s <= $lines(%f)) {
    if ($read(%f,n,%s) isin $1-) {
      /set %dijonom 1
      /set %namedi $read(names.txt,%s) 
      .msg $nick hi %namedi
    }
    inc %s
  }
}

result:
Code:
<Guest_Ada> Hi my name is Ada
<botGreet> Hi Ada
<botGreet> Hi Adam
<botGreet> Hi Adams


Thank you very much again, and sorry for my English Greetings

Last edited by Eliasayala1; 06/05/13 02:01 AM.
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Originally Posted By: Eliasayala1
I have this script and do not know how could I do to only show the result "ada"
The script you have above uses a while loop that will scan all the relevant, related names when they're said and found. Therefore you get a bunch of names outputted from your text file.

What you're after doesn't really require a loop. The code below will suffice just fine:
Code:
on *:text:*:?:{
if ($read(names.txt,nw,$nick)) {
.msg $nick hi $v1
}
}
But here's the catch though, the matching name will result in the bot greeting him or her every time they say something in your query. I doubt this is what you've wanted. You should match specific common greeting pattern and have the bot act on it.

Tomao #241618 06/05/13 06:41 AM
Joined: May 2013
Posts: 8
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: May 2013
Posts: 8
Hello thank you very much for the answer, I are a great help. But I have a problem with the colors,

If I write in colors the script does not work. how could fix before I leave the text without colors and without characters (1,2,3,4,5,6,7,8,9,0,?,!,?) thank you very much again


Link Copied to Clipboard