[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.
[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($statsArr, 0); }
$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($statsArr, 0); }
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.
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($statsArr, 0); }
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.
$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
$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*
Why are you trying to cast a value bigger then the maximum value of integer into an integer.
Quote:
Originally Posted by Timlock
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.
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.
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
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