imk0tter

Imk0tter

Jan 8th, 2011
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 3.34 KB | None | 0 0
  1. alias doshits {
  2.   var %x 1
  3.   while %x < 183 {
  4.     echo -a $replace($read($$1,%x),[,<,],>) $+ 
  5.     inc %x
  6.   }
  7. }
  8.  
  9. menu * {
  10.   Path Frequency Analysis:/path.init
  11. }
  12.  
  13. alias path.init {
  14.   if ($window(@Path)) window -c @Path
  15.   window -pe @Path
  16. }
  17. alias -l path.creategrid {
  18.   drawrect -rf @Path $rgb(255,255,255) 1 0 0 $window(@Path).w $window(@Path).h
  19.   %path.gridX = $1 * 20
  20.   %path.gridY = $iif($2,$2,$1) * 20
  21.   %x.padding = 40
  22.   %y.padding = 10
  23.   var %x %x.padding,%y %y.padding
  24. }
  25. alias -l path.cleargrid {
  26.   path.creategrid $calc(%path.gridX / 20) $calc(%path.gridY / 20)
  27. }
  28. alias -l path.comparePaths {
  29.   path.cleargrid
  30.   var %count $iif($iif($2,$2,3) > 0,$v1,1)
  31.   var %x $calc(%path.gridX / 20 / 2)
  32.   var %y $calc(%path.gridY / 20 / 2)
  33.   var %zz 5
  34.   var %text.y $window(@Path).h - 80
  35.   var %modifier 0
  36.   while (%count) {
  37.     var %path $path.createPath($iif($1,$1,25),%x,%y,%modifier,%zz)
  38.     hadd -m @Path $token(%path,1,32) $token(%path,2,32)
  39.     dec %text.y 10
  40.     dec %count
  41.     inc %modifier 0
  42.   }
  43.   var %count 1  
  44.   var %text.y $window(@Path).h - 80
  45.   var %n %x
  46.   var %k %y
  47.   while ($hget(@Path,%count).item != $null) {
  48.     var %x 1
  49.     var %z $v1
  50.     hadd -m @Path $+ %z Dist -1
  51.     while ($hget(@Path,%x).item != $null) {
  52.       var %y $v1
  53.       if (%y != %z) {
  54.         var %t $abs($calc($hget(@Path,%z) - $hget(@Path,%y)))
  55.         if (%t < $hget(@Path $+ %z,Dist) || $hget(@Path $+ %z,Dist) == -1) {
  56.           hadd -m @Path $+ %z Dist %t
  57.           hadd -m @Path $+ %z Color %y
  58.         }
  59.       }
  60.       inc %x
  61.     }
  62.     drawtext -nr @Path %z 5 %text.y Path Frequency: $hget(@Path,%z)
  63.     drawtext -nr @Path %z 200 %text.y Closest Match:
  64.     drawtext -nr @Path $hget(@Path $+ %z,Color) 320 %text.y Path
  65.     dec %text.y 10
  66.     inc %count
  67.   }
  68.   drawdot -nrf @Path 0 5 $calc(%n * 20 + %x.padding) $calc(%k * 20 + %y.padding)
  69.   hfree -w @Path*
  70.   drawdot @Path
  71. }
  72. alias -l path.createpath {
  73.   var %z $iif($1,$1,20)
  74.   var %poop %z
  75.   var %color $rand(0,$rgb(255,255,255))
  76.   var %nigger $rand(0,1)
  77.   var %gridX %path.gridX / 20
  78.   var %gridY %path.gridY / 20
  79.   var %x $iif($2,$2,$rand(0,%gridX))
  80.   var %y $iif($3,$3,$rand(0,%gridY))
  81.   var %zz $iif($5,$5,$rand(5,10))
  82.   var %lastX %x
  83.   var %lastY %y
  84.   var %lastZ %zz
  85.   var %frequency 0
  86.   var %xavg 0
  87.   var %yavg 0
  88.   var %zavg 0
  89.   while (%z) {
  90.     ;;%frequency = $calc(%frequency + (%x + %gridY * %y + %zz * %gridY ^2))
  91.     %frequency = $calc(%frequency + %x + %y + (%zz * 1.25))
  92.     inc %xavg %x
  93.     inc %yavg %y
  94.     inc %zavg %zz
  95.     drawdot -nrf @Path %color %zz $calc(%x * 20 + %x.padding + $4) $calc(%y * 20 + %y.padding + $4)
  96.     drawline -nrf @Path %color 1 $calc(%lastx * 20 + %x.padding - (%lastZ / 2) + $4) $calc(%lasty * 20 + %y.padding - (%lastZ / 2) + $4) $calc(%x * 20 + %x.padding - (%zz / 2) + $4) $calc(%y * 20 + %y.padding - (%zz / 2) + $4)
  97.     %lastX = %x
  98.     %lastY = %y
  99.     %lastZ = %zz
  100.     %x = $calc(%x + ($rand(0,2) - 1))
  101.     ;; %y = $calc(%y + ($rand(0,2) - 1))
  102.     %y = %y $iif(%nigger,+,-) 1
  103.     %zz = $calc(%zz + ($rand(0,1) - .5))
  104.     dec %z
  105.   }
  106.   ;;%frequency = $calc((%xavg / %poop) + ((%yavg / %poop) * %gridy) + (%zavg / %poop))
  107.   ;;%frequency = $calc((%xavg / %poop) + (%yavg / %poop) + ((%zavg / %poop) * 1.5))
  108.   drawdot @Path
  109.   return %color %frequency
  110. }
  111.  
  112. on 1:input:@Path: {
  113.   if ($1 == creategrid) {
  114.     path.createGrid $iif($2,$2,50)
  115.   }
  116.   if ($1 == cleargrid) {
  117.     path.cleargrid
  118.   }
  119.   if ($1 == compare) {
  120.     path.comparepaths $2 $3
  121.   }
  122. }
Add Comment
Please, Sign In to add comment