zake100
12-11-10, 04:40 PM
Hướng dẫn:
1. cài xampp
2.start xampp: start apache và mysql
3.đến c:\xampp\apache\conf\extra\ và mở file asp.conf
<IfModule perl_module>
<IfModule mime_module>
AddType application/x-<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b> .asp
</IfModule>
<FilesMatch "\.asp$">
SetHandler application/x-<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
</FilesMatch>
<Directory "C:/xampp/cgi-bin">
<FilesMatch "\.asp$">
SetHandler cgi-script
</FilesMatch>
</Directory>
</IfModule>4. gõ localhost/phpmyadmin
tạo một database mới là aqw
sau đó import database trong thư mục bạn vừa down về
xóa hết nội dung trong các bảng
wqw_users, wqw_friends and wqw_items
sau đó bạn vào <b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b> và change IP trong đó đi
5.tạo một file config.php
<?php
$dhost = "Localhost";
$dusername = "root";
$dpassword = "";
$ddatabase = "aqw";
$con = mysql_connect($dhost, $dusername, $dpassword) or die("Cannot Connect");
mysql_select_db($ddatabase, $con);
?>đặt cái này vào thư mục game và protomen
sau đó vào
ở thư mục game vào aw-character.php,cf-userlogin.php,default.asp sửa cái include ở đầu thành
include "config.php";tương tự ở thư mục protomen: sửa trong file cf-userlogin.php,cf-usersignup.php,getversion.asp, tương tự như trên
thêm file signup.php có nội dung như sau vào thư mục protomen
<?php
ob_start();
session_start();
$webtitle= "Create a free account";
//CREATED BY MENTALBLANK
//<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
//MODIFIED BY ZEROSKULL
# Connect to the database
include("config.php");
//IMPORTANT STUFFS
$birthdate = $_POST['yearOfBirth'].$_POST['monthOfBirth'].$_POST['dateOfBirth'];
$age = mysql_real_escape_string(stripslashes(intval((date ("Ymd",mktime()) - $birthdate)/10000)));
$dob = $_POST["date"]."/".$_POST["day"]."/".$_POST["year"];
$gender = mysql_real_escape_string(stripslashes($_POST["strGender"]));
$username = mysql_real_escape_string(stripslashes($_POST["strUsername"]));
$password = mysql_real_escape_string(stripslashes($_POST["strPassword"]));
$classid = mysql_real_escape_string(stripslashes($_POST["ClassID"]));
$skincol = mysql_real_escape_string(stripslashes(hexdec($_POS T["skincol"])));
$haircol = mysql_real_escape_string(stripslashes(hexdec($_POS T["haircol"])));
$eyecol = mysql_real_escape_string(stripslashes(hexdec($_POS T["eyecol"])));
$pass = md5($password);
$email = $_POST["strEmail"];
//Grabs IP
if ($_SERVER['<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>']) {
$ip = $_SERVER['<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
//This checks if the form has been submitted.
if (isset($_POST['submit'])) {
//Checks if IP already has an Account
$ipcheck = mysql_query("SELECT * FROM wqw_users WHERE signupip='$ip' AND banned=0");
if (mysql_num_rows($ipcheck) != 0) {
die("Sorry, This IP has already created an account");
}
//Checks if Username, etc. Only Contains Specified Characters and is not blank.
//Helps to Prevent SQL Injection...etc.
if (!preg_match('/^[a-z0-9\s_-]+$/i', $username) || ($username == "")) {
die('Error, Username must contain Letters and/or Numbers');
}
if (!preg_match('/^[a-z0-9]+$/i', $password) || ($password == "")) {
die('Error, Password must contain Letters and/or Numbers');
}
if (!preg_match('/^[0-9]+$/i', $age) || ($age == "")) {
die('Error, Age Must Be A Number');
}
if (!preg_match('/^[a-z]+$/i',$gender) || ($gender != "M" && $gender != "F")) {
die('Error, Gender Must Be an "M" or "F"');
}
/*
if (!preg_match('/^([\d]|1[0,1,2])/([0-9]|[0,1,2][0-9]|3[0,1])/\d{4}$/i', $dob)){
die('Error, Date of birth must be in this format 00/00/0000 or 0/0/0000');
}*/
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
die('Error, Email Must Contain Letters and/or Numbers');
}
//Converts Date of Birth to a readable mySQL Query String
$dob = mysql_real_escape_string(stripslashes($_POST["date"]."/".$_POST["day"]."/".$_POST["year"]));
//This Checks if the 2 passwords given match
if ($_POST['strPassword'] != $_POST['strPassword2']) {
die('Error, Passwords Do not Match. Please Try Again.');
}
//This checks if the username is in use
$check = mysql_query("SELECT username FROM wqw_users WHERE username = '$username'") or die(mysql_error());
if (mysql_num_rows($check) != 0) {
die('Sorry, the username '.$_POST['strUsername'].' is already in use.');
}
//Checks if Email has Already been used
$emailcheck = mysql_query("SELECT * FROM wqw_users WHERE email='$email' AND banned=0") or die("status=Error&strReason=" . mysql_error());
if (mysql_num_rows($emailcheck) != 0) {
die("Sorry, This Email has already been used.");
}
//Filtered words
if (ereg("\Admin", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\admin", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\administrator", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\Administrator", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\mod", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\Mod", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\moderatore", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\Moderatore", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\Game Master", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\game master", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\gamemaster", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\Gamemaster", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\GameMaster", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\Safiria", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\safiria", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\zeroskull", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\soulreaper", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\SoulReaper", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\ZeroSkull", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
elseif (ereg("\Zeroskull", $chartype)) {
Die('The username you entered is not allowed, Please enter another one....');
}
//This Inserts the Data into the database
if($gender == "F"){
$createuser = mysql_query("INSERT INTO wqw_users (username, password, email, age, dob, signupip, gender, coins, currentclass, hairName, hairFile, hairID, plaColorSkin, plaColorHair, plaColorEyes)
VALUES ('$username', '$pass', '$email', '$age', '$dob', '$ip','$gender',50000,'1','Saf1','hair/F/saf1.swf','234','$skincol','$haircol','$eyecol')");
}
else{
$createuser = mysql_query("INSERT INTO wqw_users (username, password, email, age, dob, signupip, gender, coins, currentclass, plaColorSkin, plaColorHair, plaColorEyes)
VALUES ('$username', '$pass', '$email', '$age', '$dob', '$ip','$gender',50000,'1','$skincol','$haircol','$ eyecol')");
}
$usersql = mysql_query("SELECT id FROM wqw_users WHERE username='$username'") or die ("Query failed with error: ".mysql_error());
$userquery = mysql_fetch_array($usersql);
$userid = $userquery["id"];
$addweapon = mysql_query("INSERT INTO wqw_items (itemid, userid, equipped, sES, iLvl) VALUES ('1', '$userid', '1', 'Weapon', '1')");
//Add's Starting Armor
switch ($classid) {
case 1: //Warrior
$addarmour = mysql_query("INSERT INTO wqw_items (itemid, userid, equipped, sES, iLvl, classXP, className) VALUES ('16', '$userid', '1', 'ar', '1', '0', 'The Hybrid Class')") or die("Error adding class! contact PDL Staff immediately!" . mysql_error());
$updateclass = mysql_query("UPDATE wqw_users SET currentClass=1 WHERE id=$userid");
break;
case 4: //Ninja
$addarmour = mysql_query("INSERT INTO wqw_items (itemid, userid, equipped, sES, iLvl, classXP, className) VALUES ('293', '$userid', '1', 'ar', '1', '0', 'Ninja Class')") or die("Error adding class! contact PDL Staff immediately!" . mysql_error());
$updateclass = mysql_query("UPDATE wqw_users SET currentClass=4 WHERE id=$userid");
break;
case 3: //Mage
$addarmour = mysql_query("INSERT INTO wqw_items (itemid, userid, equipped, sES, iLvl, classXP, className) VALUES ('143', '$userid', '1', 'ar', '1', '0', 'Mage Class')") or die("Error adding class! contact PDL Staff immediately!" . mysql_error());
$updateclass = mysql_query("UPDATE wqw_users SET currentClass=3 WHERE id=$userid");
break;
case 10: //Berserker
$addarmour = mysql_query("INSERT INTO wqw_items (itemid, userid, equipped, sES, iLvl, classXP, className) VALUES ('864', '$userid', '1', 'ar', '1', '0', 'Berserker')") or die("Error adding class! contact PDL Staff immediately!" . mysql_error());
$updateclass = mysql_query("UPDATE wqw_users SET currentClass=10 WHERE id=$userid");
break;
}
$addfriends = mysql_query("INSERT INTO wqw_friends (userid) VALUES ('$userid')");
$achievements = mysql_query("INSERT INTO wqw_achievements (username, achievement_image) VALUES ('$username','badge-bt.png')");
include "top.php";
echo "Your character has been created and is automatically activated with chat enabled, but your account is not an upgrade so you can't buy upgrade items unless you gain membership in the server";
include "bottom.php";
}
else
{
include "top.php";
?>
<form action="signup.php" method="post" style="width: 550px;">
<h3>Create a free account</h3>
<p> Note: This server contains full support to girls so don't always pick male ^_^</p>
<tr><td>Username:</td><td>
<input id="username" type="text" name="strUsername" size="50%">
</td></tr>
<tr><td>Password:</td><td>
<input type="password" name="strPassword" size="50%">
</td></tr>
<tr><td>Confirm Password:</td><td>
<input type="password" name="strPassword2" size="50%">
</td></tr>
<tr><td>Starting Class:</td><td>
<select name="ClassID">
<option value="1">Warrior</option>
<option value="3">Mage</option>
<option value="4">Ninja</option>
<option value="10">Berserker</option>
</select>
</select>
</td></tr>
<tr><td>Date of Birth:</td><td>
<select name="date">
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<select name="day">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<select name="year">
<option value="2001">2001</option>
<option value="2000">2000</option>
<option value="1999">1999</option>
<option value="1998">1998</option>
<option value="1997">1997</option>
<option value="1996">1996</option>
<option value="1995">1995</option>
<option value="1994">1994</option>
<option value="1993">1993</option>
<option value="1992">1992</option>
<option value="1991">1991</option>
<option value="1990">1990</option>
</select>
</td></tr>
<tr><td>Gender:</td><td>
<select name="strGender" id="gender">
<option value="M">Male</option>
<option value="F">Female</option>
</select>
</td></tr>
<tr><td>Skin Color:</td><td>
<input name="skincol" id="skincol" class="color" size="50%">
</td></tr>
<tr><td>Hair Color:</td><td>
<input name="haircol" id="haircol" class="color" size="50%">
</td></tr>
<tr><td>Eye Color:</td><td>
<input name="eyecol" id="eyecol" class="color" size="50%">
</td></tr>
<tr><td>Email:</td><td>
<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>
</td></tr>
<tr><td>Security Image:</td><td>
<img id="imgCaptcha" src="captcha.php" />
</td></tr>
<tr><td>Security Code:</td><td>
<input type="text" size="20%" maxlength="6" name="strSecur">
</td></tr>
<td colspan='2' align='center'><input type="submit" name="submit" value="Sign Up! and Get 50k AC as reward!"></td>
<script src="<b><font color=red>[Chỉ có thành viên mới xem link được. <a href="register.php"> Nhấp đây để đăng ký thành viên......</a>]</font></b>"></script>
</form>
<?php
include "bottom.php";
}
?> 6. đến thư mục emulator mở 2 file trong đó ra và change địa chỉ IP là IP của bạn tốt nhất tất cả IP các bạn nên để là 127.0.0.1
Khởi động server thôi
vào thư mục emulator mở file Project_DarkLiquid(nhớ là phải cài java nha)
sau đó start server thôi
vào localhost/game chơi
đã test và chạy OK theo cách làm như trên
bọn ragezone hỏi mãi mà có mấy con gà trả lời linh tinh nên phải tự ngâm cứu thôi
mệt mất cả buổi tối mới tìm ra cách để cài đặt đó
quên nữa muốn đăng ký acc thì vào localhost/protomen/signup.php mà đăng ký
thế nhé ai không cài được thì ráng chịu
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.