Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Playerfullhearts? (https://forums.graalonline.com/forums/showthread.php?t=50203)

jake13jake 01-06-2004 08:01 AM

Playerfullhearts?
 
Is there any way to increase a player's full hearts without a chest? playerfullhearts=# doesn't seem to really work, and I've tried several conditions. Maybe it's something you can't do in offline mode?

Loriel 01-06-2004 09:38 AM

Re: Playerfullhearts?
 
It does work online, serverside, probably within the limits the appropriate server option sets you.

D1ce2 01-06-2004 11:14 AM

Like this:

NPC Code:


if(actionserverside){
playerhearts = playerfullhearts;
}
//#CLIENTSIDE
if(created){
triggeraction 0,0,serverside,weaponame,param1,param2;
}



That's how you get to serverside by using triggeractions :)

GoZelda 01-06-2004 12:43 PM

Quote:

Originally posted by D1ce2
Like this:

NPC Code:


if(actionserverside){
playerhearts = playerfullhearts;
}
//#CLIENTSIDE
if(created){
triggeraction 0,0,serverside,weaponame,param1,param2;
}



That's how you get to serverside by using triggeractions :)

That isn't really good to do, but i guess you were givin' him the general idea.

D1ce2 01-06-2004 03:20 PM

Quote:

Originally posted by GoZelda

That isn't really good to do, but i guess you were givin' him the general idea.

I don't care if you can do any better, atleast I give the general idea on how it goes.

osrs 01-06-2004 04:24 PM

Quote:

Originally posted by D1ce2
Like this:

NPC Code:


if(actionserverside){
playerhearts = playerfullhearts;
}
//#CLIENTSIDE
if(created){
triggeraction 0,0,serverside,weaponame,param1,param2;
}



That's how you get to serverside by using triggeractions :)

Your script is acting like a healer, he wants to add +1 heart.

Loriel 01-06-2004 04:28 PM

... it is so unneccessary to trigger the server to set the playerhearts. Also, the question was about setting playerfullhearts, not playerhearts.

D1ce2 01-06-2004 04:48 PM

Ah I missunderstood. I didn't have to trigger it, since it dosn't need to be a weapon. I understand my mistake.

Loriel 01-06-2004 05:18 PM

But still - playerhearts is clientsidely writeable.

-Ramirez- 01-06-2004 06:09 PM

Quote:

Originally posted by Loriel
But still - playerhearts is clientsidely writeable.
No doubt only due to the need for the clientside-only engine. It seems likely that it would change in 3.1, as it would be more secure.

D1ce2 01-06-2004 08:33 PM

Quote:

Originally posted by Loriel
But still - playerhearts is clientsidely writeable.
I wasn't aware of that.

jake13jake 01-06-2004 11:49 PM

umm... wow.... -straight forward- Does that mean it's currently possible, or no?

Loriel 01-06-2004 11:56 PM

NPC Code:
if (playertouchsme) {
if (!got_fullheart) {
playerfullhearts ++;
say2 I grant thee new powers!;
} else say I shall heel thy wounds!;
playerhearts = playerfullhearts;
}


:cool:

D1ce2 01-06-2004 11:58 PM

Quote:

Originally posted by Loriel
NPC Code:
if (playertouchsme) {
if (!got_fullheart) {
playerfullhearts ++;
say2 I grant thee new powers!;
} else say I shall heel thy wounds!;
playerhearts = playerfullhearts;
}


:cool:

You are Cool :cool:
(You spelt heal wrong though!);)

-Ramirez- 01-07-2004 12:37 AM

Not to mention that got_fullheart flag check is completely pointless. In the visible script at least. ;)

zell12 01-07-2004 01:17 AM

why dont you just add client flags every time they get a full heart? For every client.hearts=# a new full heart is added.

Loriel 01-07-2004 01:23 AM

I WAS TIRED :(
(I still am.)

jake13jake 01-07-2004 07:31 AM

So can you only add playerfullhearts online? I can't get anything to work offline having to do with changing playerfullhearts-- unless I use the chest. Loriel, your script doesn't work, either. I don't really understand why I can't... I'd assume since you could get fullhearts in chests (offline), that you'd be able to add them using a script, but I just can't get it.

D1ce2 01-07-2004 03:46 PM

Remove the flag for it to work.

-Ramirez- 01-07-2004 04:43 PM

Normally I wouldn't do anything that would help him in any way, since I can't stand him, however... he IS correct. Increasing full hearts with that variable doesn't work. It may work serverside, sure, but that's not what he's doing, he's doing it in offline mode. Try it yourself, you'll find that it DOESN'T work.


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

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