Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Strange behaviour of a variable :/ (https://forums.graalonline.com/forums/showthread.php?t=24577)

Loriel 02-25-2002 09:48 PM

Strange behaviour of a variable :/
 
client.attrib.hp is 9999, here.
NPC Code:

hp = strtofloat(#s(client.attrib.hp));
setplayerprop #c,#v(hp) #v(strtofloat(#s(client.attrib.hp)));



Result: "1807 9999"
Are "hp"-variables limited somehow?
The hp thingie is acting as if I did hp = strtofloat(#s(client.attrib.hp))%2048;

Strangely, the mp are working fine, though using the very same thingie.

Admins 02-25-2002 10:02 PM

hp is an internal variable and is the same like 'hearts',
so its the power of the npc

btedji 02-25-2002 10:05 PM

Quote:

Originally posted by Stefan
hp is an internal variable and is the same like 'hearts',
so its the power of the npc

When did those types of variables come about?

Loriel 02-25-2002 11:38 PM

Quote:

Originally posted by Stefan
hp is an internal variable and is the same like 'hearts',
so its the power of the npc

*hates internal variables*
Remove it k?
Why can hp go up to 2048, while playerhp only goes to ... less, probably?

Saga2001 02-25-2002 11:59 PM

I believe the hp and stuff have been around for a while...


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

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