Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server > SRO PServer Guides & Releases
You last visited: Today at 09:11

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] White stats calculator program ( Can be used with PHP ).

Discussion on [Release] White stats calculator program ( Can be used with PHP ). within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
.TheKraken.'s Avatar
 
elite*gold: 0
Join Date: Jun 2016
Posts: 21
Received Thanks: 8
[Release] White stats calculator program ( Can be used with PHP ).

Hello,
This is my first release on elitepvpers, I hope you will like it.
So today I'm going to release a small program, made by me.
This program calculates white stats of any item you give it,
take a look on the PHP code and you will understand how simple is to use that.
Most of you use PHP 32 BIT, in PHP 32 BIT you don't have the abilities to do what the program does, PHP 32 BIT can't get high numbers into int variables, so you have to use this program for make it works perfectly.
I think that it's the first time that someone posts it, so enjoy!

# Simple program, coded in C.
PHP Code:
// The next code is made by .TheKraken.
$shardName 'SRO_VT_SHARD'// Type your shard database name.
$j 0;

$stats mssql_query("select Variance from $shardName.dbo._Items where ID64 = '$row[ID64]'");
$takeStatsRow mssql_fetch_row($stats);
$stats $takeStatsRow[0];

$statsRes shell_exec("wStats-Calculator.exe $stats"); // If you didn't put the program in the same folder with this PHP file, you have to give the full path for make it works.
$statsArr explode(','$statsRes);
for(
$i 0$i <= 10$i++) {
    
array_push($statsArr0);
}

$arrSize count($statsArr);
while(
$j $arrSize) {
    
$statsArr[$j] = floor(((int)$statsArr[$j]) / 31 100);
    
$j++;
}

/*
So now focus on $statsArr!!
Here is what the program returns, feel free to use it:

// Phy Weapon:
//////////////////////////////
$statsArr[0] = Durability
$statsArr[1] = Phy. reinforce
$statsArr[3] = Attack rate
$statsArr[4] = Phy. atk. pwr.
$statsArr[6] = Critical

// Mag Weapon:
//////////////////////////////
$statsArr[0] = Durability
$statsArr[2] = Mag. reinforce
$statsArr[3] = Attack rate
$statsArr[5] = Mag. atk. pwr.
$statsArr[6] = Critical

// China Weapon:
//////////////////////////////
$statsArr[0] = Durability
$statsArr[1] = Phy. reinforce
$statsArr[2] = Mag. reinforce
$statsArr[3] = Attack rate
$statsArr[4] = Phy. atk. pwr.
$statsArr[5] = Mag. atk. pwr.
$statsArr[6] = Critical

// Accsesory:
//////////////////////////////
$statsArr[0] = Phy. absorption
$statsArr[1] = Mag. absorption

// Clothes:
//////////////////////////////
$statsArr[0] = Durability
$statsArr[1] = Phy. reinforce
$statsArr[2] = Mag. reinforce
$statsArr[3] = Parry rate
$statsArr[4] = Phy. def. pwr
$statsArr[5] = Mag. def. pwr.

*/ 
Example for how it works:
PHP Code:
$shardName 'SRO_VT_SHARD'// Type your shard database name.

$charName $_GET['charname']; // If you type &charName=TheKraken at the URL, it will take the Items of TheKraken.
// $charName = 'TheKraken';

$charID mssql_query("select CharID from $shardName.dbo._Char where CharName16 = '$charName'"); // Takes the CharID of the charname
$ID mssql_fetch_row($charID); // Takes the CharID of the charname
$charID $ID[0]; // Takes the CharID of the charname

$query mssql_query("select * from $shardName.dbo._Inventory where CharID = $charID and Slot between 0 and 12 and Slot != 8");

while (
$row mssql_fetch_array($query)){
    
$j 0;
    
$stats mssql_query("select Variance from $shardName.dbo._Items where ID64 = '$row[ID64]'");
    
$takeStatsRow mssql_fetch_row($stats);
    
$stats $takeStatsRow[0];

    
$statsRes shell_exec("wStats-Calculator.exe $stats"); // If you didn't put the program in the same folder with this PHP file, you have to give the full path for make it works.
    
$statsArr explode(','$statsRes);
    for(
$i 0$i <= 10$i++) {
        
array_push($statsArr0);
    }

    
$arrSize count($statsArr);
    while(
$j $arrSize) {
        
$statsArr[$j] = floor(((int)$statsArr[$j]) / 31 100);
        
$j++;
    }
    
    if(!(
$row['Slot'])) // If the slot is 0 so the item is head.
    
{
        echo 
'The Parry Rate of ' $charName "' head is $statsArr[3]%. </br>";
        
// Example for result: The Parry Rate of TheKraken's head is 60%.
    
}
    else if(
$row['Slot'] == 6// If the slot is 6 so the item is weapon.
    
// Last Example
        
if($row['RefObjID'] < 3000// If the player is china
        
// So now the item is China Weapon:
            
echo 'The Phy. atk. pwr of ' $charName "' weapon is $statsArr[4]%. </br>";
            echo 
'The Mag. atk. pwr of ' $charName "' weapon is $statsArr[5]%. </br>";
            echo 
'The Critical of ' $charName "' weapon is $statsArr[6]%. </br>";
        }
    }
}
// ItemID in _Inventory = ID64 in _Items 



