Advertisement
pastamaker

ice wall

Jun 6th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SingleInstance,force
  2. SetBatchLines,-1
  3. #Include,<hellbents_gdip>
  4. popUp:=Layered_Window_SetUp(4,550,50,450,650,1,"+alwaysontop")
  5.  
  6.  
  7.  
  8. Fill_Boxx(pGraphics,colour,x,y,w,h)
  9.  
  10. fill_boxX(popUp.g,"000000",0,0,popUp.w,popUp.h)
  11. border:=new Outline
  12. border.set(10,410,10,600,15,25,45,65,"f00000","a00000")
  13. border.draw(popUp)
  14. jumpOnMe:=[]
  15. onWhatTojump :=new  Bars
  16. ;~ onWhatTojump.add(jumpOnMe,100,250,450,75,25,10,"000000")
  17.  
  18.  
  19.  
  20. onWhatTojump.draw(popUp,jumpOnMe)
  21. onWhatTojump.random:=0
  22. UpdateLayeredWindow(popUp.hwnd, popUp.hdc, popUp.x, popUp.y, popUp.w, popUp.h)
  23.  
  24.  
  25. loop  {
  26.     Sleep 15
  27.     ;~ randomx(Me,Outline,w1,w2,h,v,colour){
  28. if(onWhatTojump.random < 0){
  29.    
  30.     onWhatTojump.randomx(jumpOnMe,border,100,200,15,2,colourGenerator())
  31.    
  32. }
  33. border.draw(popUp)
  34. onWhatTojump.move(jumpOnMe)
  35. onWhatTojump.draw(popUp,jumpOnMe)
  36. UpdateLayeredWindow(popUp.hwnd, popUp.hdc)
  37. }
  38.  
  39. class Outline{
  40.     set(x1,x2,y1,y2,wx1,wx2,wy1,wy2,colourBack,colourLine){
  41.         This.x1:=x1
  42.         This.x2:=x2
  43.         This.y1:=y1
  44.         This.y2:=y2
  45.         This.wx1:= wx1+x1
  46.         This.wx2:= -wx2+x2
  47.         This.wy1:= wy1+y1
  48.         This.wy2:= -wy2+y2
  49.         this.colourBack:=colourBack
  50.         this.colourLine:=colourLine
  51.  
  52.     }
  53.    
  54.     draw(popUp){
  55.        
  56.     fill_boxX(popUp.g,this.colourLine,this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)
  57.     fill_boxX(popUp.g,this.colourBack,this.wx1,this.wy1,this.wx2-this.wx1,this.wy2-this.wy1)
  58.     }
  59.        
  60.  
  61.  
  62. }
  63.  
  64.  
  65. Class Bar{
  66.     set(x1,x2,y1,ymin,h,v,colour){
  67.         This.x1:=x1
  68.         This.x2:=x2
  69.         This.y1:=y1
  70.         This.ymin:=ymin
  71.         This.h:=h
  72.         This.v:=v
  73.         This.colour:=colour
  74.         this.deleteme:=0
  75.  
  76.  
  77.     }
  78.  
  79.     draw(popUp){
  80.        
  81.     fill_boxX(popUp.g,this.colour,this.x1,this.y1,this.x2 - this.x1,this.h)
  82.     ;~ fill_boxX(popUp.g,"ffffff",0,0,250,250)
  83.     }
  84.    
  85.     move(){
  86.    
  87.         This.y1-=THIS.V
  88.         this.delete()
  89.     }
  90.     delete(){
  91.     if(this.y1 < this.ymin )
  92.         this.deleteme:=1
  93.     }
  94.  
  95. }
  96.  
  97. class Bars {
  98.     draw(popUp,Me){
  99.         for i,value in me {
  100.            
  101.             value.draw(popUp)
  102.         }
  103.        
  104.     }
  105.     delete(Me){
  106.         t:=0
  107.         while(me.length() > t ){
  108.             t++
  109.             if(me[t].deleteme = 1)
  110.                 me.Remove(t)
  111.         }
  112.     }
  113.     add(Me,x1,x2,y1,ymin,h,v,colour){
  114.         random,ran,5,10
  115.         this.random:= ran*h // v
  116.         that:= new Bar
  117.         that.set(x1,x2,y1,ymin,h,v,colour)
  118.         me.insert(that)
  119.     }
  120.    
  121.     move(me){
  122.         this.random--
  123.     for i,value in me
  124.         value.move()
  125.         this.delete(Me)
  126.     }
  127.     randomx(Me,Outline,w1,w2,h,v,colour){
  128.         random,ran,w1,w2
  129.         x1:=Outline.wx1
  130.         x2:=Outline.wx2
  131.         random,x1,x1,x2 - ran
  132.         y1:=Outline.wy2
  133.         ymin:=Outline.wy1
  134.        
  135.  
  136.        
  137.         this.add(Me,x1,x1+ran,y1-h,ymin,h,v,colour)
  138.     }
  139.  
  140. }
  141.  
  142. colourGenerator(){
  143.     a:=[]
  144.     a:=["1","2","3","4","5","6","7","8","9","a","b","c","d","f"]
  145.     colour=00
  146.         loop 4 {
  147.             Random,ran,1,15
  148.         new:=a[ran]
  149.             colour=%colour%%new%
  150.         }
  151.     return colour
  152. }
  153.  
  154.  
  155.  
  156.  
  157. a::
  158. gui,1:show
  159. return
  160.  
  161. b::
  162. gui,1:hide
  163. return
  164.  
  165.  
  166.  
  167. x::
  168. Layered_Window_ShutDown(popUp)
  169. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement