Before I went on vacation, I was working on the spells for N-Pulse Rebirth. I've just come back, and I need help getting the damage on projectiles.
PHP Code:
//THIS PART IS SERVERSIDE
function onActionServerside( cmd, p1 ) {
switch ( cmd ) {
case "Hurt":
temp.h = p1;
triggerclient("gui","-System/Health","Attacked",player.x,player.y,temp.h,player.account);
break;
}
}
//THIS PART IS CLIENTSIDE
//DIRECTLY BEFORE IT SHOOTS
setShootParams(this.spell_effect,this.spell_power,this.spell_bonus);
//LAST BIT OF CODE IN THE SCRIPT
function onActionProjectile( effect, power, bonus ) {
switch ( effect ) {
case "Hurt":
temp.hpower = int(random((bonus^2*power)/(pi^4)-(bonus-3), (bonus^2*power)/(pi^4)+bonus));
triggerserver("gui",this.name,"Attack",temp.hpower);
break;
}
}
*Please know that the comments are specifically for the forums to show what's where, and there is code between them
It loads the
effect,
power, and
bonus right, but it doesn't send through and do damage. How can I fix this?
Thanks for taking the time to look through this.