|
You last visited: Today at 16:37
Advertisement
[HELP]Looking for a genious
Discussion on [HELP]Looking for a genious within the Dekaron Private Server forum part of the Dekaron category.
09/07/2011, 01:28
|
#1
|
elite*gold: 0
Join Date: Jul 2009
Posts: 203
Received Thanks: 56
|
[HELP]Looking for a genious
I am adapting Korean Client to use it on a new client and I encounter the sad situation: only 19,000 (rounded) of 65000 index of item_shape are being used, and I had an idea: it would be nice if someone could put all index's in sequence on the client and then I remember to epvpers:''There is a lot of guys in epvpers smart, I will ask for their help! " And so here I am! Someone can help me ?
|
|
|
09/07/2011, 16:03
|
#2
|
elite*gold: 20
Join Date: Dec 2007
Posts: 1,450
Received Thanks: 833
|
So what do you want, just to get a list of items from all item files sorted by their IDs? Give me a few min...
Done, put the files at the same folder as the script, edit add or delete file names as you like. Results will be saved as output.csv
PHP Code:
<?php $files = array( 'itemarmor.csv', 'itemcash.csv', 'itemetc.csv', 'itemweapon.csv' ); foreach($files as $filename) { $file = file($filename); $flag = false; foreach($file as $row) { if(!$flag) { $flag = true; continue; } $expl = explode(',',$row); if($expl[0] == '') continue; $ids[] = $expl[0]; $rows[$expl[0]] = $row; } } sort($ids); foreach($ids as $id) { $newrows[$id] = $rows[$id]; } file_put_contents('output.csv',$newrows); ?>
|
|
|
09/07/2011, 23:20
|
#3
|
elite*gold: 0
Join Date: Jul 2009
Posts: 203
Received Thanks: 56
|
Thks dude ! awesome job !
Quote:
Originally Posted by Zombe
So what do you want, just to get a list of items from all item files sorted by their IDs? Give me a few min...
Done, put the files at the same folder as the script, edit add or delete file names as you like. Results will be saved as output.csv
PHP Code:
<?php $files = array( 'itemarmor.csv', 'itemcash.csv', 'itemetc.csv', 'itemweapon.csv' ); foreach($files as $filename) { $file = file($filename); $flag = false; foreach($file as $row) { if(!$flag) { $flag = true; continue; } $expl = explode(',',$row); if($expl[0] == '') continue; $ids[] = $expl[0]; $rows[$expl[0]] = $row; } } sort($ids); foreach($ids as $id) { $newrows[$id] = $rows[$id]; } file_put_contents('output.csv',$newrows); ?>
|
this code put the ids in sequence? like that,my problems its this: i shoud can put with a script like that reindex the files in sequence with the item_shape.csv ...
ex.:
(itemarmor)
101, argan armor,...
(item_shape)
101,....
the script put automaticly
(itemarmor)
1, argan armor,...
(item_shape)
1,....
|
|
|
09/10/2011, 06:47
|
#4
|
elite*gold: 0
Join Date: Jul 2009
Posts: 203
Received Thanks: 56
|
nobody's can help me? very sad =/
|
|
|
09/10/2011, 10:43
|
#5
|
elite*gold: 20
Join Date: Dec 2007
Posts: 1,450
Received Thanks: 833
|
Well I can, I just know it will take probably 2-3 hours, and I can't force myself to do it... :|
Cause you know, to change all IDs you'd need to change them not only in item_shape.csv and itemwhatever.csv, but you'd also need to change the upgrading pointers, if you can call it that, also edit all drops, and lastly generate and run one big-*** query made up of ~20k smaller queries, one for each ID...
I'm not sure if I want to spend so much time doing it all... :|
|
|
|
09/10/2011, 22:20
|
#6
|
elite*gold: 0
Join Date: Jul 2009
Posts: 203
Received Thanks: 56
|
Quote:
Originally Posted by Zombe
Well I can, I just know it will take probably 2-3 hours, and I can't force myself to do it... :|
Cause you know, to change all IDs you'd need to change them not only in item_shape.csv and itemwhatever.csv, but you'd also need to change the upgrading pointers, if you can call it that, also edit all drops, and lastly generate and run one big-*** query made up of ~20k smaller queries, one for each ID...
I'm not sure if I want to spend so much time doing it all... :|
|
Yeah...work a lot =/
|
|
|
All times are GMT +1. The time now is 16:37.
|
|