mIRC Home    About    Download    Register    News    Help

Print Thread
#246035 18/05/14 08:50 PM
Joined: May 2014
Posts: 7
O
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
O
Joined: May 2014
Posts: 7
Ok, so question, I am playing with a number guess script that someone else made to kinda learn the basics of scripting, and I am kinda stumped,

Code:
ON *:TEXT:!guess*:#: {
  if (%number [ $+ [ $chan ] ]) && ($2 isnum 1-100) &&(%guessact) {
    set -u10 %guessact 1
    inc %guesses
    if ($2 == %number [ $+ [ $chan ] ]) { msg # WOW nice job!! $nick The Number Was $2 $+ ! It took %guesses guesses. | unset %number [ $+ [ $chan ] ] | unset %scriptcount }
    else { echo Script Error! } 
  }


Is there anyway to do this with out the !guess and put in a wild card to just see the number with out having to put in a !.

I tried a few different things, from different sites that talked about wild cards. None of them worked.
The closest I got was !* and that required to type ! <number> to get a response. So I am thinking I need something there to start it.

Anyway I did searches to see if anyone else talked about doing this in other scripts did not see it, but may have missed it.
So if anyone could give me some advice or point me in the right direction to find a answer that would rock!

Thanks for your time

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
If you don't want any other text to be used, just use
Code:
on *:text:*:#: {

Just make sure to change your if statements from $2 to $1
Sidenotes: Add a space here: &&(%guessact)
From what you showed you have a bracket error, could be that you just accidentally left out the last } though.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Nillen #246037 18/05/14 09:05 PM
Joined: May 2014
Posts: 7
O
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
O
Joined: May 2014
Posts: 7
Ahh,

Awesome! Thanks! Makes total sense! smile



Link Copied to Clipboard