Elite Diviner
- Joined
- Jul 13, 2008
- Messages
- 419
- Reaction score
- 217
v2
Ok, this is very better than v1!
What this do? It runs every 5 seconds a mysql query which deletes the bugged pet equips (1812000 - 1812007 (meso magnet & co.)). That means everytime when a person with this bug relogs it, I'm sure that this takes more than 5 seconds, it already deleted it and the character is unbugged. If you don't like to keep this opened all the time, then use the noobish v1...
Put this code into a php file, put it in your "www" folder, open it via localhost and keep it opened, don't close it!
v1
This is a php script for odinms which fixes the disappeared items and skills of a character after the player bought fucked up pet equips. I made this because MikeyPwnz' fix for this bug needs the administrator to run a mysql query, this would take too much time. This allows the user to fix it on his own. What this does is very easy, it deletes all the user's pet equips. The user has to be logged off if he/she/it wants to use it.
I hope this helps, have fun with it!
(This is not tested but it should work, if you find any bugs tell me please!)
fix_character.php
fix_character_2.php
Ok, this is very better than v1!
What this do? It runs every 5 seconds a mysql query which deletes the bugged pet equips (1812000 - 1812007 (meso magnet & co.)). That means everytime when a person with this bug relogs it, I'm sure that this takes more than 5 seconds, it already deleted it and the character is unbugged. If you don't like to keep this opened all the time, then use the noobish v1...
Code:
<?php
$ml_host = "localhost"; //host
$ml_user = "root"; //user
$ml_password = ""; //password
$ml_database = "odinms"; //database
mysql_connect("$ml_host","$ml_user","$ml_password"); //connect
mysql_select_db("$ml_database"); //select database
$fix_character = "DELETE FROM inventoryitems WHERE itemid >= '1812000' AND itemid <= '1812007'";
mysql_query("$fix_character") or DIE(mysql_error());
echo"
<meta http-equiv='refresh' content='5;url=$PHP_SELF'>
"
?>
v1
This is a php script for odinms which fixes the disappeared items and skills of a character after the player bought fucked up pet equips. I made this because MikeyPwnz' fix for this bug needs the administrator to run a mysql query, this would take too much time. This allows the user to fix it on his own. What this does is very easy, it deletes all the user's pet equips. The user has to be logged off if he/she/it wants to use it.
I hope this helps, have fun with it!
(This is not tested but it should work, if you find any bugs tell me please!)
fix_character.php
Code:
Here you can fix your character after you bought fucked up pet equips.
<br>
(This will delete all your pet equips!)
<br>
(You have to be logged out if you want to do this or it won't work!)
<br>
<br>
<form method="post" action="fix_character_2.php">
<table>
<tr>
<td>
<b>login id:</b>
</td>
<td>
<input type="text" name="login_id">
</td>
</tr>
<tr>
<td>
<b>password:</b>
</td>
<td>
<input type="password" name="password" maxlength="12">
</td>
</tr>
<tr>
<td>
<b>character:</b>
</td>
<td>
<input type="text" name="character" maxlength="12">
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="submit" value="Fix Character">
</td>
</tr>
</table>
</form>
fix_character_2.php
Code:
<?php
$ml_host = "localhost"; //host
$ml_user = "root"; //user
$ml_password = ""; //password
$ml_database = "odinms"; //database
mysql_connect("$ml_host","$ml_user","$ml_password"); //connect
mysql_select_db("$ml_database"); //select database
$login_id = $_POST["login_id"];
$password = $_POST["password"];
$character = $_POST["character"];
$resultsalt = mysql_query("SELECT salt FROM accounts WHERE name = '$login_id'");
if ($row = mysql_fetch_array($resultsalt)) {
do {
$salt = $row["salt"];
}
while ($row = mysql_fetch_array($resultsalt));
}
if ($salt == "") {
$password_sha = hash("sha1",$password);
} else {
$password_sha = hash("sha512",$password . $salt);
}
$check_login_id = mysql_query("SELECT * FROM accounts WHERE name = '$login_id'");
$check_login_id_2 = mysql_num_rows($check_login_id);
$check_password = mysql_query("SELECT * FROM accounts WHERE name = '$login_id' AND password = '$password_sha'");
$check_password_2 = mysql_num_rows($check_password);
$check_character = mysql_query("SELECT * FROM characters WHERE name = '$character'");
$check_character_2 = mysql_num_rows($check_character);
if ($login_id == "") {
echo "
Please enter your login ID.
<br>
<a href='javascript:history.back()'>Back</a>
";
} elseif ($password == "") {
echo "
Please enter your password.
<br>
<a href='javascript:history.back()'>Back</a>
";
} elseif ($character == "") {
echo "
Please enter your character.
<br>
<a href='javascript:history.back()'>Back</a>
";
} elseif ($check_login_id_2 < 1) {
echo "
This login ID does not exist.
<br>
<a href='javascript:history.back()'>Back</a>
";
} else {
if ($check_password_2 < 1) {
echo "
The password is not correct.
<br>
<a href='javascript:history.back()'>Back</a>
";
} else {
if ($check_character_2 < 1) {
echo "
This character does not exist.
<br>
<a href='javascript:history.back()'>Back</a>
";
}
else {
while ($account = mysql_fetch_assoc($check_login_id)) {
while ($character_2 = mysql_fetch_assoc($check_character)) {
if ($account["id"] == $character_2["accountid"]) {
$fix_character = "DELETE FROM inventoryitems WHERE itemid >= '1812000' AND itemid <= '1812007' AND characterid = $character_2[id]";
mysql_query("$fix_character") or DIE(mysql_error());
echo "
Your character has been fixed.
<br>
<a href='javascript:history.back()'>Back</a>
";
} else {
echo "
This character is not yours.
<br>
<a href='javascript:history.back()'>Back</a>
";
}
}
}
}
}
}
?>
Last edited: