View Single Post
  #6  
Old 02-11-2010, 10:20 PM
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
Revised. Still not working.

PHP Code:
function punch(dxdy) {
  
player.chat "2";
  if ( 
player.ani != "human2_swim" ) {
    if ( 
player.ani != "human2_hthc_punch" setani"human2_hthc_punch"null);
    
freezeplayer(.5);

  for (
temp.pl findNearestPlayers(dxdy)) {
    if (! (
dx in |player.xplayer.3| && dy in |player.yplayer.3|)) {
      continue;
    }
    if (
pl == player) continue;
    
pl.hit(0.5player);
  }

    
waitforGraalControl"punch".5);
    if ( 
this.keyb_d == true ) {
      
setani"human2_shield_hold"null );
      
onshield();
    } else  
setani"human2_idle" null );
  }
}

function 
onCreated() {
  
disableweapons();
  
addtiledef("picso2.png","psi_"0);
  
enablefeaturesallfeatures ---0x10 -0x20 );
  
showstats(256 512 1024);
  
  
// allow ourselves to hurt :o
  
player.join("hurt");
}

//#CLIENTSIDE
function GraalControl.onKeyDown(keycodekeychar) {
  
this.("keyb_" keychar) = true;
  switch( 
keychar ) {
    case 
"s":
      
player.chat "1";
      
punch(player.xplayer.y);
    break;
    case 
"d":
      
setani"human2_shield_hold"null );
      
this.playerdir player.dir;
      
onshield();
    break;
  }
  if ( 
keycode == ) {
    
this.keyb_d false;
    
setani"human2_idle"null );
    
shield();
  }

Reply With Quote