View Single Post
  #13  
Old 06-30-2007, 01:21 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
PHP Code:
//#CLIENTSIDE
function onPlayerEnters() {
  
hide();
  
player.x = int(player.x);
  
player.y = int(player.y);
  
player.dir = 3;
  
setTimer(0.05);
  
coreys.isKickAss = true;
}
function 
onTimeOut() {
  if (!
antigravity) {
    if (
keydown(0) && playersprite >= 1 && playersprite <= 8) player.y += 0.5;
    if (
playerdir == 0||playerdir == 2) player.dir = gravdir;
    if (
onwall(player.x + 0.5,player.y + 3)||onwall(player.x + 1.5,player.y + 3)) {
      
velocity=0;
      
player.y=int(player.y);
      if (
keydown(6)) velocity=-2;
    }
    else if (
keydown(2) && playersprite >= 1 && playersprite<=8) player.y -= 0.5;
    if (
onwall(player.x + 0.5,player.y - 0.1)||onwall(player.x + 0.5,player.y)||onwall(player.x + 1.5,player.y)||onwall(player.x + 1.5,player.y - 0.1)) velocity = 0.1;
    else {
      if (
velocity > -0.1 && velocity <= 0) velocity = 0.1;
      if (
velocity > 3) velocity = 3;
    }
    if (
abs(velocity) > 0) {
      
player.y += velocity/6;
      if ((
velocity > 0 && (onwall(player.x + 0.5,player.y + 3) || onwall(player.x + 1.5,player.y + 3))) || (velocity < 0 && (onwall(player.x + 0.5,player.y) || onwall(player.x + 1.5,player.y)))) player.y = int(player.y);
      else 
player.y += velocity/6;
      if ((
velocity > 0 && (onwall(player.x + 0.5,player.y + 3) || onwall(player.x + 1.5,player.y + 3))) || (velocity < 0 && (onwall(player.x + 0.5,player.y) || onwall(player.x + 1.5,player.y)))) player.y = int(player.y);
      else 
player.y += velocity/6;
    }
    
velocity += abs(velocity/4);
    if (
this.shot == 9) {
      
hideimg(345);
      
this.shot=0;
    }
    if (
this.shot > 0) {
      
showimg(345,"busterl2d" @ this.sd @ ".gif",this.sx,this.sy);
      if (
this.sd == 1) {
        
this.sx -= 0.75;
        if (
testplayer(this.sx,this.sy) > -2) hitplayer(testplayer(this.sx,this.sy),2,player.x,player.y);
        if (
testnpc(this.sx,this.sy) > -2) hitnpc(testnpc(this.sx,this.sy),2,player.x,player.y);
        if (
testcompu(this.sx,this.sy) >- 2) hitcompu(testcompu(this.sx,this.sy),2,player.x,player.y);
      }
      if (
this.sd == 3) {
        
this.sx += 0.75;
        if (
testplayer(this.sx+1,this.sy) >- 2) hitplayer(testplayer(this.sx+1,this.sy),2,player.x,player.y);
        if (
testnpc(this.sx+1,this.sy) >- 2) hitnpc(testnpc(this.sx+1,this.sy),2,player.x,player.y);
        if (
testcompu(this.sx+1,this.sy) >- 2) hitcompu(testcompu(this.sx+1,this.sy),2,player.x,player.y);
      }
      
this.shot++;
    }
    if (
playersprite == 11 && player.hearts == player.fullhearts) {
      
this.shot = 1;
      
this.sd = player.dir;
      if (
this.sd == 1) {
        
this.sx = player.x - 2;
        
this.sy = player.y + 1;
      }
      if (
this.sd == 3) {
        
this.sx = player.x + 2;
        
this.sy = player.y + 1;
      }
      
showimg(345,"busterl2d" @ this.sd @ ".gif",this.sx,this.sy);
    }
    if ((
keydown(0) || keydown(2)) && !(keydown(1) || keydown(3))) playersprite = 0;
    if (
keydown(1) && !keydown(3)) player.dir = 1;
    if (
keydown(3) && !keydown(1)) player.dir = 3;
    
gravdir = player.dir;
  }
  
setTimer(0.05);
}
function 
onCreated() if (keydown(6)) setani("jumpnrun",NULL); 
No guarantee's it all works. I'm not exactly the best scripter in the world.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote