Swirl

By BlueThen on Mar 30, 2008

Another neat effect I made with mIRC. You can change modes just by clicking the window.
Image

BlueThen.com :D

Updates:
The background is now automatically black.
New settings dialog!
Colors. :)
Fixed a few bugs, like the "* /drawfill" bug when closing.
You can now change colors using the edit forms.

;Swirl 1.03
;Made by BlueThen on March 30, 2008.
;Last updated March 31, 2008.
;To install, paste this code into your remotes (alt + r) then 
;type /swirl or right click the channel or status and click Swirl.
;Click to change modes.
menu channel,status { 
  Swirl: Swirl 
}
alias Swirl {
  window -poCzdk0 +tnbL @Swirl -1 -1 400 400 | window -poCzdhk0 +tnbL @swirl.buf -1 -1 800 800 | dialog -m swirl swirl | dialog -s swirl 200 200 252 262
  set %swirl.r1 1 | set %swirl.g1 1 | set %swirl.b1 1 | set %swirl.r2 0 | set %swirl.g2 0 | set %swirl.b2 0 | set %swirl.x 1 | set %swirl.v 1 | set %swirl.clo n | swirl.frame
}
alias -l swirl.frame {
  clear @swirl.buf | %swirl.y = 50
  drawfill @swirl.buf 1 1 1 1 1
  if (%swirl.v == 1) { while (%swirl.y > 0) {
      %swirl.a = $calc(400 + ((%swirl.y *7) * $cos($calc(%swirl.y * %swirl.x)).deg)) $calc(400 + ((%swirl.y *7) * $sin($calc(%swirl.y * %swirl.x)).deg)) 
      %swirl.c = $calc(255-(%swirl.y * 5.1))
      drawdot -r @swirl.buf $rgb($calc(%swirl.r2 +(%swirl.c * %swirl.r1)),$calc(%swirl.g2 +(%swirl.c * %swirl.g1)),$calc(%swirl.b2 +(%swirl.c * %swirl.b1))) $calc(%swirl.y *0.8) 400 400 %swirl.a | dec %swirl.y
      drawline -r @swirl.buf $rgb($calc(%swirl.r2 +(%swirl.c * %swirl.r1)),$calc(%swirl.g2 +(%swirl.c * %swirl.g1)),$calc(%swirl.b2 +(%swirl.c * %swirl.b1))) $calc(%swirl.y *0.8) $calc(400 + ((%swirl.y *7) * $cos($calc(%swirl.y * %swirl.x)).deg)) $calc(400 + ((%swirl.y *7) * $sin($calc(%swirl.y * %swirl.x)).deg)) %swirl.a
    }
  }
  if (%swirl.v == 2) { while (%swirl.y > 0) {
      %swirl.a = $calc(400 + ((%swirl.y *7) * $cos($calc(%swirl.y * %swirl.x)).deg)) $calc(400 + ((%swirl.y *7) * $sin($calc(%swirl.y * %swirl.x)).deg)) | %swirl.c = $calc(255-(%swirl.y * 5.1))
      drawdot -r @swirl.buf $rgb($calc(%swirl.r2 +(%swirl.c * %swirl.r1)),$calc(%swirl.g2 +(%swirl.c * %swirl.g1)),$calc(%swirl.b2 +(%swirl.c * %swirl.b1))) $calc(%swirl.y *0.8) 400 400 %swirl.a
      drawline -r @swirl.buf $rgb($calc(%swirl.r2 +(%swirl.c * %swirl.r1)),$calc(%swirl.g2 +(%swirl.c * %swirl.g1)),$calc(%swirl.b2 +(%swirl.c * %swirl.b1))) $calc(%swirl.y *0.8) 400 400 %swirl.a | dec %swirl.y
    }
  }
  if (%swirl.v == 3) { while (%swirl.y > 0) {
      %swirl.a = $calc(400 + ((%swirl.y *7) * $cos($calc(%swirl.y * %swirl.x)).deg)) $calc(400 + ((%swirl.y *7) * $sin($calc(%swirl.y * %swirl.x)).deg)) | %swirl.c = $calc(255-(%swirl.y * 5.1))
      drawdot -r @swirl.buf $rgb($calc(%swirl.r2 +(%swirl.c * %swirl.r1)),$calc(%swirl.g2 +(%swirl.c * %swirl.g1)),$calc(%swirl.b2 +(%swirl.c * %swirl.b1))) $calc(%swirl.y *0.8) 400 400 %swirl.a | dec %swirl.y
    }
  }
  if (%swirl.clo != y) {
    inc %swirl.x 0.1 | drawcopy -m @swirl.buf 0 0 800 800 @swirl 0 0 400 400 | .timer -ho 1 0 swirl.frame
  }
}
menu @swirl { 
  sclick: if (%swirl.v == 1) %swirl.v = 2 | elseif (%swirl.v == 2) %swirl.v = 3 | elseif (%swirl.v == 3) %swirl.v = 1 
}
on *:close:@swirl: {
  set %swirl.clo y
  if ($dialog(swirl)) dialog -x swirl
  unset %swirl.x %swirl.y %swirl.a %swirl.v %swirl.c %swirl.r1 %swirl.r2 %swirl.b1 %swirl.b2 %swirl.g1 %swirl.g2
  .timer -ho 1 50 window -c @swirl.buf | .timer -ho 1 50 unset %swirl.clo
}
dialog -l Swirl {
  title "Swirl Options"
  size -1 -1 252 262
  option pixels notheme
  scroll "", 1, 26 163 200 16, horizontal top range 1 255
  text "Color 1", 2, 26 31 100 17
  text "Color 3", 3, 26 141 100 17
  text "Color 2", 4, 26 86 100 17
  scroll "", 5, 26 108 200 16, horizontal top range 1 255
  scroll "", 6, 26 53 200 16, horizontal top range 1 255
  button "Mode 1", 7, 26 201 65 25
  button "Mode 2", 8, 161 201 65 25
  button "Mode 3", 9, 94 234 65 25
  text "Made By", 10, 59 3 100 17, right
  button "BlueThen!", 11, 161 2 65 19
  edit "1", 12, 180 29 46 20
  edit "1", 13, 180 84 46 20
  edit "1", 14, 180 139 46 20
}
on *:dialog:swirl:edit:*: {
  if ($did == 12) {
    if ($did(12) != 1) set %swirl.r1 0 
    else set %swirl.r1 1
    set %swirl.r2 $did(12)
  }
  if ($did == 13) {
    if ($did(13) != 1) set %swirl.g1 0 
    else set %swirl.g1 1
    set %swirl.g2 $did(13)
  }
  if ($did == 14) {
    if ($did(14) != 1) set %swirl.b1 0 
    else set %swirl.b1 1
    set %swirl.b2 $did(14)
  }
}
on *:dialog:swirl:sclick:*: {
  if ($did == 7) set %swirl.v 1
  elseif ($did == 8) set %swirl.v 2
  elseif ($did == 9) set %swirl.v 3
  elseif ($did == 11) run http://bluethen.com/
}
on *:dialog:swirl:scroll:*: {
  if ($did == 1)  {
    if ($did(1).sel != 1) set %swirl.b1 0 
    else set %swirl.b1 1
    set %swirl.b2 $did(1).sel
    did -ra swirl 14 %swirl.b2
  }
  elseif ($did == 5) {
    if ($did(5).sel != 1) set %swirl.g1 0 
    else set %swirl.g1 1
    set %swirl.g2 $did(5).sel
    did -ra swirl 13 %swirl.g2
  }
  elseif ($did == 6) {
    if ($did(1).sel != 1) set %swirl.r1 0 
    else set %swirl.r1 1
    set %swirl.r2 $did(6).sel
    did -ra swirl 12 %swirl.r2
  }
}

