mIRC Home    About    Download    Register    News    Help

Print Thread
#67511 11/01/04 08:56 PM
Joined: Oct 2003
Posts: 34
S
spling Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2003
Posts: 34
Please disregard, I figured it out wink

mmm.. first post..
now, strait to the point. I'm trying to make a script to scramble words. here is what I have so far:
Code:
on *:text:!scramble*:# {
  set %unscrambled $$2
  set %scrambled.len $len($$2)
  set %charnumber 1
  :line
  if $var(%scrambled.char.*,0) == %scrambled.len {
    goto line2
    var %tempscramble 1
  }
  else {
    set %scrambled.char. [ $+ [ %charnumber ] ] $mid($$2,%charnumber,1)
    inc %charnumber 1
  }
  goto line
  :line2
  set %tempvar $var(%scrambled.char.*,$rand(1,$var(%scrambled.char.*,0)))
  echo %tempvar
} 


so, after it selects one of the letters randomly, it puts it into a variable, my problem is, the variable is this:
%tempvar %scrambled.char.3
%scrambled.char.3 is "g"

I need to know how to make it evaluate that variable, so that it returns "g" instead of "%scrambled.char.3". The rest will be easy..

Thx in advance.

~spling


Last edited by spling; 11/01/04 09:12 PM.
#67512 11/01/04 09:28 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
uhum? and your post is what?? try a diffrent color "black maybe" so other people can read what you post, i have yellow background on this forum, so i dont see a word that you typed..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#67513 11/01/04 09:30 PM
Joined: Oct 2003
Posts: 34
S
spling Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2003
Posts: 34
Did you read the black words at the top?

#67514 11/01/04 10:06 PM
Joined: Sep 2003
Posts: 584
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
then edit it and delete those damn letters

#67515 16/01/04 11:21 PM
Joined: Oct 2003
Posts: 34
S
spling Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2003
Posts: 34
This post can no longer be edited because the maximum edit time has expired

I'm guessing you missed the black letters too. I thought people would see the black letters, and not bother to read the yellow ones.


Link Copied to Clipboard