mIRC Home    About    Download    Register    News    Help

Print Thread
#65479 26/12/03 11:12 PM
Joined: Jan 2003
Posts: 28
E
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jan 2003
Posts: 28
is there a way to let a script responde to a raw 421
and set a variable 1 or 0
this is what i have
Code:
 
on *:text:!raw*:?:{
  .raw $2-
  if (%rawsucces == 1) {
    .msg $nick raw command was succesfull
  }
  else {
    .msg $nick raw command was unsuccesfull
  }  
}
 

how can i make it look up raw 421 and set %rawsucces 1
so it can respond

#65480 27/12/03 02:01 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
on *:TEXT:!raw *:?: {
  .raw $1-
  .timerraw 1 5 /msg $nick Raw command was unsuccessful
}

raw 421:*: {
  if ($timer(raw)) {
    /msg $gettok($timer(raw).com, 2, 32) Raw command was successful
    .timerraw off
  }
}

Think that's what you want. This will give the command 5 seconds to evaluate. If it doesn't, it'll send a message of a failure.


-KingTomato
#65481 27/12/03 11:08 AM
Joined: Jan 2003
Posts: 28
E
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jan 2003
Posts: 28
yep ur code works exept for the few bugs that it has
Code:
on *:TEXT:!raw *:?: {
  .raw $[color:red]2[/color]-
  .timerraw 1 5 /msg $nick Raw command was [color:red]**[/color]successful
}
raw 421:*: {
  if ($timer(raw)) {
    /msg $gettok($timer(raw).com, 2, 32) Raw command was [color:red]un[/color]successful
    .timerraw off
  }
}

I marked them red

#65482 27/12/03 05:37 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
That's what I get for being an insomniac >:\


-KingTomato

Link Copied to Clipboard