Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   setshootdamage (https://forums.graalonline.com/forums/showthread.php?t=29133)

Kaimetsu 05-17-2002 01:25 AM

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,;
}


Neonight 05-17-2002 06:17 AM


Jeff:

For scripts like that on Providence we use actionhit or actionattack or somesuch; HP or Control-NPC triggering or whatever is done by the victim's system NPC. Using some quick checks with <, <, and =, you could even theoretically determine which way the victim should fly (with onwall of course).

Kaimetsu 05-17-2002 03:01 PM

Quote:

Originally posted by Neonight

Jeff:

For scripts like that on Providence we use actionhit or actionattack or somesuch; HP or Control-NPC triggering or whatever is done by the victim's system NPC. Using some quick checks with <, <, and =, you could even theoretically determine which way the victim should fly (with onwall of course).

Indeed, however I did not want to define a whole new system just for the sake of this example.

Tyhm 05-18-2002 12:00 AM

Bleah. If NPCServ doesn't even have hitplayer, may as well keep Classic as vulnerable as it is and keep pushing for setshootnpc and setshootdamage.

Kaimetsu 05-18-2002 12:08 AM

Quote:

Originally posted by Tyhm
Bleah. If NPCServ doesn't even have hitplayer, may as well keep Classic as vulnerable as it is and keep pushing for setshootnpc and setshootdamage.
It doesn't need hitplayer. There are equivalents, but I don't know them at this time. Perhaps:

hurt 10;
hurtdx=4;
hurtdy=1;

would be sufficient. I just don't know.

Tyhm 05-18-2002 12:22 AM

Yeah, or hurtdx=playerx-paramx; hurtdy=playery-paramy; hurt paramdmg;

Kaimetsu 05-18-2002 12:35 AM

Quote:

Originally posted by Tyhm
Yeah, or hurtdx=playerx-paramx; hurtdy=playery-paramy; hurt paramdmg;
Well, yeah.

Neonight 05-18-2002 04:27 AM


Jeff:

Yes Tyhm, that should work.

I'd say an NPC server would actually save trouble in the future :)



All times are GMT +2. The time now is 08:55 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.