mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2015
Posts: 3
I
ibasta Offline OP
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Mar 2015
Posts: 3
hello! im trying to make simple command script in mirc, but i need something to pause it to pass spam protection if some users will ask this command at one time.

i got this for start:
Code:
on *:text:*!db*:#: {
  if (%dblink == 1) {
    <!here i need sleep timer>
  msg # dblink: http://database.com/database/ $+ $2- . ID $rand(0,100000) $+ . | halt }
}
}
how could i make sleep timer (10 sec delay) between command reply? i tried to use this found here
Code:
sleep {
  var %a $+(sleep.,$ticks,.wsf)
  write %a <job id="js"><script language="jscript">WScript.Sleep( $+ $$1 $+ );</script></job>
  .comopen %a WScript.Shell
  if !$comerr { .comclose %a $com(%a,Run,3,bstr,%a,uint,0,bool,true) }
  .remove %a
}
but it pause ALL mirc client ))
thank you for help

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Use /play or /timer.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Mar 2015
Posts: 3
I
ibasta Offline OP
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Mar 2015
Posts: 3
Originally Posted By: Raccoon
Use /play or /timer.
if i put
Code:
play txt\db.txt 1000
instead of
Code:
msg # dblink: http://database.com/database/ $+ $2- . ID $rand(0,100000) $+ . | halt }
and put this text in db.txt file - script
Code:
$+ $2- . ID $rand(0,100000) $+ .
will go as simple text on answer.
If i try to put .timer 10 in front of msg command - i got "* /timer: timer 1 not active" in status window.

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
You've got all your syntax wrong. I believe you can address these issues by simply reviewing the /help file for each of those commands. eg: /help /play and /help /timer

And get rid of that | halt } at the end. I'm not sure why you put that there, unless you just copy/pasted from something else you saw someone else use.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Mar 2015
Posts: 3
I
ibasta Offline OP
Self-satisified door
OP Offline
Self-satisified door
I
Joined: Mar 2015
Posts: 3
Originally Posted By: Raccoon
I believe you can address these issues by simply reviewing the /help file for each of those commands. eg: /help /play and /help /timer
Unfortunately i cant do this.
Originally Posted By: Raccoon
And get rid of that | halt } at the end.
Yep, already throw it out)


Link Copied to Clipboard