Thread: Image Masking?
View Single Post
  #5  
Old 02-13-2015, 01:24 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quite impressive actually even client side.

Quote:
Originally Posted by callimuc View Post
One of the versions Dusty has used made. Kind of equals to this one of him



PHP Code:
//#CLIENTSIDE
function onPlayerenters() {
  for (
temp.i=0;i<33*33;i++) {
    
showimg(1000+i,"light2.png",((i%32)*2)-4,(int(i/32)*2)-4);
    
/*showpoly(1000+i,{
      ((i%32)*2),(int(i/32)*2),
      ((i%32)*2)+2,(int(i/32)*2),
      ((i%32)*2)+2,(int(i/32)*2)+2,
      ((i%32)*2),(int(i/32)*2)+2
    });*/
    
changeimgmode(1000+i,2);
    
changeimgzoom(1000+i,2);
    
changeimgcolors(1000+i,.99,.99,.99,.99);
  }
  
onTimeout();
}
function 
onTimeout() {
  
temp.lgts = new[0];
  for (
temp.i=0;i<33*33;i++) findimg(1000+i).alpha .99;
  
temp.mx int((mousex-1-5)/2);
  
temp.my int((mousey-1-5)/2);
  
lgts.add({mx,my,6});
  for (
temp.pl:players) {
    if (
pl.account == player.account) {
      
temp.mx int((pl.x+.5-9)/2);
      
temp.my int((pl.y+1-9)/2);
      
lgts.add({mx,my,10});
    } else {
      
temp.mx int((pl.x+.5-5)/2);
      
temp.my int((pl.y+1-5)/2);
      
lgts.add({mx,my,6});
    }
  }
  for (
temp.j:lgts) {
    for (
temp.i=0;i<j[2]^2;i++) {
      
temp.dx = (j[0]+(i%j[2])) - (j[0]+(j[2]/2));
      
temp.dy = (j[1]+int(i/j[2])) - (j[1]+(j[2]/2));
      
temp.dist = (dx^dy^2)^.5;
      
temp.img 1000+(j[0]+(i%j[2]))+((j[1]+int(i/j[2]))*32);
      
//findimg(img).alpha = 0;
      //findimg(img).alpha -= (1-(dist/(j[2]/2)));
      
findimg(img).alpha dist/(j[2]*5);
      if (
findimg(img).alpha .99findimg(img).alpha .99;
    }
  }
  
setTimer(0.05);

Thanks for finding that, thats exactly what I was referring to.
Reply With Quote