Comments

Sign in to comment.
GreyFox   -  Mar 12, 2009

100/10 bro :)

 Respond  
Mitchell   -  Apr 28, 2008

this looks very nice. keep up the great work

 Respond  
erry   -  Apr 18, 2008

20/10 lol

 Respond  
erry   -  Apr 18, 2008

AWSOOOOOOOOOME :D :D :D :D : D: D: :D :D!!

 Respond  
Jonesy44   -  Mar 31, 2008

bangin, nice work lol

 Respond  
BlueThen   -  Mar 31, 2008

Updated again. You can now change the colors using the edit forms. o.o

 Respond  
Jonesy44   -  Mar 31, 2008

lol, it\'s some good work in there ;-)

 Respond  
BlueThen   -  Mar 31, 2008

Ah, thanks! :)

 Respond  
Jonesy44   -  Mar 31, 2008

10/10 just for the genius of this idea, and since i can\'t do it. i\'m impressed lol

 Respond  
BlueThen   -  Mar 31, 2008

Updated, with a lot more stuff. >:D

 Respond  
EL   -  Mar 31, 2008

o0o ok i see nice stuff man works smoof on my other script.

 Respond  
BlueThen   -  Mar 31, 2008

The blinking window is actually the buffer, where the image is actually processed and drawn. That window is supposed to be hidden, and it doesn\'t hide on some mirc\'s for some reason.

 Respond  
