mIRC Homepage
Posted By: Jon Need help ..... please - 25/03/05 11:25 AM
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
Posted By: DaveC Re: Need help ..... please - 25/03/05 12:23 PM
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
Posted By: Jon Re: Need help ..... please - 25/03/05 10:28 PM
thanks alot DaveC

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

jon
Posted By: DaveC Re: Need help ..... please - 25/03/05 11:35 PM
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 ?
Posted By: Jon Re: Need help ..... please - 26/03/05 08:31 AM
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
Posted By: DaveC Re: Need help ..... please - 26/03/05 08:49 AM
add

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

then do a /whowas and find out what raws it uses.
Posted By: Jon Re: Need help ..... please - 26/03/05 01:22 PM
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
Posted By: RusselB Re: Need help ..... please - 26/03/05 04:00 PM
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.
Posted By: Jon Re: Need help ..... please - 27/03/05 02:46 AM
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
Posted By: DaveC Re: Need help ..... please - 27/03/05 04:35 AM
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
Posted By: Jon Re: Need help ..... please - 27/03/05 05:02 AM
yahhhhhooo it work good now ..... thanks thanks alot for your help DaveC

jon
© mIRC Discussion Forums