Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- THIS SCRIPT HAS BEEN MADE BY [MM]IKKE
- DO NOT DELETE ANY OF THESE CREDITS
- SCRIPT WILL STILL ECHO ALL THE STUFF! HAVING A MESSAGE IN THE SPECIFIED COMMAND CAN CAUSE A MASSIVE FLOOD
- */
- /performance {
- ;Syntax: /performance <amount of seconds> <command> <parameters>
- if ($1 isnum) {
- if ($2) {
- ;twice an error check: syntax must be right
- set %start.tmp $ticks
- ;sets the starting time in ticks
- var %i = 1
- while (%i <= $1) {
- $2-
- inc %i
- }
- ;loops the command a specific amount of times
- set %stop.tmp $ticks
- ;sets the stop time in ticks
- echo 2 -at Passed time to run " $+ $2- $+ " $1 times: $calc(%stop.tmp - %start.tmp)
- ;echoes the amount of time passed in ticks.
- unset %start.tmp
- unset %stop.tmp
- ;clears the variables used. I know I could use "var %start = $ticks", but I dislike the usage of that. it's easier to debug when using globals in mIRC, except for loops
- }
- else {
- echo 4 -at ERROR: 1Specify a command
- }
- }
- else {
- echo 4 -at ERROR: 1Specify an amount of loops
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment