Thread: Bomb and Arrow
View Single Post
  #3  
Old 11-10-2009, 10:47 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I think they're findable if you search the forums but this is pretty much it.

*Bomb

PHP Code:
//#CLIENTSIDE

function onWeaponfired() {
  if (
player.bombs <= 0) return;
  
player.bombs--;
  
freezeplayer(.1);
  
setani("lay",null); 
  
temp.layx = player.x - int(player.x / 64) * 64 + .5 + vecx(player.dir)*2;
  
temp.layy = player.y - int(player.y / 64) * 64 + 1 + vecy(player.dir)*2;
  
putbomb(1, temp.layx, temp.layy);
} 
*Bow

PHP Code:
//#CLIENTSIDE

function onWeaponfired() {
  if (
player.darts <= 0) return;
  
player.darts--;
  
freezeplayer(.1);
  
setani("shoot", "wbow1.png"); 
  
setshootparams("classic", "arrow", player.dir, player.account);
  
temp.angl = getangle(vecx(player.dir), vecy(player.dir));
  
shoot(player.x + 0.5 + vecx(player.dir), player.y + vecy(player.dir), player.z, temp.angl, 0, 0, "classic_arrow", player.dir);
}  

function 
onActionProjectile(ptype, atype, pdir, pacc) {
  if (
ptype != "classic" && atype != "arrow") return;
  if (
findplayer(pacc).guild == player.guild && player.guild) return;
  
hitplayer(0, 1, player.x + 1.5 - vecx(pdir), player.y + 2 - vecy(pdir));
} 
You'll have to change the gani used for the projectile in the shoot function though.
__________________
Quote:
Reply With Quote