View Single Post
  #6  
Old 12-29-2007, 06:31 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by Angel_Light View Post
PHP Code:
function onKeyPressedcodekey)
{

  switch ( 
temp.code)
  {
  
    case 
"65"//a
      
Grab();
    break;
    
  }
}

function 
Grab()
{

  
frontPosition = { player.1.5 vecx(player.dir) * 2player.1.5 vecy(player.dir) * 2};
  
  
canGrab = ( testplayer(frontPosition[0], frontPosition[1]) || testnpc(frontPosition[0], frontPosition[1]));

  if ( 
canGrab)
    
triggerAction(frontPosition[0], frontPosition[1], "Grabbed"player.accountplayer.guild);


Here what I use, forgot where I got it though. :/
would that be for the system script? or the item script?
__________________
I am the devil, I am here to do to devils work.
Reply With Quote