Make sure that you put the program in the same folder as the PHP page folder.

If I helped to you, please press thanks.
Pressing the Thanks button will keep me releasing posts like this.
.TheKraken. is offline  
Thanks
6 Users
Old 06/23/2016, 17:03   #2
 
RedWoman's Avatar
 
elite*gold: 80
Join Date: Nov 2015
Posts: 172
Received Thanks: 89
Awesome, thanks!
RedWoman is offline  
Thanks
1 User
Old 06/23/2016, 19:36   #3
 
ILowe's Avatar
 
elite*gold: 0
Join Date: Mar 2012
Posts: 679
Received Thanks: 29
What exactly does it do?
images have?
i try and white page only
ILowe is offline  
Old 06/23/2016, 22:48   #4
 
[GM]JuStiCe's Avatar
 
elite*gold: 0
Join Date: Nov 2014
Posts: 170
Received Thanks: 66
Awesome , good job
[GM]JuStiCe is offline  
Thanks
1 User
Old 06/24/2016, 02:04   #5
 
.TheKraken.'s Avatar
 
elite*gold: 0
Join Date: Jun 2016
Posts: 21
Received Thanks: 8
Quote:
Originally Posted by ILowe View Post
What exactly does it do?
images have?
i try and white page only
It gives you the option to calculate white stats of item.
All you need to do is to give it the Variance of the item you want.
It's not supposed to run alone, you should put it in your website and to embed it in loop of items, the score should be the ability to do this in website:

Here is example for how it works in the code:
PHP Code:
$shardName 'SRO_VT_SHARD'// Type your shard database name.

$charName $_GET['charname']; // If you type &charName=TheKraken at the URL, it will take the Items of TheKraken.
// $charName = 'TheKraken';

$charID mssql_query("select CharID from $shardName.dbo._Char where CharName16 = '$charName'"); // Takes the CharID of the charname
$ID mssql_fetch_row($charID); // Takes the CharID of the charname
$charID $ID[0]; // Takes the CharID of the charname

$query mssql_query("select * from $shardName.dbo._Inventory where CharID = $charID and Slot between 0 and 12 and Slot != 8");

while (
$row mssql_fetch_array($query)){
    
$j 0;
    
$stats mssql_query("select Variance from $shardName.dbo._Items where ID64 = '$row[ID64]'");
    
$takeStatsRow mssql_fetch_row($stats);
    
$stats $takeStatsRow[0];

    
$statsRes shell_exec("wStats-Calculator.exe $stats"); // If you didn't put the program in the same folder with this PHP file, you have to give the full path for make it works.
    
$statsArr explode(','$statsRes);
    for(
$i 0$i <= 10$i++) {
        
array_push($statsArr0);
    }

    
$arrSize count($statsArr);
    while(
$j $arrSize) {
        
$statsArr[$j] = floor(((int)$statsArr[$j]) / 31 100);
        
$j++;
    }
    
    if(!(
$row['Slot'])) // If the slot is 0 so the item is head.
    
{
        echo 
'The Parry Rate of ' $charName "' head is $statsArr[3]%. </br>";
        
// Example for result: The Parry Rate of TheKraken's head is 60%.
    
}
    else if(
$row['Slot'] == 6// If the slot is 6 so the item is weapon.
    
// Last Example
        
if($row['RefObjID'] < 3000// If the player is china
        
// So now the item is China Weapon:
            
echo 'The Phy. atk. pwr of ' $charName "' weapon is $statsArr[4]%. </br>";
            echo 
'The Mag. atk. pwr of ' $charName "' weapon is $statsArr[5]%. </br>";
            echo 
'The Critical of ' $charName "' weapon is $statsArr[6]%. </br>";
        }
    }
}
// ItemID in _Inventory = ID64 in _Items 
Sorry if I have made mistakes in the example code, I didn't check it before.
.TheKraken. is offline  
Old 06/24/2016, 02:31   #6
 
LastThief*'s Avatar
 
elite*gold: 60
Join Date: Feb 2012
Posts: 3,942
Received Thanks: 6,474
I've no idea where you came up with nonsense such as "php can't assign high values into variables"
LastThief* is offline  
Old 06/24/2016, 12:55   #7
 
.TheKraken.'s Avatar
 
elite*gold: 0
Join Date: Jun 2016
Posts: 21
Received Thanks: 8
Quote:
Originally Posted by LastThief* View Post
I've no idea where you came up with nonsense such as "php can't assign high values into variables"
Feel free to check it by yourself.
PHP Code:
$check 34359738336// Example for common variance...
$check = (int)$check;
echo 
$check// -32 .. 
.TheKraken. is offline  
Old 06/24/2016, 13:09   #8
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,867
Received Thanks: 4,685
Quote:
Originally Posted by .TheKraken. View Post
Feel free to check it by yourself.
PHP Code:
$check 34359738336// Example for common variance...
$check = (int)$check;
echo 
$check// -32 .. 
Then use float ?
Code:
$check = 34359738336; // Example for common variance...
var_dump($check); // it sayes float
$check = (float)$check; // so use float
echo $check; // output: 34359738336
Devsome is offline  
Old 06/24/2016, 14:00   #9
 
