Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Custom Damage System (https://forums.graalonline.com/forums/showthread.php?t=68255)

excaliber7388 08-21-2006 05:12 AM

Custom Damage System
 
So anyway, DR will now be more of an rpg server, and I'm gonna need a way to damage a player without hurt, hitplayer, etc.
I was thinking an action that is triggered when the damage is needed to be done, and where, and received by a system NPC that the other guy has, which would cause the damage. When the custom hp variable hits zero, the players hearts are set to zero, and dead.
So, would this work, is there a better way? Or am I completely off track?
hmm?

Angel_Light 08-21-2006 10:32 PM

umm you could completely script the player dieing aswell,

function onTimeOut() {
if (clientr.hp--) { //not sure about this
freezeplayer(1);
setani("hurt",NULL);
}
if (clientr.hp == "0") {
freezeplayer(1.2);
setani("dead",NULL);
}
}

excaliber7388 08-21-2006 10:34 PM

This seems to work (although using a similar system for attacking baddies doesn't work, see my other thread on that: http://forums.graalonline.com/forums...86#post1211986).
I was wondering if there was a better way to do this though.

ZeekTheMan2 08-23-2006 02:53 AM

have you tried using function onActionprojectile(){


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

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