Advertisement
imk0tter

Imk0tter

Dec 10th, 2010
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.88 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 %text.y $window(@Path).h - 80
  34.   var %modifier 0
  35.   while (%count) {
  36.     var %path $path.createPath($iif($1,$1,25),%x,%y,%modifier)
  37.     hadd -m @Path $token(%path,1,32) $token(%path,2,32)
  38.     dec %text.y 10
  39.     dec %count
  40.     inc %modifier 0
  41.   }
  42.   var %count 1  
  43.   var %text.y $window(@Path).h - 80
  44.   var %n %x
  45.   var %k %y
  46.   while ($hget(@Path,%count).item != $null) {
  47.     var %x 1
  48.     var %z $v1
  49.     hadd -m @Path $+ %z Dist -1
  50.     while ($hget(@Path,%x).item != $null) {
  51.       var %y $v1
  52.       if (%y != %z) {
  53.         var %t $abs($calc($hget(@Path,%z) - $hget(@Path,%y)))
  54.         if (%t < $hget(@Path $+ %z,Dist) || $hget(@Path $+ %z,Dist) == -1) {
  55.           hadd -m @Path $+ %z Dist %t
  56.           hadd -m @Path $+ %z Color %y
  57.         }
  58.       }
  59.       inc %x
  60.     }
  61.     drawtext -nr @Path %z 5 %text.y Path Frequency: $hget(@Path,%z)
  62.     drawtext -nr @Path %z 200 %text.y Closest Match:
  63.     drawtext -nr @Path $hget(@Path $+ %z,Color) 320 %text.y Path
  64.     dec %text.y 10
  65.     inc %count
  66.   }
  67.   drawdot -nrf @Path 0 5 $calc(%n * 20 + %x.padding) $calc(%k * 20 + %y.padding)
  68.   hfree -w @Path*
  69.   drawdot @Path
  70. }
  71. alias -l path.createpath {
  72.   var %z $iif($1,$1,20)
  73.   var %color $rand(0,$rgb(255,255,255))
  74.   var %nigger $rand(0,1)
  75.   var %gridX %path.gridX / 20
  76.   var %gridY %path.gridY / 20
  77.   var %x $iif($2,$2,$rand(0,%gridX))
  78.   var %y $iif($3,$3,$rand(0,%gridY))
  79.   var %lastX %x
  80.   var %lastY %y
  81.   var %frequency 0
  82.   while (%z) {
  83.     ;;%frequency = $calc(%frequency + (%x + %gridY * %y))
  84.     %frequency = $calc(%frequency + (%x + %y))
  85.     drawdot -nrf @Path %color 4 $calc(%x * 20 + %x.padding + $4) $calc(%y * 20 + %y.padding + $4)
  86.     drawline -nrf @Path %color 1 $calc(%lastx * 20 + %x.padding - 2 + $4) $calc(%lasty * 20 + %y.padding - 2 + $4) $calc(%x * 20 + %x.padding - 2 + $4) $calc(%y * 20 + %y.padding - 2 + $4)
  87.     %lastX = %x
  88.     %lastY = %y
  89.     %x = $calc(%x + ($rand(0,2) - 1))
  90.     ;; %y = $calc(%y + ($rand(0,2) - 1))
  91.     %y = %y $iif(%nigger,+,-) 1
  92.     dec %z
  93.   }
  94.   drawdot @Path
  95.   return %color %frequency
  96. }
  97.  
  98. on 1:input:@Path: {
  99.   if ($1 == creategrid) {
  100.     path.createGrid $iif($2,$2,50)
  101.   }
  102.   if ($1 == cleargrid) {
  103.     path.cleargrid
  104.   }
  105.   if ($1 == compare) {
  106.     path.comparepaths $2 $3
  107.   }
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement