Graal Forums

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

xAndrewx 07-06-2010 08:53 PM

Default System- HP
 
Is there any way to make the default HP system only remove half a heart per two hits, so it takes four hits to hurt 1 full heart?

cbk1994 07-06-2010 08:56 PM

No.

xAndrewx 07-06-2010 09:03 PM

Found a fix

HTML Code:

function onPlayerHurt(hit) { 
  client.p_hits += 0.5;
  if (int(client.p_hits) = client.p_hits) {
    player.hearts += 0.5;
   
    if (client.p_hits > 50) client.p_hits = 0;
  }
}

Ha!

Crow 07-06-2010 09:27 PM

Quote:

Originally Posted by xAndrewx (Post 1586217)
Found a fix

HTML Code:

function onPlayerHurt(hit) { 
  client.p_hits += 0.5;
  if (int(client.p_hits) = client.p_hits) {
    player.hearts += 0.5;
   
    if (client.p_hits > 50) client.p_hits = 0;
  }
}

Ha!

That's more like a hackish workaround. Which could go wrong. Horribly wrong.

xAndrewx 07-06-2010 09:51 PM

Quote:

Originally Posted by Crow (Post 1586220)
That's more like a hackish workaround. Which could go wrong. Horribly wrong.

lol yeah- it's a shame too :[

DustyPorViva 07-06-2010 09:54 PM

You could, perhaps, at the expense of 10 fullhearts. Simply up the scale of everything x2. AKA, instead of 3 full hearts at the beginning, give them 6, and replace the default GUI with one that scales it correctly.

xAndrewx 07-06-2010 10:04 PM

Quote:

Originally Posted by DustyPorViva (Post 1586224)
You could, perhaps, at the expense of 10 fullhearts. Simply up the scale of everything x2. AKA, instead of 3 full hearts at the beginning, give them 6, and replace the default GUI with one that scales it correctly.

hmmm could work- but then there's a limit to the max full hearts of 16 :S

DustyPorViva 07-06-2010 10:05 PM

Quote:

Originally Posted by xAndrewx (Post 1586233)
hmmm could work- but then there's a limit to the max full hearts of 16 :S

20, if set in serveroptions, I think :)

xAndrewx 07-06-2010 10:26 PM

cool =D thank you


All times are GMT +2. The time now is 07:37 AM.

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