you need to put the files in that folder where is the skildata_*enc.txt
and you need to change .txt coding and change the $lvl variable what now 100
Good Luck
PHP Code:
<?php
error_reporting(0);
//file names -> after decode
// you need change coding to UTF-8
// after you runed this. you need chage the new files coding to Unicode
$files=array("Decoded_skilldata_5000enc.txt","Decoded_skilldata_10000enc.txt","Decoded_skilldata_15000enc.txt","Decoded_skilldata_20000enc.txt","Decoded_skilldata_25000enc.txt","Decoded_skilldata_30000enc.txt","Decoded_skilldata_35000enc.txt","Decoded_skilldata_40000enc.txt","Decoded_skilldata_45000enc.txt");
//the lvl what you need
$lvl=100;
$t=0;
Print("\nChanging Skill level to ".$lvl."\n\n\n");
foreach($files as $filename){ // while there are filenames in $files array
print("\nLoading\n");
$fp=fopen($filename,"r+"); // open the $files[x]
print($filename." try to read.");
$weapon= array(); // declare and inicialize $weapon array
$i=0;
$fid=false;
while($sor=fgets($fp,10240)){ // while there are more lines in the file
chop($sor); // delelete enters on the end of the line (delete \n)
$weapon[$i]=explode("\t",$sor); // split the line by the tabulators (\t)
$i=$i+1;
$fid=true;
}
if($fid){ // if fid = true -> there are file what name in $files array
$fs = fopen("new_".$filename, "w+"); // generate and open new_$files[x] file
print("\n".$filename." has opened.\n");
print("new_".$filename." has created");
}else{
print("\n".$filename." could not opened.");
}
while($i>0){
$i--;
$exploded=explode("_",$weapon[$i][3]); // split the skill name by _
if($exploded[0]=="SKILL" && $weapon[$i][36]>$lvl){ // weapont[$i][36] the level of the skill
$weapon[$i][0]=0; // rewrite the skill "Service" 0=off and 1=on
}
else{
$weapon[$i][0]=1; // rewrite the skill "Service" 0=off and 1=on
}
}
$ks=false;
foreach($weapon as $wep){ //while there are record in the $weapon array rename the line to $wep
$c = 1; //
foreach($wep as $dep){ //while there are record in the $wep array rename the line to $wep
if($c == count($wep)){ // if $c == count($wep) we in the last clumn
fwrite($fs,$dep); // write to new_$files[x] the weapon[]
}else{
fwrite($fs,$dep."\t");
$ks=true;
}
++$c;
}
}
if($ks==true){
print("\nnew_$filename successed\n\n");
$t++;
}
else{
print("\n".$filename." not valid\n\n");
}
}
print("\n".$t." File successed");
?>