EL   -  Mar 31, 2008

Ahh damn it was my mirc script i wasnt useing my chat scaript cause for soem fuckin greason my @ windows are see through so im testing on a different mirc and it was blinking and shit man this is even cooler hen i thought lol.Well done man well done.

 Respond  
EL   -  Mar 31, 2008

mm really should put a seizure or soem sort of warning caus eof the blinking an animation,besides that i like it alot an you say it supposed to change modes as well i dotn get anything when i click in the @ window maybe its jsut my mirc well done tho man i really likes wat your puttin out here\".\"Rate it or Hate it?\"...8/10.`-.-

 Respond  
BlueThen   -  Mar 31, 2008

Thanks! :D

 Respond  
Eugenio   -  Mar 31, 2008

LOL this aint bad

 Respond  
BlueThen   -  Mar 31, 2008

Thanks guys.

@FURBY*: I like to have my scripts to be interactive and flexible.

@Render: Alright, in my next update, I\'ll have it unset the variables.
I have tried animating at one point, but failed to do so due to lack of equipment (took me 3 hours to scan one animation :( )

@jonesy44: Keep trying, I wouldn\'t of been here if I gave up that early. :)

Thanks for the comments, guys! Keep em\' coming. I love feedback. :)

 Respond  
Jonesy44   -  Mar 31, 2008

Gives up Couldn\'t even draw a feckin dot xD

 Respond  
Jonesy44   -  Mar 31, 2008

i\'ve never bothered learning the drawdot functions etc in mirc, but i fancy trying them now lol

 Respond  
Render   -  Mar 31, 2008

very very nice! jaytea is right, you definitely are a future animator! i think you should use something similar to unset %swirl.* in the on close event.

 Respond  
F*U*R*B*Y*   -  Mar 31, 2008

rather just automatically change into the next shape, why not make it transform, and show them........ if that makes sense

 Respond  
BlueThen   -  Mar 30, 2008

Thanks!

Oh, I keep forgetting that everyone doesn\'t have a black background, lol. Fixed. :)

 Respond  
jaytea   -  Mar 30, 2008

edit: you should drawfill the window black to begin with, it didn\'t look good on my default white background until i changed it ;P

 Respond  
jaytea   -  Mar 30, 2008

hey this is actually quite neat! you have some animation potential, some people have the mathematical prowess but lack the design ability (such as myself :P), but this design is actually really nifty, imo

 Respond  
BlueThen   -  Mar 30, 2008

I\'m starting to run out of ideas!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.