mIRC Homepage
Posted By: EffingHell Code for backwards talking? - 14/07/07 12:03 AM
Hi I need a code to siht ekil klat aka talk like this
Posted By: LostShadow Re: Code for backwards talking? - 14/07/07 12:11 AM
Some don't work.

Some are word reverse = reverse word are Some.

Code:
;/Reverse {
;  var %reverse1 = $1-
;  var %reverse2 = $len(%reverse1)
;  while (%reverse2 > 0) {
;    if ($mid(%reverse1,%reverse2,1) != $chr(32)) {
;      var %reverse3 = %reverse3 $+ $mid(%reverse1,%reverse2,1)
;    }
;    else {
;      var %reverse3 = %reverse3 $mid(%reverse1,%reverse2,1)
;    }
;    dec %reverse2
;  }
;  if ($isid) return %reverse3
;  /say %reverse3
;}

/RV {
  var %i = $len($1-)
  while (%i) {
    if ($mid($1-,%i,1) == $chr(32)) { 
      var %text = $addtok(%text,$chr(32),32) 
      dec %i 
    }
    var %text = %text $+ $mid($1-,%i,1)
    dec %i
  }
  if ($isid) return %text
  /say %text
}

/rev {
  var %i = 0
  while (%i <= $len($1-)) {
    var %temp = %temp $+ $replace($left($right($1-,%i),1),$chr(32),$str($chr(32),2))
    inc %i
  }
  $iif($isid == $true,/say %temp,return %temp)
}

/reverse2 {
  var %old = $strip($1-), %temp = $len(%old), %char, %string
  while (%temp > 0) {
    %char = $mid($1-,%temp,1) 
    if (%char = $chr(32)) { 
      dec %temp 
      %char = $mid(%old,%temp,1) 
      %string = %string %char 
    }
    else { 
      %string = %string $+ %char 
    } 
    dec %temp 
  }
  if ($isid) return %string 
  else { 
    /say %string
  }
}

/rv2 {
  ;%c stores the total number of words found
  var %c $calc($iif($count($$1-,$chr(32)),$ifmatch,0) +1) , %v, %f
  ;words loop - begining from the last word of the sentence to the first
  while ( %c > 0) {
    %f = $gettok($$1-,%c,32) 
    var %i $len(%f) , %t
    ;letters loop - begining from the last letter of the word to the first (obviously)
    while (%i) { 
      %t = $+(%t,$right($left(%f,%i),1)) 
      dec %i 
    }
    ;adds the reconstructed words to the end of the the rest
    dec %c 
    %v = %v %t
  }
  ;if is ident., it'll return the result
  if ($isid) { 
    return %v 
  }
  ;if connected to a server it'll say the result
  if ($isid) return %v
  $iif($server,say,msg) %v
}

/rev2 {
  var %a = $len($1-) 
  while %a > 0 { 
    var %b = %b $+ $mid($1-,%a,1) $+ $chr(32) 
    dec %a 
  } 
  if ($isid) return %b
  /say %b 
}

/reverse3 { 
  var %i = 1,%r 
  while (* iswm $mid($1,%i,1)) { 
    %r = $ifmatch $+ %r 
    inc %i 
  } 
  if ($isid) return %r
  /say %r 
}

/rv3 { 
  var %r 1 
  while (%r <= $len($1-)) { 
    var %reverse %reverse $+ $replace( $+ $left( $+ $right( $+ $1- $+ , $+ %r $+ ) $+ , $+ 1 $+ ) $+ , $+ $chr(32) $+ , $+ $chr(172) $+ ) 
    inc %r 
  } 
  if ($isid) return $replace(%reverse,$chr(172),$chr(32))
  /say $replace(%reverse,$chr(172),$chr(32)) 
}

rev3 { 
  tokenze 32 $replace($1-,$chr(32), ) 
  var %x = $len($1) 
  while (%x) { 
  var %temp = %temp $+ $mid($1,%x,1) | dec %x } 
  if ($isid) return $replace(%temp,$chr(160),$chr(32))
  /say $replace(%temp,$chr(160),$chr(32)) 
}

