[Release] MapleRestarter

Page 4 of 4 FirstFirst 1234
Results 76 to 100 of 100
  1. #76
    Account Upgraded | Title Enabled! Dinosauru is offline
    MemberRank
    Mar 2008 Join Date
    Canada?Location
    610Posts

    Re: [Release] MapleRestarter

    Thanks so much

  2. #77
    Member pakakid1 is offline
    MemberRank
    Apr 2008 Join Date
    51Posts

    Re: [Release] MapleRestarter

    Well when i turn on the restarter ppl cannot connect, but without they can. And when i mean they cant connect i mean when they clock on their chars they get unable to connect. So any help?

    EDIT: NVM i got it to work somehow lol! Now my last problem is, when it restarts why do all the npc go away?
    EDIT: FIXED the NPC thing, thanks alot!
    Last edited by pakakid1; 22-04-08 at 02:19 AM.

  3. #78
    Valued Member falkman is offline
    MemberRank
    Apr 2008 Join Date
    124Posts

    Re: [Release] MapleRestarter

    No, you must not of copied a new file that you have.

  4. #79
    Delta Sparks is offline
    MemberRank
    Apr 2008 Join Date
    2,073Posts

    Re: [Release] MapleRestarter

    Ok... i tried to rebuild it.

    I took the old one out of the folder then rebuilt it. but it said the only one was not located in the folder, so i put it back and now its just saying cannot located c:/ etc/ etc/ etc/ etc.

    =\ any clue?

  5. #80
    Valued Member falkman is offline
    MemberRank
    Apr 2008 Join Date
    124Posts

    Re: [Release] MapleRestarter

    Follow the tutorial, it has pictures its not that hard.

  6. #81
    Delta Sparks is offline
    MemberRank
    Apr 2008 Join Date
    2,073Posts

    Re: [Release] MapleRestarter

    Um.... Falkman? I'm not talking about that. I did follow your tuts, its SUPURB! thank you for the release.

    I was sayingg for another reason. Like when i rebuild on someone else's server files it goes to THEIR default. Even tho ive added A LOT of stuff its not building mine.

  7. #82
    Apprentice andieZX is offline
    MemberRank
    Apr 2008 Join Date
    17Posts

    Re: [Release] MapleRestarter

    well i can login to the server perfectly but other players cant they can't get past the charectar select

  8. #83
    Delta Sparks is offline
    MemberRank
    Apr 2008 Join Date
    2,073Posts

    Re: [Release] MapleRestarter

    Andie? how did you use yours? I can't seem to use anything but the default settings. =\

  9. #84
    Apprentice andieZX is offline
    MemberRank
    Apr 2008 Join Date
    17Posts

    Re: [Release] MapleRestarter

    Im just using Kryticals repack version 6 and i just click it and bam the thing pops up and loads it all maybe the thing isn't compatible with ur pack

  10. #85
    Delta Sparks is offline
    MemberRank
    Apr 2008 Join Date
    2,073Posts

    Re: [Release] MapleRestarter

    See thats why yours works, mine works like that too. CEPT it loads the defaults just like yours does, But i want it to load my settings and etc.

    Ive tried doing what everyone suggested and rebuild everything to the server then run but still... not working.

  11. #86
    Account Upgraded | Title Enabled! mrkrishan is offline
    MemberRank
    Apr 2008 Join Date
    333Posts

    Re: [Release] MapleRestarter

    This works great. I use vista :)

  12. #87
    Account Upgraded | Title Enabled! DreadBoy is offline
    MemberRank
    Apr 2008 Join Date
    319Posts

    Re: [Release] MapleRestarter

    hmm dude
    when it crash
    its stuck on the crash error
    like ok and cancel
    and then i have to put cancell...
    u have any idea for that?

  13. #88
    Valued Member falkman is offline
    MemberRank
    Apr 2008 Join Date
    124Posts

    Re: [Release] MapleRestarter

    Use the release version, not the debug version, so recompile it as release

  14. #89
    Account Upgraded | Title Enabled! mrkrishan is offline
    MemberRank
    Apr 2008 Join Date
    333Posts

    Re: [Release] MapleRestarter

    I get this ever since I have been using this care to help?

    Now whenever I try to manually debug I get some error in MySQL, but I need to so that I can update my server. Here is a screenshot



    My MySQL username is root and no pass and the thing is localhost. Here are my files

    MySQL.cpp:

    Code:
    #include "MySQLM.h"
    #include <sstream>
    #include <string>
    using namespace std;
    
    MYSQL MySQL::maple_db;
    
    int MySQL::connectToMySQL(){
        if(!mysql_real_connect(&maple_db, "localhost", "root", "xxxxxx", "xxxxxxx", 3306, NULL, 0)){
            printf(mysql_error(&maple_db));
            return 0;
        }
        return 1;
    }
    
    int MySQL::getInt(char* table, int id, char* value){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
        int ret = 0; 
        sprintf_s(query, 255, "SELECT %s FROM %s WHERE ID=%d;",value, table, id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getINT SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            if(mysql_num_fields(mres) > 0){
                string mr = string((char*)mrow[0]);
                istringstream buffer(mr);
                buffer >> ret;
            }
        }
        if (mres != 0) mysql_free_result(mres);
        return ret;
    }
    
    int MySQL::getCharactersIDs(int id, int IDs[3]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
        sprintf_s(query, 255, "SELECT ID FROM characters WHERE userid = %d;", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getCharactersIDs SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            for(int i=0; i<mysql_num_rows(mres); i++){
                string mr = string((char*)mrow[0]);
                istringstream buffer(mr);
                buffer >> IDs[i];
                mrow = mysql_fetch_row(mres);
            }
        }
        int ret = (mres == 0 ? 0 : (int)mysql_num_rows(mres));
        if (mres != 0) mysql_free_result(mres);
        return ret;
    }
    
    int MySQL::isString(char* table, char* whr, char* wht){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT * FROM %s WHERE %s='%s';",table, whr, wht);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        mrow = (mres == 0 ? 0 : mysql_fetch_row(mres));
        if(mrow){
            mysql_free_result(mres);
            return 1;
        }
        else{
            return 0;
        }
    }
    
    void MySQL::getString(char* table, char* whr, char* wht, char* value, char* string){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT %s FROM %s WHERE %s='%s';",value, table, whr, wht);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getSTRING SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            if(mysql_num_rows(mres) > 0){
                strcpy_s(string, 13, (char*)mrow[0]);
            }
        }
        if (mres != 0 ) mysql_free_result(mres);
    }
    void MySQL::getStringI(char* table, char* whr, int wht, char* value, char* string){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT %s FROM %s WHERE %s = %d;",value, table, whr, wht);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getStringI SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            if(mysql_num_rows(mres) > 0){
                strcpy_s(string, 13, (char*)mrow[0]);
            }
        }
        if (mres != 0) mysql_free_result(mres);
    }
    
    
    void MySQL::setInt(char* table, char* wht, int id, int value){
        char query[255]; 
                    sprintf_s(query, 255, "UPDATE %s SET %s = %d WHERE ID = %d;", table, wht, value, id);
        mysql_real_query(&maple_db, query, strlen(query));
    }
    
    void MySQL::setString(char* table, char* wht, int id, char* value){
        char query[255]; 
                    sprintf_s(query, 255, "UPDATE %s SET %s='%s' where ID = %d;", table, wht, value, id);
        mysql_real_query(&maple_db, query, strlen(query));
    }
    
    int MySQL::getUserID(char *username){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
        int ret = 0;
        sprintf_s(query, 255, "SELECT id FROM users WHERE username='%s';",username);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getUserID SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            if(mysql_num_rows(mres) > 0){
                mrow = mysql_fetch_row(mres);
                string mr = string((char*)mrow[0]);
                istringstream buffer(mr);
                buffer >> ret;
            }
        }
        if (mres !=0) mysql_free_result(mres);
        return ret;
    }
    
    int MySQL::setChar(int userid){
        char query[255]; 
                    sprintf_s(query, 255, "INSERT INTO characters(userid) VALUES(%d);", userid);
        mysql_real_query(&maple_db, query, strlen(query));
        int IDs[3];
        int num = getCharactersIDs(userid, IDs);
        return IDs[num-1];
    }
    
    void MySQL::charInfo(char* wht, int id){
        char query[255]; 
        sprintf_s(query, 255, "UPDATE characters SET %s WHERE ID = %d;", wht, id);
        mysql_real_query(&maple_db, query, strlen(query));
    }
    
    void MySQL::deleteRow(char* table, int id){
        char query[255]; 
                    sprintf_s(query, 255, "DELETE FROM %s WHERE ID = %d;", table, id);
        mysql_real_query(&maple_db, query, strlen(query));
    
    }
    
    void MySQL::PointerError(){
        char query[255];
        sprintf_s(query, 255, "update Characters set map='100000000' where map='999999999'");
        mysql_real_query(&maple_db, query, strlen(query));
        }  
    void MySQL::insert(char* query){
        mysql_real_query(&maple_db, query, strlen(query));
    }
    
    int MySQL::showEquips(int id, int equips[15][2]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
        int ret = 0;
                    sprintf_s(query, 255, "SELECT equipid, type FROM equip WHERE (charid = %d AND pos<0);", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in showEquips SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            for(int i=0; i<mysql_num_rows(mres); i++){
                string mr = string((char*)mrow[0]);
                istringstream buffer(mr);
                buffer >> equips[i][0];
                string mr2 = string((char*)mrow[1]);
                istringstream buffer2(mr2);
                buffer2 >> equips[i][1];
                mrow = mysql_fetch_row(mres);
            }
        }
        ret = (mres==0 ? 0 : (int)mysql_num_rows(mres));
        if (mres != 0 ) mysql_free_result(mres);
        return ret;
    }
    
    int MySQL::showEquipsIn(int id, int equips[115][21]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT * FROM equip WHERE charid = %d;", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getEquipsIn SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            for(int i=0; i<mysql_num_rows(mres); i++){
                for(int j=0; j<21; j++){
                    string mr = string((char*)mrow[j]);
                    istringstream buffer(mr);
                    buffer >> equips[i][j];
                }
                mrow = mysql_fetch_row(mres);
            }
        }
        int ret = (mres == 0 ? 0 : (int)mysql_num_rows(mres));
        if (mres != 0) mysql_free_result(mres);
        return ret;
    }
    
    int MySQL::getItems(int id, int equips[400][4]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT * FROM items WHERE charid = %d;", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getItems SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            //int ret = 0;
            for(int i=0; i<mysql_num_rows(mres); i++){
                for(int j=0; j<5; j++){
                    string mr = string((char*)mrow[j]);
                    istringstream buffer(mr);
                    if(j>1)
                        buffer >> equips[i][j-1];
                    else if(j!=1)
                        buffer >> equips[i][0];
                }
                mrow = mysql_fetch_row(mres);
            }
        }
        int ret = (mres == 0 ? 0 : (int)mysql_num_rows(mres));
        if (mres != 0 ) mysql_free_result(mres);
        return ret;
    }
    int MySQL::getSkills(int id, int skills[200][2]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT * FROM skills WHERE charid = %d;", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getSkills SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            for(int i=0; i<mysql_num_rows(mres); i++){
                for(int j=1; j<3; j++){
                    string mr = string((char*)mrow[j]);
                    istringstream buffer(mr);
                    buffer >> skills[i][j-1];
                }
                mrow = mysql_fetch_row(mres);
            }
        }
        int ret = (mres == 0 ? 0 : (int)mysql_num_rows(mres));
        if (mres != 0 ) mysql_free_result(mres);
        return ret;
    }
    void MySQL::getKeys(int id, int keys[90]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
        int ret = 0;
                    sprintf_s(query, 255, "SELECT * FROM keymap WHERE charid = %d;", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getKeys SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            for(int i=0; i<90; i++){
                string mr = string((char*)mrow[i+1]);
                istringstream buffer(mr);
                buffer >> keys[i];
            }
        }
        if (mres != 0) mysql_free_result(mres);
    }

    MySQL.h:

    Code:
    #ifndef MYSQL_H
    #define MYSQL_H
    
    #include <stdio.h>
    #include <Winsock2.h>
    #include "mysql.h"
    
    class MySQL {
    private:
        static MYSQL maple_db;
    public:
        static int connectToMySQL();
        static int getUserID(char* username);
        static int getInt(char* table, int id, char* value);
        static void setInt(char* table, char* wht, int id, int value);
        static void setString(char* table, char* wht, int id, char* value);
        static int isString(char* table, char* whr, char* wht);
        static void getString(char* table, char* whr, char* wht, char* value, char* string);
        static void getStringI(char* table, char* whr, int wht, char* value, char* string);
        static int getCharactersIDs(int id, int IDs[3]);
        static int setChar(int userid);
        static void charInfo(char* wht, int id);
        static void deleteRow(char* table, int id);
        static void insert(char* query);
        static int showEquips(int id, int equips[15][2]);
        static int showEquipsIn(int id, int equips[115][21]);
        static int getItems(int id, int equips[400][4]);
        static void getKeys(int id, int keys[90]);
        static int getSkills(int id, int skills[200][2]);
        static void PointerError();  
    };
    
    #endif
    And yes I do have a database with over 30 characters and such

  15. #90
    Member thunda_mite is offline
    MemberRank
    Apr 2008 Join Date
    There --->Location
    65Posts

    Re: [Release] MapleRestarter

    "MapleRestarterv5 has encountered an error & needs to close."

    ??? How to fix?
    P.S. i followed directions

  16. #91
    Valued Member falkman is offline
    MemberRank
    Apr 2008 Join Date
    124Posts

    Re: [Release] MapleRestarter

    Quote Originally Posted by mrkrishan View Post
    I get this ever since I have been using this care to help?

    Now whenever I try to manually debug I get some error in MySQL, but I need to so that I can update my server. Here is a screenshot



    My MySQL username is root and no pass and the thing is localhost. Here are my files

    MySQL.cpp:

    Code:
    #include "MySQLM.h"
    #include <sstream>
    #include <string>
    using namespace std;
    
    MYSQL MySQL::maple_db;
    
    int MySQL::connectToMySQL(){
        if(!mysql_real_connect(&maple_db, "localhost", "root", "xxxxxx", "xxxxxxx", 3306, NULL, 0)){
            printf(mysql_error(&maple_db));
            return 0;
        }
        return 1;
    }
    
    int MySQL::getInt(char* table, int id, char* value){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
        int ret = 0; 
        sprintf_s(query, 255, "SELECT %s FROM %s WHERE ID=%d;",value, table, id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getINT SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            if(mysql_num_fields(mres) > 0){
                string mr = string((char*)mrow[0]);
                istringstream buffer(mr);
                buffer >> ret;
            }
        }
        if (mres != 0) mysql_free_result(mres);
        return ret;
    }
    
    int MySQL::getCharactersIDs(int id, int IDs[3]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
        sprintf_s(query, 255, "SELECT ID FROM characters WHERE userid = %d;", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getCharactersIDs SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            for(int i=0; i<mysql_num_rows(mres); i++){
                string mr = string((char*)mrow[0]);
                istringstream buffer(mr);
                buffer >> IDs[i];
                mrow = mysql_fetch_row(mres);
            }
        }
        int ret = (mres == 0 ? 0 : (int)mysql_num_rows(mres));
        if (mres != 0) mysql_free_result(mres);
        return ret;
    }
    
    int MySQL::isString(char* table, char* whr, char* wht){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT * FROM %s WHERE %s='%s';",table, whr, wht);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        mrow = (mres == 0 ? 0 : mysql_fetch_row(mres));
        if(mrow){
            mysql_free_result(mres);
            return 1;
        }
        else{
            return 0;
        }
    }
    
    void MySQL::getString(char* table, char* whr, char* wht, char* value, char* string){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT %s FROM %s WHERE %s='%s';",value, table, whr, wht);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getSTRING SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            if(mysql_num_rows(mres) > 0){
                strcpy_s(string, 13, (char*)mrow[0]);
            }
        }
        if (mres != 0 ) mysql_free_result(mres);
    }
    void MySQL::getStringI(char* table, char* whr, int wht, char* value, char* string){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT %s FROM %s WHERE %s = %d;",value, table, whr, wht);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getStringI SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            if(mysql_num_rows(mres) > 0){
                strcpy_s(string, 13, (char*)mrow[0]);
            }
        }
        if (mres != 0) mysql_free_result(mres);
    }
    
    
    void MySQL::setInt(char* table, char* wht, int id, int value){
        char query[255]; 
                    sprintf_s(query, 255, "UPDATE %s SET %s = %d WHERE ID = %d;", table, wht, value, id);
        mysql_real_query(&maple_db, query, strlen(query));
    }
    
    void MySQL::setString(char* table, char* wht, int id, char* value){
        char query[255]; 
                    sprintf_s(query, 255, "UPDATE %s SET %s='%s' where ID = %d;", table, wht, value, id);
        mysql_real_query(&maple_db, query, strlen(query));
    }
    
    int MySQL::getUserID(char *username){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
        int ret = 0;
        sprintf_s(query, 255, "SELECT id FROM users WHERE username='%s';",username);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getUserID SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            if(mysql_num_rows(mres) > 0){
                mrow = mysql_fetch_row(mres);
                string mr = string((char*)mrow[0]);
                istringstream buffer(mr);
                buffer >> ret;
            }
        }
        if (mres !=0) mysql_free_result(mres);
        return ret;
    }
    
    int MySQL::setChar(int userid){
        char query[255]; 
                    sprintf_s(query, 255, "INSERT INTO characters(userid) VALUES(%d);", userid);
        mysql_real_query(&maple_db, query, strlen(query));
        int IDs[3];
        int num = getCharactersIDs(userid, IDs);
        return IDs[num-1];
    }
    
    void MySQL::charInfo(char* wht, int id){
        char query[255]; 
        sprintf_s(query, 255, "UPDATE characters SET %s WHERE ID = %d;", wht, id);
        mysql_real_query(&maple_db, query, strlen(query));
    }
    
    void MySQL::deleteRow(char* table, int id){
        char query[255]; 
                    sprintf_s(query, 255, "DELETE FROM %s WHERE ID = %d;", table, id);
        mysql_real_query(&maple_db, query, strlen(query));
    
    }
    
    void MySQL::PointerError(){
        char query[255];
        sprintf_s(query, 255, "update Characters set map='100000000' where map='999999999'");
        mysql_real_query(&maple_db, query, strlen(query));
        }  
    void MySQL::insert(char* query){
        mysql_real_query(&maple_db, query, strlen(query));
    }
    
    int MySQL::showEquips(int id, int equips[15][2]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
        int ret = 0;
                    sprintf_s(query, 255, "SELECT equipid, type FROM equip WHERE (charid = %d AND pos<0);", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in showEquips SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            for(int i=0; i<mysql_num_rows(mres); i++){
                string mr = string((char*)mrow[0]);
                istringstream buffer(mr);
                buffer >> equips[i][0];
                string mr2 = string((char*)mrow[1]);
                istringstream buffer2(mr2);
                buffer2 >> equips[i][1];
                mrow = mysql_fetch_row(mres);
            }
        }
        ret = (mres==0 ? 0 : (int)mysql_num_rows(mres));
        if (mres != 0 ) mysql_free_result(mres);
        return ret;
    }
    
    int MySQL::showEquipsIn(int id, int equips[115][21]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT * FROM equip WHERE charid = %d;", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getEquipsIn SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            for(int i=0; i<mysql_num_rows(mres); i++){
                for(int j=0; j<21; j++){
                    string mr = string((char*)mrow[j]);
                    istringstream buffer(mr);
                    buffer >> equips[i][j];
                }
                mrow = mysql_fetch_row(mres);
            }
        }
        int ret = (mres == 0 ? 0 : (int)mysql_num_rows(mres));
        if (mres != 0) mysql_free_result(mres);
        return ret;
    }
    
    int MySQL::getItems(int id, int equips[400][4]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT * FROM items WHERE charid = %d;", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getItems SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            //int ret = 0;
            for(int i=0; i<mysql_num_rows(mres); i++){
                for(int j=0; j<5; j++){
                    string mr = string((char*)mrow[j]);
                    istringstream buffer(mr);
                    if(j>1)
                        buffer >> equips[i][j-1];
                    else if(j!=1)
                        buffer >> equips[i][0];
                }
                mrow = mysql_fetch_row(mres);
            }
        }
        int ret = (mres == 0 ? 0 : (int)mysql_num_rows(mres));
        if (mres != 0 ) mysql_free_result(mres);
        return ret;
    }
    int MySQL::getSkills(int id, int skills[200][2]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
                    sprintf_s(query, 255, "SELECT * FROM skills WHERE charid = %d;", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getSkills SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            for(int i=0; i<mysql_num_rows(mres); i++){
                for(int j=1; j<3; j++){
                    string mr = string((char*)mrow[j]);
                    istringstream buffer(mr);
                    buffer >> skills[i][j-1];
                }
                mrow = mysql_fetch_row(mres);
            }
        }
        int ret = (mres == 0 ? 0 : (int)mysql_num_rows(mres));
        if (mres != 0 ) mysql_free_result(mres);
        return ret;
    }
    void MySQL::getKeys(int id, int keys[90]){
        MYSQL_RES *mres;
        MYSQL_ROW mrow;
        char query[255]; 
        int ret = 0;
                    sprintf_s(query, 255, "SELECT * FROM keymap WHERE charid = %d;", id);
        mysql_real_query(&maple_db, query, strlen(query));
        mres = mysql_store_result(&MySQL::maple_db);
        if (mres == 0 ){
            printf_s("\n\rError in getKeys SQL returned no rows (Mysql_error: %s)",mysql_error(&maple_db)); 
            printf_s("SQL Query is : %s",query);
        }
        else {
            mrow = mysql_fetch_row(mres);
            for(int i=0; i<90; i++){
                string mr = string((char*)mrow[i+1]);
                istringstream buffer(mr);
                buffer >> keys[i];
            }
        }
        if (mres != 0) mysql_free_result(mres);
    }

    MySQL.h:

    Code:
    #ifndef MYSQL_H
    #define MYSQL_H
    
    #include <stdio.h>
    #include <Winsock2.h>
    #include "mysql.h"
    
    class MySQL {
    private:
        static MYSQL maple_db;
    public:
        static int connectToMySQL();
        static int getUserID(char* username);
        static int getInt(char* table, int id, char* value);
        static void setInt(char* table, char* wht, int id, int value);
        static void setString(char* table, char* wht, int id, char* value);
        static int isString(char* table, char* whr, char* wht);
        static void getString(char* table, char* whr, char* wht, char* value, char* string);
        static void getStringI(char* table, char* whr, int wht, char* value, char* string);
        static int getCharactersIDs(int id, int IDs[3]);
        static int setChar(int userid);
        static void charInfo(char* wht, int id);
        static void deleteRow(char* table, int id);
        static void insert(char* query);
        static int showEquips(int id, int equips[15][2]);
        static int showEquipsIn(int id, int equips[115][21]);
        static int getItems(int id, int equips[400][4]);
        static void getKeys(int id, int keys[90]);
        static int getSkills(int id, int skills[200][2]);
        static void PointerError();  
    };
    
    #endif
    And yes I do have a database with over 30 characters and such
    You didnt follow the guide, copy the maplestoryserver.exe file from the debug folder and paste it into the maplestoryserver folder and wam...

    this is really starting to piss me off, ive helped people fix this problem about 30 times now, and if you follow the tut you will get a fine result

    Any more questions regarding this problem will be ignored

  17. #92
    Proficient Member OllyOxenFree is offline
    MemberRank
    Apr 2008 Join Date
    166Posts

    Re: [Release] MapleRestarter

    Amazing, Simply Amazing!

  18. #93
    Member Kurtiss is offline
    MemberRank
    Aug 2007 Join Date
    52Posts

    Re: [Release] MapleRestarter

    "I want to give falkman a kiss for this release!"

    But.. I won't cause I'm not like that. Thank you very much.

  19. #94
    Valued Member falkman is offline
    MemberRank
    Apr 2008 Join Date
    124Posts

    Re: [Release] MapleRestarter

    Sigh, I'm taking a break from maplestory... I may check on the forums but im taking a break, I probably will come back but im sick of MS :P.

    I'll link my server below vv:

    Features in my server:
    Lottery.cpp is replaced with a NPC that gives you item sets, for lvl's(really good items).
    Also, he has a 2nd option to spend all yours current Ability Points into a stat that you specify, that way you dont have to spend days clicking stuff :P.

    4thJob.cpp is a NPC I made myself that gives 4th Job/Skills, but it is unfinished, it only has Shadower skills, Night Lord skills, Ultimate Hero skills, and Bow Master skills.

    Gatch: Has my special scroll on/off feature.

    ~although I only have those skills, you can get 4th job on any char :P~

    MY SERVER IS Kryticialv6, so use that tutorial to set up your sql tables...

    SEE YOU ALL LATER(Perhaps never, perhaps in 1 minute(you never know when I'll want to come back :P)

    BTW: Hurricane also works!

    Link: http://norbertsoftware.org/MapleStor.../krytical6.rar

  20. #95
    Omega ihatehaxor is offline
    MemberRank
    Apr 2008 Join Date
    JerseyLocation
    5,461Posts

    Re: [Release] MapleRestarter

    yo r the pictures removed? cause i cant see them

  21. #96
    Valued Member LastBattle is offline
    MemberRank
    Aug 2009 Join Date
    115Posts

    Re: [Release] MapleRestarter

    Ressurect the dead! Fill RageZone with Rage!

  22. #97
    Account Upgraded | Title Enabled! wietse02 is offline
    MemberRank
    Jul 2008 Join Date
    NetherlandsLocation
    657Posts

    Re: [Release] MapleRestarter

    Links dead, can someone reupload?

  23. #98
    Account Upgraded | Title Enabled! Sherry is offline
    MemberRank
    Aug 2009 Join Date
    Your houseLocation
    251Posts

    Re: [Release] MapleRestarter

    Quote Originally Posted by wietse02 View Post
    Links dead, can someone reupload?
    This thread is old.
    All spammer and bumper have bring all the old thread to the front.

  24. #99
    Account Upgraded | Title Enabled! kanters is offline
    MemberRank
    May 2008 Join Date
    AmsterdamLocation
    260Posts

    Re: [Release] MapleRestarter

    i made one a long time ago

    LINK:
    http://forum.ragezone.com/f427/system-resetter-553764/

    EDIT: Sorry didnt realise it was a bump >_<
    Last edited by kanters; 14-08-09 at 05:30 PM.

  25. #100
    Account Upgraded | Title Enabled! DisMyStory is offline
    MemberRank
    Jul 2009 Join Date
    HomeLocation
    470Posts

    Re: [Release] MapleRestarter

    I wish it worked for odin =(



Page 4 of 4 FirstFirst 1234

Advertisement