Thread: setshootdamage
View Single Post
  #41  
Old 05-17-2002, 01:25 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Neonight

Jeff sayeth:

Kai, only the complicated NPCs take a few minutes. Many of the Classic NPCs, from my understanding and experience, are actually rather simple. Most of them could be rewritten if they couldn't be converted...in fact, the longest step would be changing lots of graphics to either setshape or a gani.

Okay, but you did that script wrong. I'll give ya the fixed version, which looks a little more complicated.

NPC Code:

if(actionserverside){
if(playerdarts>0){
playerdarts--;
tempx=playerx; tempy=playery; temp=playerid;
for(this.i=0;this.i<playerscount;this.i++){
with(players[this.i]){
if(playerid!=temp){
if(((playerx-tempx)^2)+((playery-tempy)^2)<100){
hitplayer this.i,playerswordpower,playerx,playery;
//I'm not even sure about this part. I don't think hitplayer works serverside, but hurt wouldn't allow specific hurtdx/dys
}
}
}
}
}
}
//#CLIENTSIDE
if(weaponfired&&playerdarts>0){
triggeraction 0,0,serverside,#w,;
}

__________________
Reply With Quote