/reverse4 { 
  var %a = $len($1-) 
  while (%a) { 
    var %b = $iif($mid($1-,%a,1) == $chr(32),$chr(1),$mid($1-,%a,1)) 
    var %c = %c $+ %b 
    dec %a 
  } 
  $iif($isid,say,return) $replace(%c,$chr(1),$chr(32)) | /halt 
}

/rv4 { 
  var %a = $len($1-),%b = 1 
  while (%b <= %a) {  
    var %c = $iif($mid($1-,%b,1) == $chr(32),$chr(1), $+ $mid($1-,%b,1)) 
    var %d = %d $+ %c 
    inc %b 
  } 
  $iif($isid,say,return) $replace(%d,$chr(1),$chr(32)) | halt 
}

reverse5 {
  var %c $calc($iif($count($$1-,$chr(32)),$ifmatch,0) +1) , %v, %f
  while ( %c > 0) {
    %f = $gettok($$1-,%c,32) | var %i $len(%f) , %t
    while (%i) { %t = $+(%t,$right($left(%f,%i),1)) | dec %i }
    dec %c | %v = %v %t
  }
  if ($isid) { return %v }
  $iif($server,say,echo) %v
}

rv5 {
  var %z = 1,%c 
  while * iswm $mid($1,%z,1) { 
    %c = $v2 $+ %c 
    inc %z 
  } 
  return %c
}

dialogreverse { 
  var %a = $replace($?="What To Reverse?",$chr(32),$chr(46)) 
  var %b = $len(%a) 
  while (%b >= 1) { 
    var %c = %c $+ $mid(%a,%b,1) 
    dec %b 
  } 
  echo -a $replace(%c,$chr(46),$chr(32))
}

/wordreverse { 
  var %temp, %loop = $numtok($1-,32)
  while (%loop) { 
    set %temp %temp $gettok($1-,%loop,32) 
    dec %loop 
  } 
  return %temp 
}

wordrev {
  var %out, %top = $numtok(%string) 
  while (%top > 0) { 
    %out = %out $gettok(%string, %top, 32) 
    dec %top 
  } 
  echo -a %out
}

wordrvline {
  var %array = $1-, %n = $numtok(%array,32) 
  while (%n) { /say $gettok(%array,%n,32) 
    dec %n 
  }
}
Posted By: schaefer31 Re: Code for backwards talking? - 14/07/07 02:55 AM
Code:
alias reverse $iif($isid,return,msg $active) $regsubex($1-,/(.)/gS,$mid(\A,-\n,1))


Useage: /reverse <text> or $reverse(text)

The code should be placed into remotes (alt + r)

mIRC 6.21 required.
Posted By: Horstl Re: Code for backwards talking? - 14/07/07 03:06 AM
I knew one was missing grin
No kidding, nice to see one method without while smile
Posted By: LostShadow Re: Code for backwards talking? - 14/07/07 04:40 AM
Heh.

*Steals it*
Posted By: landonsandor Re: Code for backwards talking? - 14/07/07 02:23 PM
one that's always worked for me was one that somebody here wrote (sorry, I forget who). Just place this in your aliases:

Code:
/b {
  var %base = $replace($1-, $chr(32), $chr(160)), %i = $len(%base)
  while (%i >= 1) { var %construct = %construct $+ $mid(%base,%i,1) | dec %i }
  say $replace(%construct, $chr(160), $chr(32))
}
Posted By: schaefer31 Re: Code for backwards talking? - 14/07/07 08:21 PM
That method was already given. wink
Posted By: landonsandor Re: Code for backwards talking? - 16/07/07 04:15 PM
maybe, but the original replier said some dont work so I was posting one that I knew worked smile this way, if already posted (as you say it was, then it confirms that the method works laugh
© mIRC Discussion Forums