Many useful query for Admin

Re: [Guide] Many useful query for Admin

What web you are using ?
 
Re: [Guide] Many useful query for Admin

edit character.class.php . function reset($charactername)


this's 1 example that im using:
PHP:
function reset($charactername)
{
          if ((isset($_SESSION['pass'])) && (isset($_SESSION['user']))); 
                     {
                           require("config.php");
                           $loginid = "$_SESSION[user]";


                           $online_check = $db->Execute("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id=?",array($loginid));
                           $row2 = $online_check->fetchrow();

                           $result = $db->Execute("Select Clevel,Resets,Money,LevelUpPoint,class From Character where Name=?",array($charactername));
                           $row = $result->fetchrow();


							$resetup=$row[1] + (1);
							
							if (($row[1]>=0) and ($row[1]<20))
							{$resetlvlmustbe=100;
							 $resetmoeny=$row[2]-2000000;
							 $resetpt=200 * $resetup;					 							
							}
							elseif (($row[1]>=20) and ($row[1]<40))
							{$resetlvlmustbe=200;
							 $resetmoeny=$row[2]-5000000;
							 $resetpt=200 * $resetup;	
								 						
							}

$moneyreset=$row[2]-$resetmoeny;

                            if ($row2[0] != 0){ $error=1;
                                         show_error("Logout of game man"); 
                                                  }
                            elseif ($resetmoeny < 0){ $error=1;
                                         show_error("oh man . you must have  $moneyreset Zen to Reset!"); 
                                                    }

                            elseif ($row[0] < $resetlvlmustbe){ $error=1;
                                         show_error("your level must be  $resetlvlmustbe to reset! "); 
                                                                   }
                            if($error!=1){

                                         $sql_reset_script="Update character set [strength]='25',[dexterity]='25',[vitality]='25',[energy]='25',[leadership]='25',[MapNumber]='0',[MapPosX]='123',[MapPosY]='123',[clevel]='1',[experience]='0',[money]='$resetmoeny',[LevelUpPoint]='$resetpt',[resets]='$resetup' where name=?";
                                         $sql_reset_script2="UPDATE character Set [inventory]=CONVERT(varbinary(1080), null),[magiclist]= CONVERT(varbinary(180), null) Where name=?";


                                    $sql_reset_exec = $db->Execute($sql_reset_script,array($charactername));
                                    $sql_reset_exec2 = $db->Execute($sql_reset_script2,array($charactername));
 
Re: [Guide] Many useful query for Admin

edit character.class.php . function reset($charactername)


this's 1 example that im using:

Hi thanks for help , but don't work.Res dont work 1 pic.
2 pic only heroes "Lord" may to make res he is 350 lv another "Low level to reset".
I replace function reset($charactername) with you code (3 pic)

 
Re: [Guide] Many useful query for Admin

Wrong . You muse add my code in function reset($charactername) not function add_stats.
That's main code.

Inorder to make it work, you must edit your characters_manager.php file in inc folder.

Disable this things

//$resetmoeny=$info_result[4]-($muweb['resetmoney']);
//if($resetmoeny < 0){$reset_="$reset_no_zen";}
//elseif($info_result[2] < $muweb['resetlevel']){$reset_="$reset_no_level";}
//elseif($info_result[2] >= $muweb['resetlevel'])

Only let this :

$reset_="$reset_allow";
 
Re: [Guide] Many useful query for Admin

If you have a version with extra warehouses use this:

delete from ExtWarehouse
where memb___id in (
select memb___id from memb_stat where disconnecttm<'2007-06-01')
 
Re: [Guide] Many useful query for Admin

Wrong . You muse add my code in function reset($charactername) not function add_stats.
That's main code.
Yes I make this but I wrong at pic.

Inorder to make it work, you must edit your characters_manager.php file in inc folder.

Disable this things

//$resetmoeny=$info_result[4]-($muweb['resetmoney']);
//if($resetmoeny < 0){$reset_="$reset_no_zen";}
//elseif($info_result[2] < $muweb['resetlevel']){$reset_="$reset_no_level";}
//elseif($info_result[2] >= $muweb['resetlevel'])

Only let this :

$reset_="$reset_allow";
This too make
.......now give me this error


this line is the last and have onlly
PHP:
?>
Just to say my server is 1.00.16 beta 41 if this have mether
 
select memb___id from memb_stat where disconnecttm<'2007-06-01')

it the Date format above is Year-Month-Date?
 
Code:
Quote:
I own 1 Muonline server . Last 2 week, my server has been flood . I dont know how the hacker attacked my server . This is a part of joinserver when being attacked :
Quote:
11:48:14a [dasxv] (222.253.205.187) User Login
RecvQ Count : 279
RecvQ Count : 278
RecvQ Count : 277
RecvQ Count : 276
RecvQ Count : 276
RecvQ Count : 275
11:48:18a [flowea] (222.253.205.187) User Login
RecvQ Count : 278
RecvQ Count : 277
RecvQ Count : 276
RecvQ Count : 275
RecvQ Count : 274
RecvQ Count : 273
RecvQ Count : 272
RecvQ Count : 271
RecvQ Count : 270
11:48:22a [contnue] (222.254.31.212) User Login
RecvQ Count : 273
RecvQ Count : 272
RecvQ Count : 271
RecvQ Count : 270
11:48:23a [Pizza] (192.168.1.10) User Login
RecvQ Count : 273
RecvQ Count : 272
RecvQ Count : 271
RecvQ Count : 270
RecvQ Count : 269
RecvQ Count : 268
RecvQ Count : 267
RecvQ Count : 266
11:48:24a [henrr1972] (123.22.113.137) User Login
RecvQ Count : 267
RecvQ Count : 266
RecvQ Count : 265
RecvQ Count : 264
[SubserverVIPR1][192.168.1.10:55903] GameServer Connect
RecvQ Count : 263
RecvQ Count : 262
RecvQ Count : 261
11:48:25a [trav103] (118.68.176.71) User Login
RecvQ Count : 263
As you see , when being flooded , join server notice much error " RecvQ Count" . At this time , all players playing get lag and dis and cant come back into game , just click on subserver bar and nothing happen ( i think because joinserver cant process at this time ) . Then i start to find solutions. I see that when turn off apache server , the flood stop immediately. So this's the first i got . Tried to change another web : mutoolz , muweb 0.8 , ... but all fail . still being flooded . Then i upgrade apacheserver to lasted version included lasted php , change webserver port ,mod_security2, mod_dosevasive for apache server, login box with .htaccess, setup security firewall ( comodo firewall pro , norton , kis , outpost firewall pro ,...) , block all port ( just open 44405 , 55901 , 55903 ) , setup ISA server to mornitor tcp-ucp connect , request , use all anti flood function ( limit TCP-UDP connection , http request per second ) but ALL FAIL . They nonstop flood my server from day to day ( except when i turn off my webserver ) . I tried search google about that but no result , i tried ask many people to help but they dont know what's my Muonline Joinserver :( . I know that my problem not really in Muonline Server Help . But i dont know what should i do now , where can i find help now . All my players going to crazy now , and me too .
If you got this problem too or know what i should do please help . Dont ask me to search anymore . I tried " recvq count" , "recvq" , "muonline recvq count" in google search but no results.
Thanks for reading .

I have same problem like you, my server have been flooded by some idiot , and i can't even run server.

i don't know what to do now, only one way use different IP on webserver and remote to DB server.
 
Back