Home | Networks | Community | Need Help? 

 
 Quick search

 
 
 RegisterRegister   Log inLog in 

mirc help

 
Post new topic   Reply to topic    SearchIRC Forum Index -> IRC Scripts
Author Message
Invisible
Lurker
Lurker


Joined: 26 Jul 2005
Posts: 190

PostPosted: Jan 05, 2008 9:44pm    Post subject: mirc help Reply with quote

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
Guru


Joined: 05 Feb 2005
Posts: 2009
Location: New Zealand

PostPosted: Jan 05, 2008 9:55pm    Post subject: Reply with quote

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
Lurker


Joined: 26 Jul 2005
Posts: 190

PostPosted: Jan 05, 2008 9:57pm    Post subject: Reply with quote

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
Lurker


Joined: 26 Jul 2005
Posts: 190

PostPosted: Jan 05, 2008 11:02pm    Post subject: Reply with quote

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
Lurker


Joined: 26 Jul 2005
Posts: 190

PostPosted: Jan 09, 2008 8:59pm    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    SearchIRC Forum Index -> IRC Scripts All times are GMT - 6 Hours
Page 1 of 1

 
 
Forum powered by phpBB
 
 © 2000 - 2008 EverythingIRC, Inc. All rights reserved. Please read our disclaimer