mIRC Home    About    Download    Register    News    Help

Print Thread
#115349 25/03/05 11:25 AM
Joined: Dec 2002
Posts: 27
J
Jon Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2002
Posts: 27
Please give me some idea, how to work on this script .

on *:text:*whowas*:?: {
if ($nick == TOM) { /whowas $2 }
raw 302:*: { /msg $nick $1- }
}

just because TOM he don't have power to do one /whowas command, that why i want to make this script, if nick == TOM, thi` my BOT going to do /whowas
after that, will send what ever the whowas is back to TOM .

On my chatserver, when i do the /whowas, it will come out like this .

" Jimmy was superman@modemcable051.39-131-66.mc.videotron.ca * IRC MIRC
Jimmy using chatserver3 Fri Mar 25 02:59:59 2005
End of WHOWAS "

how can i send that all 3 line back to TOM
i try to make raw, but it alway error

thanks alot
jon

#115350 25/03/05 12:23 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
on *:text:whowas password &:?: {
  if ($nick == TOM) { 
    .enable #toms.whowas.events
    whowas $3
  }
}
#toms.whowas.events off
raw 300:*: { haltdef | msg TOM $1- }
raw 301:*: { haltdef | msg TOM $1- }
raw 302:*: { haltdef | msg TOM $1- | .disable #toms.whowas.events }
#toms.whowas.events end


* this code maynot be correct YET
(1) replace password with a real password
(2) I have shown you multiple raw events, I dont know which ones are relevent to /whowas so...
..(2a) set 300-302 to the relevent ones add more if need be
..(2b) the extra code on 302, should be moved to the "end of /whowas" raw (i dont know if this is 302 or another number)

I added a password tom must enter so he must send "whowas password nick" , if u dont want this remove the "password " on line 1and change the $3 on line 4 to $2

#115351 25/03/05 10:28 PM
Joined: Dec 2002
Posts: 27
J
Jon Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2002
Posts: 27
thanks alot DaveC

But it still not work, it come out 302:*: Unknown command

jon

#115352 25/03/05 11:35 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Did you put that lot in the remotes section?

Does it still look just like mine?

Are you missing a close } on the line above the "raw 302:*:" line ?

#115353 26/03/05 08:31 AM
Joined: Dec 2002
Posts: 27
J
Jon Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2002
Posts: 27
yes i do miss the }

but after i try to do exactly what you did .
Now the script do nothing .

what can i do now ?

thanks DaveC

#115354 26/03/05 08:49 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
add

raw *:*:{ echo -st ALL RAWS CATCH : CATCHING $numeric : $1- }

then do a /whowas and find out what raws it uses.

#115355 26/03/05 01:22 PM
Joined: Dec 2002
Posts: 27
J
Jon Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2002
Posts: 27
after I added the line " raw *:*:{ echo -st ALL RAWS CATCH : CATCHING $numeric : $1- } "

then it come out like this in my status
Code:
Lemon was chatspace@210.245.122.70 * Java 
ALL RAWS CATCH : CATCHING 314 : LoveBot Lemon chatspace@210.245.122.70 * Java 


is that any way i can msg back to the $nick with that line ?

Thanks DaveC

Last edited by Jon; 26/03/05 01:25 PM.
#115356 26/03/05 04:00 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
edit the code that has the raw commands, and make the last one use the RAW 314, which is what was captured when the /whowas command was used.

#115357 27/03/05 02:46 AM
Joined: Dec 2002
Posts: 27
J
Jon Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2002
Posts: 27
thanks alot DaveC and RusselB
finally i come out like this, it work fine
Code:
on *:text:whowas*:?: {  
  if ($nick == test) {  whowas $2 }
}
raw 314:*: { /msg test $1- } 


But the thing is, it work only with exact the nick i'm input, because on the line raw 314:*: { /msg test $1- }
it wont accept $nick
What do i do, if i want to give that out for more then one nick have power to do that ??

for sample
Code:
on *:text:whowas*:?: {  
  if ($nick == test) {  whowas $2 }
  if ($nick == jimmy) {  whowas $2 }
  if ($nick == tommy) {  whowas $2 }
}
raw 314:*: { /msg $nick $1- } 

that what i mean, but it wont work

#115358 27/03/05 04:35 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
on *:text:whowas*:?: { if ($nick == test) || ($nick == jimmy) || ($nick == tommy) {  set -u5 %whowas.msg.nick $nick | whowas $2 } }
raw 314:*: { if (%whowas.msg.nick) { msg %whowas.msg.nick $1- | unset %whowas.msg.nick } }


This creates a var for 5 seconds containing the name of the nick who wants the whowas, if there isnt one then you dont msg anyone, its failable, in that if two of your friends are doing them at the same time one might get both replies, but that is not going to happen very often if ever.

PS:
* || means OR
* / is not needed on commands in scripts /msg becomes msg

#115359 27/03/05 05:02 AM
Joined: Dec 2002
Posts: 27
J
Jon Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Dec 2002
Posts: 27
yahhhhhooo it work good now ..... thanks thanks alot for your help DaveC

jon


Link Copied to Clipboard