Thread: Running Attack
View Single Post
  #5  
Old 12-20-2011, 09:34 PM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
We replaced the gani under the Attack function, which supprisingly resulted in the gani being replaced at all times.. That's kinda an issue, but here's what we have:

PHP Code:
function attack() {
    
this.onehands = {
      
"katana""rubyblade""blueaxe""grayblade"
    
};
    if (
player.clientr.weaponClass "blueaxe"player.attr[3] = "e_weapon-blueaxe.png";
    if (
player.clientr.weaponClass "grayblade"player.attr[3] = "e_weapon-grayblade.gif";
    if (
player.clientr.weaponClass "rubyblade"player.attr[3] = "spawn_ruby-blade.gif";
    if (
player.clientr.weaponClass ""player.attr[3] = "";
    if (
player.clientr.weaponClass in this.onehands) {
      
setani("e_weapon-1h-attack"player.attr[3]);
      
sleep(1);
    }
    elseif(
player.clientr.weaponClass == "mallet"setani("dusty_hammer""whammer1.png""lift.wav");
    elseif(
player.clientr.weaponClass == "staff"setani("esteria_weapon-trainstaff-attack1"null);
    elseif(
player.clientr.weaponClass == "destructoaxe"setani("e_destructoaxe-attack"null);
    elseif(
player.clientr.weaponClass == "goldensword"setani("e_goldensword-attack"null);
    else 
setani("e_punch"null);
 
    
//this.nextAttack = .1;
    
if (player.clientr.weaponClass == "katana"this.dashFramesLeft 5;
    if (
player.clientr.weaponClass == "mallet"this.shakeFramesLeft 5;
    
triggerServer("weapon"this.name"attack");
    
// The Gani replacement.
    
if (player.clientr.weaponClass in this.onehands) {
      
replaceani("walk""e_weapon-1h-attackwalk");
      
player.chat "replace";
      
sleep(.5);
      
replaceani("e_weapon-1h-attackwalk""walk");
    }

Reply With Quote