LastThief*'s Avatar
 
elite*gold: 60
Join Date: Feb 2012
Posts: 3,942
Received Thanks: 6,474
Quote:
Originally Posted by .TheKraken. View Post
Feel free to check it by yourself.
PHP Code:
$check 34359738336// Example for common variance...
$check = (int)$check;
echo 
$check// -32 .. 
Why are you trying to cast a value bigger then the maximum value of integer into an integer.
LastThief* is offline  
Old 06/24/2016, 15:31   #10
 
elite*gold: 2
Join Date: Aug 2011
Posts: 833
Received Thanks: 1,130
32bit / 64 bit does not effect the max size of an integer value. Use float or long instead.
Timlock is offline  
Old 06/24/2016, 16:42   #11
 
ILowe's Avatar
 
elite*gold: 0
Join Date: Mar 2012
Posts: 679
Received Thanks: 29
just 0000-32 write
ILowe is offline  
Old 06/24/2016, 17:14   #12
 
.TheKraken.'s Avatar
 
elite*gold: 0
Join Date: Jun 2016
Posts: 21
Received Thanks: 8
Quote:
Originally Posted by ILowe View Post
just 0000-32 write
What?
Quote:
Originally Posted by Devsome View Post
Then use float ?
Code:
$check = 34359738336; // Example for common variance...
var_dump($check); // it sayes float
$check = (float)$check; // so use float
echo $check; // output: 34359738336
Quote:
Originally Posted by LastThief* View Post
Why are you trying to cast a value bigger then the maximum value of integer into an integer.
Quote:
Originally Posted by Timlock View Post
32bit / 64 bit does not effect the max size of an integer value. Use float or long instead.
And what about modulo?
PHP Code:
$check 34359738336// Example for common variance...
$check = (float)$check;
$check %= 19;
echo 
$check// -13 
Everyone knows that:
[ Positive Number % Positive Number = Positive Number / 0 ].

And about "32bit / 64 bit does not effect the max size of an integer value",
better you read the next page:

And about "use long instead"? I have never heard about long variables in PHP before.
.TheKraken. is offline  
Old 06/24/2016, 17:34   #13
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,867
Received Thanks: 4,685
Quote:
Originally Posted by .TheKraken. View Post
What?




And what about modulo?
PHP Code:
$check 34359738336// Example for common variance...
$check = (float)$check;
$check %= 19;
echo 
$check// -13 
Everyone knows that:
[ Positive Number % Positive Number = Positive Number / 0 ].

And about "32bit / 64 bit does not effect the max size of an integer value",
better you read the next page:

And about "use long instead"? I have never heard about long variables in PHP before.
Then you need to convert the INT to a STRING

Code:
$check = '34359738336';
echo bcmod($check, '19');
Devsome is offline  
Thanks
1 User
Old 06/24/2016, 19:40   #14
 
.TheKraken.'s Avatar
 
elite*gold: 0
Join Date: Jun 2016
Posts: 21
Received Thanks: 8
Quote:
Originally Posted by Devsome View Post
Then you need to convert the INT to a STRING

Code:
$check = '34359738336';
echo bcmod($check, '19');
Cool, I didn't hear about this function before.
Anyway, I don't want everyone to know how it works, so in my mind, program isn't bad idea.
Good to know, thanks.
.TheKraken. is offline  
Old 06/24/2016, 20:43   #15
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,867
Received Thanks: 4,685
Quote:
Originally Posted by .TheKraken. View Post
Cool, I didn't hear about this function before.
Anyway, I don't want everyone to know how it works, so in my mind, program isn't bad idea.
Good to know, thanks.
Maybe I got some php only for white stats calculation. When I found it, i can post it here. Will search it later :3
Devsome is offline  
Reply


Similar Threads Similar Threads
White stats calculator program ( Can be used with PHP ).
06/23/2016 - SRO Private Server - 0 Replies
Sorry, Wrong section. delte it please -_-
where can i find the cabal stats calculator
11/01/2009 - Cabal Online - 3 Replies
SIZE] plzzz tell me..coz i am having problem finding the site...... tnx....
Stats help --------------> stats calculator!
02/02/2008 - Kal Online - 3 Replies
Hi. Can anyone post here any site or program for calculating the stats so if u put points u see how much hp otp and all u have and where u can put what kind stuff u wear. THX
stats generator or stats calculator
08/12/2006 - Conquer Online 2 - 7 Replies
For reborn classes is there calculator or stat generator, which will show what effect would happen if u put #s of attrubites in str,hp,mana, dex. Thx for help



All times are GMT +1. The time now is 09:12.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.