- Joined
- May 15, 2012
- Messages
- 22
- Reaction score
- 0
This source looks good. But I can't seem to run my MySQL? Is there a download link that you can shared?
Simply attempt to login with your desired username and password, and it'll create your account for you.
Assuming I can get this running and get to the next step, is ther "admin" account info I might need? How do I distinguish between admin/GM and normal player accounts? if its set to autoregister won't the account I make be a player account?
What do you mean? For the SQL files? The MySQL Server? Database Management Tool? What?
For the SQL files, execute them in the order defined on the Wiki.
For the MySQL server, useTo view the content, you need to sign in or registerif you're on Windows.
If you need a Database Management Tool, try Navicat, or use MySQL Query Browser.
For your .bat error you need to go into your database and execute the sql files present in the server's sql folder. Yes the autoregister will set you as a normal player but all you have to do is log right back out, open your database, go under Accounts and there will be a row called GM. It should be at 0 and all you have to do is set it to 5 to be Admin.
@Shinmuriel
Yeah you goofed on something small lol. I can tell from the pics you executed these sqls to your "mysql" database. Create a new database called "Orpheus" and reexcute all those sqls while having Orpheus database highlighted. I use sqlyog so I can't give better details on everything.
We should try and keep this thread clean so feel free to send me a PM and I can finish helping you from there. I'm not the greatest at all this but I know the basics. I would assume the box to the left of the Execute is your "Query" Box. While having Orpheus highlighted, you can try pasting your sql data into that and hitting execute to see if it will execute the sql query for you. It's what I do with my program whenever i'm doing tables on the fly.
This is what my tables and stuff looks like in SQLyog
![]()
@echo off
@title OrpheusMS Server
set CLASSPATH=.;dist\*
java -Xmx10m -Dwzpath=wz\ net.server.Server
pause[/COLOR]
Here is my serverconstants if it helps (for the sake of completion)
[COLOR="#FF0000"]/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <[email protected]>
Matthias Butz <[email protected]>
Jan Christian Meyer <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package constants;
public class ServerConstants {
public static short VERSION = 83;
public static String ORPHEUS_VERSION = "5/19/12";
public static final String SERVER_NAME = "OrpheusMS";
public static String[] WORLD_NAMES = {"Scania", "Bera", "Broa", "Windia", "Khaini", "Bellocan", "Mardia", "Kradia", "Yellonde", "Demethos", "Galicia", "El Nido", "Zenith", "Arcenia", "Kastia", "Judis", "Plana", "Kalluna", "Stius", "Croa", "Medere"};
// Orpheus Feature Configuration
public static final String TIP_NAME = "OrpheusTip"; // Tip Name for automsg
public static final boolean USE_PARANOIA = true; // use Orpheus' everything logger, Paranoia.
public static final boolean USE_MTS_AS_FM_WARP = true; // Replace the Meso Trade Shop with a warp to the Free Market.
public static final boolean HIDE_GMS_ON_LOGIN = true; // Hide GMs upon login.
public static final boolean MAKE_NPCS_SCRIPTABLE = true; // Makes NPCs scriptable. (Setup in ScriptableNPCConstants)
public static final boolean BROADCAST_GACHAPON_ITEMS = true; // broadcast gachapon use!
public static final boolean UNLIMITED_PROJECTILES = false; // have unlimited projectiles (don't lose bullets, throwing stars, arrows)
public static final boolean ALLOW_INFO_ON_GMS = true; // if false, non-GMs cannot get info on GMs.
public static final boolean CLEAR_ERROR_LOGS_ON_BOOT = true; // if true, error logs will be cured on boot.
public static final boolean PAGINATE_HELP = true; // if true, help messages will be displayed in pages.
public static final short ENTRIES_PER_PAGE = 8; // the number of entries to display on each page.
public static final int MAX_CHAT_MESSAGE_LENGTH = Byte.MAX_VALUE; // the number of characters allowed in chat messages. (fixes DC hax)
// Rate Configuration
public static final byte QUEST_EXP_RATE = 4;
public static final byte QUEST_MESO_RATE = 3;
// Login Configuration
public static final boolean ENABLE_AUTOREGISTER = true; // Confirmed: working.
public static final int CHANNEL_LOAD = 100; // Players per channel
public static final long RANKING_INTERVAL = 3600000; // not used if the rankings event is used.
public static final boolean ENABLE_PIC = false; // False: must use Maple Admin to delete characters.
// Event Configuration
public static final boolean PERFECT_PITCH = false;
public static final boolean FREE_NX = true;
public static final int NX_COST = 1000000; // 1,000,000
public static final String EVENTS = "automsg KerningPQ Boats Subway AirPlane elevator rankings"; // there is a rankings event to replace the default rankings tool.
// IP Configuration
public static final String HOST = "myipgoeshere";
// Database Configuration
public static final boolean DB_USE_COMPILED_VALUES = false;
public static final String DB_URL = "jdbc:mysql://localhost:3306/Orpheus?autoReconnect=true";
public static final String DB_USER = "root";
public static final String DB_PASS = "mypass";
Ok I setup the create server batch. Ran the runsv and got this...
I am using the Orpheus (moople?) ini creator to make the runsv file. Below is my world (runsv) file contents.
@echo off
@title OrpheusMS Server
set CLASSPATH=.;dist\*
java -Xmx10m -Dwzpath=wz\ net.server.Server
pause
When I change set CLASSPATH= to dist\orpheus.JAR;dist I get this message -
View attachment 105193
package client;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.ResultSet;
import java.security.NoSuchAlgorithmException;
import tools.DatabaseConnection;
import tools.HashCreator;
import tools.MapleLogger;
public class AutoRegister {
private static final int ACCOUNTS_PER_IP = 4; <~~~~ what is this?[/COLOR]
private static boolean success;
public static boolean wasSuccessful() {
return success;
}
public static boolean getAccountExists(String login) {
boolean accountExists = false;
Connection con = DatabaseConnection.getConnection();
try {
PreparedStatement ps = con.prepareStatement("SELECT name FROM accounts WHERE name = ?");
ps.setString(1, login);
ResultSet rs = ps.executeQuery();
if (rs.first()) {
accountExists = true;
}
} catch (Exception e) {
}
return accountExists;
}
public static void createAccount(String login, String pwd, String eip) {
String sockAddr = eip;
Connection con;
try {
con = DatabaseConnection.getConnection();
} catch (Exception e) {
MapleLogger.print(MapleLogger.EXCEPTION_CAUGHT, "There's a problem with automatic registration.\r\n" + e);
return;
}
try {
PreparedStatement ipc = con.prepareStatement("SELECT lastknownip FROM accounts WHERE lastknownip = ?");
ipc.setString(1, sockAddr.substring(1, sockAddr.lastIndexOf(':')));
ResultSet rs = ipc.executeQuery();
if (rs.first() == false || rs.last() == true && rs.getRow() < ACCOUNTS_PER_IP) {
try {
PreparedStatement ps = con.prepareStatement("INSERT INTO accounts (name, password, email, birthday, macs, lastknownip) VALUES (?, ?, ?, ?, ?, ?)");
ps.setString(1, login);
ps.setString(2, HashCreator.getHash(pwd));
ps.setString(3, "[email protected]");
ps.setString(4, "0000-00-00");
ps.setString(5, "00-00-00-00-00-00");
ps.setString(6, sockAddr.substring(1, sockAddr.lastIndexOf(':')));
ps.executeUpdate();
ps.close();
success = true;
} catch (NoSuchAlgorithmException e) {
MapleLogger.print(MapleLogger.EXCEPTION_CAUGHT, "There's a problem with automatic registration.\r\n" + e);
return;
} catch (SQLException ex) {
MapleLogger.print(MapleLogger.EXCEPTION_CAUGHT, "There's a problem with automatic registration.\r\n" + ex);
return;
}
}
ipc.close();
rs.close();
} catch (SQLException e) {
MapleLogger.print(MapleLogger.EXCEPTION_CAUGHT, "There's a problem with automatic registration.\r\n" + e);
}
}
UPDATE `accounts` SET `gm` = '5' WHERE `id` = '1';
UPDATE `characters` SET `gm` = '5' WHERE `accountid` = '1';