Status

12/25/2013 09:10 Magnus_#1
Hi guys,

Can you please gimme the code for this? I want to make the status HP, for example if my HP is 10000 it will only put in the status HP: 10k/10k
12/25/2013 12:13 Serenity-.#2
Thats cooler than the full HP :D
Lumex Flyff had it like that :D
12/25/2013 12:23 ©ross#3
ehrm it sounds very simple.... in php i would write it.
PHP Code:
if($hp >= 10000 AND $hp 20000){
 
$hp .= '10k';

afaik it is the same in C++ - only the variables are different :)


PS: Falls ich müll laber sagen^^ - Vom src wie so oft gesagt net viel Ahnung, deswegen assoziier ich das meiste mit PHP
12/25/2013 13:34 Marv!n#4
Quote:
Originally Posted by ©ross View Post
ehrm it sounds very simple.... in php i would write it.
PHP Code:
if($hp >= 10000 AND $hp 20000){
 
$hp .= '10k';

afaik it is the same in C++ - only the variables are different :)


PS: Falls ich müll laber sagen^^ - Vom src wie so oft gesagt net viel Ahnung, deswegen assoziier ich das meiste mit PHP
It points in the right direction, buy what if my HP is 11000 or 15000 or over 1 million? Create a big if-else construct?

As same as ©ross I dont know anything about C++ buy a little bit about PHP. I guess, no flyff player will get more than 100 million HP, also it would be great, if there are one to two decimal places (10k HP is a little inaccurate, 10.2k would be better).
PHP Code:
$strHP PLAYERS_HP_AS_INTEGER;

if(
$strHP >= 1000000) {
 
$strHP round($strHP 10000001) . 'm';
}
elseif(
$strHP >= 1000) {
 
$strHP round($strHP 10001) . 'k';

But I dont know where you find the sourcecode for the HP status. Also I dont know, if its clever to use the same variable.
12/25/2013 16:01 Magnus_#5
Quote:
Originally Posted by Xxl3lubbs View Post
It points in the right direction, buy what if my HP is 11000 or 15000 or over 1 million? Create a big if-else construct?

As same as ©ross I dont know anything about C++ buy a little bit about PHP. I guess, no flyff player will get more than 100 million HP, also it would be great, if there are one to two decimal places (10k HP is a little inaccurate, 10.2k would be better).
PHP Code:
$strHP PLAYERS_HP_AS_INTEGER;

if(
$strHP >= 1000000) {
 
$strHP round($strHP 10000001) . 'm';
}
elseif(
$strHP >= 1000) {
 
$strHP round($strHP 10001) . 'k';

But I dont know where you find the sourcecode for the HP status. Also I dont know, if its clever to use the same variable.
Where should i put this code? Btw, thanks ;)
12/25/2013 18:07 Serenity-.#6
Wäre nicht schlecht wenn das ganz released wird und genau beschrieben wird wo was rein muss usw.
12/25/2013 18:18 Iban24#7
Wäre nicht schlecht wenn ihr mal selber was machen würdet. ;)

[Only registered and activated users can see links. Click Here To Register...]