Data Realms Fan Forums http://45.55.195.193/ |
|
mIRC Scripting http://45.55.195.193/viewtopic.php?f=7&t=8110 |
Page 1 of 3 |
Author: | Grif [ Wed Oct 03, 2007 2:48 am ] |
Post subject: | mIRC Scripting |
Does anyone here besides Daman and myself do it? My Remote.ini file currently contains the following: Code: on *:TEXT:!set *:#drlchat: { if ( $$2 == n ) { /set %n $3 } if ( $$2 == x ) { /set %x $3 } if ( $$2 == y ) { /set %y $3 } if ( $$2 == z ) { /set %z $3 } if ( $$2 == m ) { /set %m $3 } if ( $$2 == m2 ) { /set %m2 $3 } else { /set $$2 $3- } } on *:TEXT:!variables:#drlchat: { /msg $chan n: %n - x: %x - y: %y - z: %z - m: %m - m2: %m2 } on *:TEXT:!clearvar*:#drlchat: { if ( $2 == n ) { /set %n 0 } if ( $2 == x ) { /set %x 0 } if ( $2 == y ) { /set %y 0 } if ( $2 == z ) { /set %z 0 } if ( $2 == m ) { /set %m 0 } if ( $2 == m2 ) { /set %m2 0 } else { /set %n 0 | /set %x 0 | /set %y 0 | /set %z 0 | /set %m 0 | /set %m2 0 } } on *:TEXT:!calc *:#drlchat: { /msg $chan $calc($2-) } on *:TEXT:!help:#drlchat: { /msg $chan !calc <number> <operation> <number> - Calculates values. Use "%<variable>" for a variable. /msg $chan !set <variable> <value> - Sets n, x, y, z, m, and m2. /msg $chan !variables - Displays variable values. /msg $chan !clearvar <variable> - Clears specified variable, or all if unspecified. } on *:TEXT:!roll *:#drlchat: { set %target $3 set %count 0 :next if ( %count < %target ) && ( %target <= 5 ) { if ( $2 >= 256 ) { /msg $chan You rolled: $rand(1,256) | inc %count | goto next } else { /msg $chan You rolled: $rand(1,$2) | inc %count | goto next } } else { /set %target 0 | goto done } :done } I'm available to explain the basics to people, generally. Daman knows far more than I do, but, leave your pride at the door when asking him to teach for you. |
Author: | whitty [ Wed Oct 03, 2007 2:59 am ] |
Post subject: | Re: mIRC Scripting |
wtf does all that mean????? |
Author: | Pyrorex [ Wed Oct 03, 2007 11:45 am ] |
Post subject: | Re: mIRC Scripting |
It's a couple of scripts. There's his calc script, and his cideroll script. Also, Girf forgot to include me. |
Author: | Grif [ Fri Oct 05, 2007 4:39 am ] |
Post subject: | Re: mIRC Scripting |
Pyrorex wrote: It's a couple of scripts. There's his calc script, and his cideroll script. Also, Girf forgot to include me. Well yes except for the minor problem that you fail horribly. Anyways, Whitty, the calc script is fairly simple. Code: on *:TEXT:!set *:#drlchat: { if ( $$2 == n ) { /set %n $3 } if ( $$2 == x ) { /set %x $3 } if ( $$2 == y ) { /set %y $3 } if ( $$2 == z ) { /set %z $3 } if ( $$2 == m ) { /set %m $3 } if ( $$2 == m2 ) { /set %m2 $3 } else { /set $$2 $3- } } Basically, this is a variable set, for the calc script. if ( $$2 == <variable> ) { /set %<variable> $3 } Just means that if the second word after !set is n, x, y, z, m, or m2, it will set that variable as the third word after !set. The else means that if $2, or the second word after !set, is not specified, it sets whatever is in there as everything from the third word onward ( $3- ). Code: on *:TEXT:!variables:#drlchat: { /msg $chan n: %n - x: %x - y: %y - z: %z - m: %m - m2: %m2 } If someone types !variables in #drlchat, it will display: n: <valueofn> - x: <valueofx> etc Code: on *:TEXT:!clearvar*:#drlchat: { if ( $2 == n ) { /set %n 0 } if ( $2 == x ) { /set %x 0 } if ( $2 == y ) { /set %y 0 } if ( $2 == z ) { /set %z 0 } if ( $2 == m ) { /set %m 0 } if ( $2 == m2 ) { /set %m2 0 } else { /set %n 0 | /set %x 0 | /set %y 0 | /set %z 0 | /set %m 0 | /set %m2 0 } } If someone types !clearvar, it checks if you asked it to clear a specific variable, or else clears all of them at once. Code: on *:TEXT:!calc *:#drlchat: { /msg $chan $calc($2-) } If someone types !calc, it'll "calc"ulate everything from the second word onward. !help is fairly self explanatory. When someone types !help, it /msgs the channel the help text. Code: on *:TEXT:!roll *:#drlchat: { set %target $2 set %count 0 :next if ( %count < %target ) && ( %target <= 10 ) { if ( $3 >= 256 ) { /msg $chan You rolled: $rand(1,256) | inc %count | goto next } else { /msg $chan You rolled: $rand(1,$3) | inc %count | goto next } } else { /set %target 0 | goto done } :done } This is a fun one. When someone types !roll, it does several things. First, it sets the %target, or number of times to roll, to whatever the second word after !roll was. It also makes sure that the %count variable is 0. Then, :next, which is a part of the goto loop, is defined. First, it checks whether %count is less than or equal to %target. So, if it's rolled less dice than it's been asked to, it will increment the %count variable, /msg the channel a random number from 1 to whatever the third word after !roll was, and then repeat the check, using the goto next. If %count is NOT less than or equal to target, it will go to the else statement, which resets %target and cancels the goto loop process. Now, there's some anti-spam features in there too, but they're fairly self explanatory. |
Author: | whitty [ Fri Oct 05, 2007 5:06 am ] |
Post subject: | Re: mIRC Scripting |
i appreciate you calmly informing me but i dont get it. well, i do, but only a bit . i dont use mirc much anyway. |
Author: | Grif [ Fri Oct 05, 2007 5:08 am ] |
Post subject: | Re: mIRC Scripting |
You're quite welcome, and, yeah, if you wanna start doing mIRC scripting, this is not where to do it. |
Author: | Pyrorex [ Fri Oct 05, 2007 7:11 pm ] |
Post subject: | Re: mIRC Scripting |
Yes yes we know you're an elitist bastard Grif. |
Author: | Daman [ Thu Oct 18, 2007 12:13 am ] |
Post subject: | Re: mIRC Scripting |
Oh hi I do mirc scripting too. Code: on *:TEXT:*:#datarealm:{ if ( !%spamanti [ $+ [ $nick ] ] ) { set %spamanti [ $+ [ $nick ] ] 0 inc %spamanti [ $+ [ $nick ] ] } if ( %spamanti [ $+ [ $nick ] ] >= 3 ) { kick $chan $nick over 3 lines per two seconds unset %spamanti [ $+ [ $nick ] ] unset %spamvar1 [ $+ [ $nick ] ] } else if ( %spamanti [ $+ [ $nick ] ] ) { inc %spamanti [ $+ [ $nick ] ] 1 } if ( %spamvar1 [ $+ [ $nick ] ] == $null ) { dec -u2 %spamanti [ $+ [ $nick ] ] 0 } } I masturbate to my own bots: Code: on *:TEXT:? *:#drlchatf:{ /msg #drlchat $read(helpscript.txt, s, $2 ) } on *:TEXT:!remove *:#drlchat:{ if ($nick ishop #drlchat ) { /write -ds $+ $2 helpscript.txt /msg #drlchat 9 $+ $2 successfully removed. } else { /msg #drlchat 4 $+ $nick is not an Op. } } on *:TEXT:!learn *:#drlchat:{ if ($nick ishop #drlchat) { /write -ds $+ $2 helpscript.txt /write helpscript.txt $2 $+ $2 $+ : $+ $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 /msg #drlchat 9 $+ $2 successfully added. } else { /msg #drlchat 4 $+ $nick is not an Op. } } |
Author: | BlueThen [ Tue Oct 30, 2007 10:19 pm ] |
Post subject: | Re: mIRC Scripting |
:/ I posted here 3 days ago... but it was deleted. xD Here's a script creator I made awhile back ... |
Author: | Daman [ Thu Nov 08, 2007 11:51 pm ] |
Post subject: | Re: mIRC Scripting |
BlueThen wrote: :/ I posted here 3 days ago... but it was deleted. xD Here's a script creator I made awhile back ... What? A script creator? What's that supposed to mean? Re-attach it, it sounds interesting. |
Author: | BlueThen [ Fri Nov 09, 2007 3:25 am ] |
Post subject: | Re: mIRC Scripting |
Sure. Believe it or not, this is my very first dialog. |
Author: | Falcon X [ Fri Nov 09, 2007 3:46 am ] |
Post subject: | Re: mIRC Scripting |
How does it work? As in, how do I start it up. |
Author: | BlueThen [ Fri Nov 09, 2007 5:10 am ] |
Post subject: | Re: mIRC Scripting |
Put it in your mirc folder, type '/load -rs ScriptCreator.mrc', then right click and click 'mIRC Editor' or type '/script'. |
Author: | Grif [ Fri Nov 09, 2007 6:21 am ] |
Post subject: | Re: mIRC Scripting |
Ah, but, Bluethen, that doesn't support anything complex at all. For instance; I made an entire text based combat system, including leveling, and Daman has made an entire movement system for map based combat. Also, this should be moved to IRC Talk subforum. |
Author: | Daman [ Fri Nov 09, 2007 6:40 am ] |
Post subject: | Re: mIRC Scripting |
Wow, your program effectively overcomplicated everything. I'm just like WHAT'S HAPPENING ARRGH. Good job on coding it though, even though it's not very effective. |
Page 1 of 3 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |