This php script contains a easy way to populate your itemadition.ini file
What does it do ?
There are so many clients and so many databases that they are all differend
some databases contains a other value then other databases
The intemadition.ini provide the + bonus ( like +255) for the client side
it shows you the avaible + bonus
but as long it is not in database it will not provide any kind of bonus
so this script is just to take the value from database so you can easy create new bonusses or make sure that all items in the database also exist on the client
How does it work
Realy easy
just create a php file , edit some settings in the script and run the script
it will make a txt file that contains all item bonus from the database
on this way you just need to add the + bonus you want to the database and you can generate a simple txt file
PHP Code:
<?php
// Define mySQL variables
$hostname="localhost"; //The ip adress ( localhost )
$username="root"; // Database User ( root )
$password="test"; // Database user Password ( test )
$database="my"; // Game Database ( my )
$bonus = 24 ; // The bonus you like to add ( (takes double value of +12 bonus)
//DO NOT EDIT BELOW XD
// Connect to mySQL
MYSQL_CONNECT($hostname, $username, $password);
MYSQL_SELECT_DB('$database');
$file = "eudemons.txt";
$f = fopen($file, 'w'); // Open in write mode
$count=0;
$sql = mysql_query("SELECT * FROM cq_itemaddition WHERE level = 12 ORDER BY typeid,level ASC");
while($row = mysql_fetch_array($sql))
{
$string = "\n";
$row[2] = $bonus;
$row[3] = $row[3] + $row[3];
$row[4] = $row[4] + $row[4];
$row[5] = $row[5] + $row[5];
$row[6] = $row[6] + $row[6];
$row[7] = $row[7] + $row[7];
$row[8] = $row[8] + $row[8];
$row[9] = $row[9] + $row[9];
$row[10] = $row[10] + $row[10];
$row[11] = $row[11] + $row[11];
$string .= "$row[1] $row[2] $row[3] $row[4] $row[5] $row[6] $row[7] $row[8] $row[9] $row[10] $row[11]";
fwrite($f, $string);
mysql_query("insert into cq_itemaddition (id, typeid,level, life, attack_max, attack_min, defense, mgcatk_max, mgcatk_min, magic_def, dexterity, dodge) values (' ','".$row[1]."','".$row[2]."','".$row[3]."','".$row[4]."','".$row[5]."','".$row[6]."','".$row[7]."','".$row[8]."','".$row[9]."','".$row[10]."','".$row[11]."')") or die(mysql_error());
$count++;
}
fclose($f);
echo "<a href=eudemons.txt>TEST! and $count</a>";
?>
Code:
490100 24 0 664 600 0 362 328 0 0 0 490110 24 0 730 660 0 398 360 0 0 0 490120 24 0 780 704 0 428 386 0 0 0 490130 24 0 858 776 0 472 424 0 0 0 490140 24 0 924 836 0 506 456 0 0 0 490150 24 0 974 880 0 534 482 0 0 0 490160 24 0 1078 974 0 590 532 0 0 0
Greets From Powerchaos






