קודם כל קרדיט גדול לjoy13975 מRZ על הדבר הזה.

הינה: זה באנגלית:

ספוילר:

First of all:
I take no credits for this but also I didn't take these from anywhere other than my head.
This is not going to tell you how to get rid of simon's account thingy and if you can't get rid of that you should now grab a java, c++, c# c, or whatever high level language book and read it thoroughly, then you'll get away from being a frigging noob. Flames are welcomed because I don't really care.

Firstly you download the v88 localhost : This - released by Raptor Jesus

And download Microsoft Visual C# : This

Secondly you must get rid of the IP check, otherwise you'll get "OutOfMemory" exception.
Here I am not converting the Hex for you so just replace the checkIP() with:

PHP Code:
קוד PHP:
 public static bool checkIP(string input
קוד PHP:
[B][COLOR=#007700]        {[/COLOR][/B]
[B][COLOR=#007700]            return true;[/COLOR][/B]
[B][COLOR=#007700]        }  [/COLOR][/B]
[B][COLOR=#007700][/COLOR][/B] 
Then you can change the IP to your IP

קוד PHP:
  public static string toIP "your.ip.here.and.domains.probably.don't.work"


Compile and get your own MapleHost.exe from the Project folder/bin/release/MapleHost.exe

Lastly the checkAccount part, it will always say your server's down, so you must put this php page to your wamp server: Taken from Kerelmans
קוד PHP:
[B][COLOR=#000000]## Database Information[/COLOR][/B][COLOR=#000000]
[B][COLOR=#000000]$database = array(
 
[PHP] <?php
[/COLOR][/B]
"host" => "localhost",
"user" => "root",
"pass" => "yourpassword",
"dbse" => "yourdatabasename"
);

## Connect To Database
mysql_connect($database['host'], $database['user'], $database['pass']) or die("0-Database server is offline.");
mysql_select_db($database['dbse']) or die("0-Database isn't available.");

## All the other stuff...
if (!empty($_GET['username']) && !empty($_GET['password'])) {
$username = htmlspecialchars(mysql_real_escape_string($_GET['username']));
$password = mysql_real_escape_string($_GET['password']);

$AQuery = sprintf("
SELECT COUNT('id')
FROM accounts
WHERE name = '%s' AND password = '%s'",
$username, $password);
$aresult = mysql_query($AQuery);
$atotal = mysql_result($aresult, 0);
$reply = ($atotal > 0) ? true : false;

// return $reply;
if ($reply) {
echo '1';
} else {
echo '0-Wrong username or password.';
}
}
?>
[/COLOR][/PHP]
קוד PHP:
[B][COLOR=#000000]<font color="#000000">
 
<b><font color="#000000"><b>Name that file "accountCheck.php" and load it up to a web server(for instance your wamppy).</b></font>
 
<
b><font color="#000000">Now you should be able to build flawlessly and get connected, if still notset up loopback adapters to your IP(not localhostthe IP starts with "169.")</font></b>
 
<
b><font color="#000000"><font color="green">Edit#1</font>: Don't forget to execute the structure.sql.</font></b><font color="#000000">
 
<b><font color="green">Edit#2</font>: If you disconnect after selecting channels, do the following:</b>
<b>Go to your CharlistRequestHandler.java and replace the whole thing with:</b></font></b></font>[/B][COLOR=#000000]
[B][COLOR=#000000]import client.MapleClient;
 
[PHPpackage net.login.handler
[/B]
import net.AbstractMaplePacketHandler;
import tools.data.input.SeekableLittleEndianAccessor;
import tools.Pair;
import constants.ServerConstants;

public final class CharlistRequestHandler extends AbstractMaplePacketHandler {
@Override
public final boolean validateState(MapleClient c)
{
return true;
}
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
System.out.println("CharlistRequestHandler-");
slea.readByte();
// Pair<String, String> UPP = getUserPassPair(slea.readMapleAsciiString());
// c.setAccountName(UPP.getLeft());
// performLogin(UPP);
//slea.skip(21);
int server = slea.readByte();
c.setWorld(server);
if (!c.isLoggedIn() && ServerConstants.DEBUG)
{
c.setAccountName("Simon");
c.setAccID(418);
}else{
c.disconnect();//This isn't a noob check, this is to prevent hackers.
}
System.out.println("Server choice: " + server);
int channel = slea.readByte() + 1;
System.out.println("Channel choice: " + channel);
c.setChannel(channel);
c.sendCharList(server);
}

/* private Pair<String, String> getUserPassPair(String authStr)
{
String dataSection = authStr.split(":")[4];
String[] UserAndPass = dataSection.split("\\\\");
return new Pair<String, String>(UserAndPass[0], UserAndPass[1]);
}

private void performLogin(Pair UPP)
{
//todo: real logic here but for now
System.out.println("User: " + UPP.getLeft());
System.out.println("Pass: " + UPP.getRight());
}*/
}
[/COLOR][/PHP]

Edit#4: Then edit your client's source - Program.cs: Change the

קוד PHP:
 public static string accountCheck "http://localms.net/accountcheck.php"//http://localms.net/accountcheck.php?username=Gay&password=Person 


to

קוד PHP:
public static string accountCheck "http://[Your domain/IP here]/accountcheck.php"


Note: Again, this won't get you away from loging in with simon's accout.
About simon's account: Go to your Database, accounts and make an account with id 418, name simon and others don't matter.

Edit#3: You shouldn't run the server and the client on the same machine otherwise the client's redirect server won't work, unless you know an alternative to fix that e.g loopback adaptors.

Edit#4: No further help will be provided on the server side.


Edit#5: To flamers: can you guys please read properly ? Simon said it was not a noob check, the simon account isn't a check, it's just the only way to login from the host computer because it does not send auth packet. If you don't touch it and login from other computers it isn't a problem so wtf are you thinking ? Are you the noob who can't get in game here ?

Edit#6: For those who D/C on clicking channels, it's because your login from host machine and actually you aren't logged in. I changed the ServerlistRequestHandler a bit and you should log yourself in in the ClientStartHandler.java (You should know how to do that, and you should verify yourself otherwise other people would be logging in from the specified account.).

Edit#7: If you haven't installed .NET Framework 3.5 or later, or if you are having tones of error/problems working along,
download .NET Framework: This

[/COLOR][/COLOR]


בהצלחה בשרתכם