Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Dekaron > Dekaron Private Server
You last visited: Today at 12:28

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

Advertisement



Dekaron Farius' Server Files OLD + NEW csv merger.

Discussion on Dekaron Farius' Server Files OLD + NEW csv merger. within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
trashbr32's Avatar
 
elite*gold: 102
Join Date: May 2008
Posts: 31
Received Thanks: 32
Dekaron Farius' Server Files OLD + NEW csv merger.


Hello there everyone. Its good to be back. I been away from the Dekaron Scene for a long time ever since I closed Dekaron Ultra.

Due to nostalgic reasons, I came back to dekaron (not for too long just having fun injecting some dlls into Rising and Official server via Hypervisor lol...) and started playing some pservers for fun... Suddently I saw Farius' Release at

Thanks for the release I had a blast with your files.
Thanks Hellfire, I think I saw you a few times inside of IDA when I was reversing Dekaron.
Thanks negitivenrg and Thanks RoadK1LL for sharing your progressed files with us. Sorry if I missed anybody. I am already done with the project it was quite fun to be back even for a little while.

I am sharing some source code (dont mind the spaguetti).

The items that have duplicates in your current file Folder2, will be going to the root directory as a new file so you know exactly what is duplicated and needs manual work... or not maybe you can count them and throw indexes in there ++.

The only thing I didn't really like about these server files were the fact they were missing all the old armor and wepons I had a lot of fun with in 2moons and stuff...

When i realized how much work it was gonna be to manually add them (since some indexes were duplicate cuz some items got overwritten) I made this real quick to save me a few hours.

Maybe someone can find it useful. Just load up visual studio and compile, if any errors change to multibyte and ISO C++17 Standard (/std:c++17). It could be expanded upon, but I think I had my fun here. For now

It's a one pager im not even gonna upload the solution.
Just update the folder1 and folder2 path (i recommend copying the files to a separate work folder. And boom.) Video included jst in case.

I missed Dekaron!

Just use option 1, then 0; Video tut included. Nothing special but maybe it can help someone safe some time.


Code:
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <windows.h>
#include <set>
#include <filesystem>

namespace fs = std::filesystem;


std::vector<std::string> split(const std::string& s, char delimiter) {
    std::vector<std::string> tokens;
    std::string token;
    std::istringstream tokenStream(s);
    while (std::getline(tokenStream, token, delimiter)) {
        tokens.push_back(token);
    }
    return tokens;
}

// Function to set console text color
void SetConsoleColor(WORD color) {
    HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleTextAttribute(hConsole, color);
}

enum Condition { Duplicate, LessThan, EqualTo, GreaterThan };

