|
|
| Author |
Message |
Invisible Lurker

Joined: 26 Jul 2005 Posts: 191
|
Posted: Jan 05, 2008 9:44pm Post subject: mirc help |
|
|
alias -l responserand {
var %temp1.rand $rand(1,2)
if (%temp1.rand == 1) { set %j2 YESSUMS }
if (%temp1.rand == 2) { set %j2 PLEEZ }
}
on 1:JOIN:#test:{
$responserand
msg $chan Hello $nick would you like voice? Respond with %j2 | set %j1 5 | dec -c %j1 1 | timer 1 15 unset %j1
}
on 1:TEXT:YESSUMS:#test:{
if ((%j1 == $null) || (%j2 != PLEEZ)) { halt }
elseif ((%j1 > 0) && (%j1 > -10)) { mode # +v $nick }
else { msg $chan You were too late. }
}
on 1:TEXT:PLEEZ:#test:{
if ((%j1 == $null) || (%j2 != YESSUMS)) { halt }
elseif ((%j1 > 0) && (%j1 > -10)) { mode # +v $nick }
else { msg $chan You were too late. }
}
Doesn't work, any help? |
|
| Back to top |
|
 |
PingBad Guru

Joined: 05 Feb 2005 Posts: 2064 Location: New Zealand
|
Posted: Jan 05, 2008 9:55pm Post subject: |
|
|
| the most glaring problem i can see at a glance is your $responserand, you only need the $ if you're using it as an identifier and not as a command, so first thing to try is to remove that and test |
|
| Back to top |
|
 |
Invisible Lurker

Joined: 26 Jul 2005 Posts: 191
|
Posted: Jan 05, 2008 9:57pm Post subject: |
|
|
| That part works fine, what doesnt work is my replying, although for whatever reason it reverses. When it tells me to say YESSUMS it doesn't reply when I say that but does say that I'm too late when I say JEEZ. Doesn't really make sense to me. |
|
| Back to top |
|
 |
Invisible Lurker

Joined: 26 Jul 2005 Posts: 191
|
Posted: Jan 05, 2008 11:02pm Post subject: |
|
|
figured it out.
on 1:TEXT:YESSUMS:#test:{
if ((%j1 == $null) || (%j2 != PLEEZ))
should have had YESSUMS instead of PLEEZ because it is halting if it is not the one you are using. |
|
| Back to top |
|
 |
Invisible Lurker

Joined: 26 Jul 2005 Posts: 191
|
Posted: Jan 09, 2008 8:59pm Post subject: |
|
|
In case you were wondering, I have been modding with some help...
Now works with multi users, also is dynamic with a word list, and is working on having a hidden function which is not fully functional yet.
alias -l responserand {
var %word.voice YESSUMS PLEEZ
var %word.voice.hidden SMUSSEY ZEELP
set %j2. [ $+ [ $nick ] ] $gettok(%word.voice,$rand(1,2),32)
set %j3. [ $+ [ $nick ] ] $gettok(%word.voice.hidden,$rand(1,2),32)
}
on 1:JOIN:#test:{
$responserand($nick)
msg $chan Hello $nick would you like voice? Respond with %j2. [ $+ [ $nick ] ] | set %j1. [ $+ [ $nick ] ] 5 | dec -c %j1. [ $+ [ $nick ] ] 1 | timer 1 15 unset %j1. [ $+ [ $nick ] ]
}
on 1:TEXT:*:#test:{
if ((%j1. [ $+ [ $nick ] ] == $null) || (%j2. [ $+ [ $nick ] ] != $1)) { halt }
elseif ((%j1. [ $+ [ $nick ] ] >= 0) && (%j1. [ $+ [ $nick ] ] > -10) && (%j2. [ $+ [ $nick ] ] == $1)) { mode # +v $nick | unset %j2. [ $+ [ $nick ] ] }
else { msg $chan You were too late. | unset %j2. [ $+ [ $nick ] ] }
}
on 1:NOTICE:*:?:{
if ((%j1. [ $+ [ $nick ] ] == $null) || (%j3. [ $+ [ $nick ] ] != $1)) { halt }
elseif ((%j1. [ $+ [ $nick ] ] >= 0) && (%j1. [ $+ [ $nick ] ] > -10) && (%j3. [ $+ [ $nick ] ] == $1)) { mode # +h $nick | unset %j3. [ $+ [ $nick ] ] }
else { notice $nick You were too late. | unset %j3. [ $+ [ $nick ] ] }
} |
|
| Back to top |
|
 |
|