hitplayer

Doesn’t seem to be working at all. Hitcompu does though. Is this a known bug already or should I be using something else? …

Example: The Knife of Judgement:

hitcompu this.i,this.dmg,this.flyx+1,this.flyy+1;

^-- this obviously hits baddies fine but, in the same NPC,

hitplayer this.i,this.dmg,this.flyx+1,this.flyy+1;

^-- does absolutely nothing to a player.

Worked by index and only works within about, 10 tiles of the player.

function hitstuff(){ for(this.i=1;this.i<playerscount;this.i++){ if(((this.flyx-(players[this.i].x+0.5))^2)+((this.flyy-(players[this.i].y+1))^2)<9 &&players[this.i].hearts>0){ this.dmg=abs(int((players[this.i].ap-playerap)/50)); if(magicendowed){ if(this.dmg>playermp) this.dmg=playermp; playermp-=this.dmg; }else{ if(this.dmg>playerdarts) this.dmg=playerdarts; playerdarts-=this.dmg; } if(haveswordlvl3) this.dmg+=1.5; else if(haveswordlvl2) this.dmg++; else this.dmg+=0.5; hitplayer this.i,this.dmg,this.flyx+1,this.flyy+1; } }

??

hitplayer sucks. Use hitobject

Ah yes… hitobjects -_-… the fuck is hitplayer for then.

On a sidenote: Knife of Judgement2 definitely outranking lvl3 mace now _.

On another sidenote: It seems like it’s always doing one heart of damage. Even with variables like

hitobjects playerswordpower*0.5,playerx-1,playery-1;

So if your swordpower is 3, It’l always hit for one heart instead of 1.5.

playerswordpower/2 > playerswordpower*0.5

wtf?

if(magicallyendowed){}

Flag is true.

wut :B?

BUMP THIS: Why is hitobjects always hitting for one heart?

Use a custom damage system?

I can write you one in like a minute.

That’d be straight _, but easily fittable into every NPC that damages people? Or just something utilizing hitobjects already :B

Uses default HP, just instead of using hitobjects you’d use something like:

callweapon strtofloat(#s(client.hurtsystemid)),hurtplayer,x,y,width,height,power;

or

callweapon strtofloat(#s(client.hurtsystemid)),hurtplayer,x,y,radius,power;

And then the hurt system weapon would send out a shoot at -10, -10 with a life time of 0.05 with the specified X Y and power as parameters and hurt players within the width and height or radius parameters.

That sounds decent _