int main() {
    std::string line1, line2;
    int column, conditionType, conditionValue;
    std::vector<std::string> toAppendToFile2;
    std::set<std::string> indices;
    int countFile2 = 0, countFile3 = 0;  

    std::cout << "Column to compare: ";
    std::cin >> column;
    std::cout << "Condition Not Allowed : \n0 - Duplicate\n1 - Less than\n2 - Equal to\n3 - Greater than): \n";
    std::cin >> conditionType;
    if (conditionType != 0) {
        std::cout << "Condition Value: ";
        std::cin >> conditionValue;
    }
    Condition condition = static_cast<Condition>(conditionType);

    for (const auto& entry : fs::directory_iterator("C:\\Users\\Administrator\\Desktop\\modify\\itemarmor\\folder1")) {
        if (entry.path().extension() == ".csv") {
            std::string filename = entry.path().filename().string();
            std::string filepath2 = "C:\\Users\\Administrator\\Desktop\\modify\\itemarmor\\folder2\\" + filename;
            if (!fs::exists(filepath2)) {
                continue;  // Skip if the file doesn't exist in folder2
            }
            std::ifstream file1(entry.path()), file2(filepath2);

            if (file1.is_open() && file2.is_open()) {
                // Read all lines from file2 first
                while (std::getline(file2, line2)) {
                    std::vector<std::string> tokens = split(line2, ',');
                    indices.insert(tokens[column - 1]);
                }
                file2.close();

                std::ofstream file3("file3_" + filename), file2Out(filepath2, std::ios_base::app);

                if (file3.is_open() && file2Out.is_open()) {
                    while (std::getline(file1, line1)) {
                        std::vector<std::string> tokens = split(line1, ',');
                        std::string index1 = tokens[column - 1];
                        bool match = false;
                        switch (condition) {
                        case Duplicate:
                            match = (indices.find(index1) != indices.end());
                            break;
                        case LessThan:
                            match = (stoi(index1) < conditionValue);
                            break;
                        case EqualTo:
                            match = (stoi(index1) == conditionValue);
                            break;
                        case GreaterThan:
                            match = (stoi(index1) > conditionValue);
                            break;
                        }
                        if (match) {
                            file3 << line1 << "\n";
                            SetConsoleColor(FOREGROUND_RED);
                            std::cout << "Moved to file3: " << index1 << "\n";
                            SetConsoleColor(FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED); // Reset to default
                            countFile3++;  // Increment count for file3
                        }
                        else {
                            file2Out << line1 << "\n";
                            SetConsoleColor(FOREGROUND_GREEN);
                            std::cout << "Moved to file2: " << index1 << "\n";
                            SetConsoleColor(FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED); // Reset to default
                            countFile2++;  // Increment count for file2
                        }
                    }
                    file1.close();
                    file3.close();
                    file2Out.close();
                    // Print the final report
                    std::cout << "\n--- Report ---\n";
                    std::cout << "Lines moved to file2: " << countFile2 << "\n";
                    std::cout << "Lines moved to file3: " << countFile3 << "\n";
                    //system("pause");
                }
                else {
                    std::cerr << "Unable to open output files.\n";
                    return 1;
                }
            }
            else {
                std::cerr << "Unable to open input files.\n";
                return 1;
            }
        }
    }
    system("pause");
    return 0;
}
trashbr32 is offline  
Thanks
7 Users
Old 07/04/2023, 12:07   #2
 
krofighter's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 99
Received Thanks: 93
Nice release, but I fear it'll be too complicated to setup. We all know that this forum is filled with leechers that barely put effort into understanding stuff, hell even reading a forum post is difficult.

If you want to help them out as well I suggest you change the paths where the user doesn't have to touch the src or simply always write to the C drive. This would obviously require you to upload the executable. The people that can find their way around VS can compile and adjust the src themselves.

Just a small thought
krofighter is offline  
Old 07/04/2023, 22:40   #3
 
trashbr32's Avatar
 
elite*gold: 102
Join Date: May 2008
Posts: 31
Received Thanks: 32
Quote:
Originally Posted by krofighter View Post
Nice release, but I fear it'll be too complicated to setup. We all know that this forum is filled with leechers that barely put effort into understanding stuff, hell even reading a forum post is difficult.

If you want to help them out as well I suggest you change the paths where the user doesn't have to touch the src or simply always write to the C drive. This would obviously require you to upload the executable. The people that can find their way around VS can compile and adjust the src themselves.

Just a small thought
Hey. I get it some ppl can be pretty lazy lmao!. I shoulda done like an Imgui gui, but this thing isnt worth the effort at it current state, It was jst a quick script so I didnt have to check 20 000 items plus 1 by 1.

Maybe if I continue with the project, I could re-do the whole thing real nice, with a nice GUI, so ppl can click on a MAP, move the npcs arround, add npcs teleport, all with button clicks...

But lol. I don't know if Dekaron is gonna hype me enough . I have an old harddrive at m mother's house, i dont know if it still works lmao. when I swing by there I will buy a IDE adapter and get my old files.

My old admin too was pretty beefy. U would for example click on brainken from the map list, then map would load into a directx 9 window, then you could drag the npcs arround..., change their parameters, you could edit the database binary data.

I'm old now, I dont know if I have the gas to get into these kinds of projects too deep. This stuff can take months to align to a proper state.
trashbr32 is offline  
Thanks
4 Users
Reply


Similar Threads Similar Threads
[Release] Expedition 4.0.3 Monster.csv, Info.csv, Maplist.csv, Warp.csv
09/28/2008 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 23 Replies
Here are a few of the more popular csv files from the Expedition patch. If you don't know what they are, or any way to use them, then don't worry about them. I like to have the current csv files handy because it makes it easier to find the offsets in the pack. There may be more uses...who knows. This maplist does have a zoomhack on it. Other than that I do not believe they have been modified but, I do not guarantee it.



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


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.