Online table from database

Results 1 to 7 of 7
  1. #1
    Proficient Member CULOBG is offline
    MemberRank
    Mar 2011 Join Date
    187Posts

    Online table from database

    So guys i am messing around with the database and been looking for the file that works with the online table ( the one that says who is online)
    if anyone knows which file updates that table every time would be really handy
    tnx for any reply :)


  2. #2
    [B]aSH nofxpunkerbrian is offline
    MemberRank
    Apr 2009 Join Date
    1,151Posts

    Re: Online table from database

    Its the binary files that updates the point database

    Just do this query:

    SELECT * FROM point WHERE zoneid > -1;

    This will show all accounts online, for actual characters that you want to view this will have to done by a jsp servlet call distributing the results from using the above query and which character of the account that appears is online at the time. This can be dangerous if you have a big db and also a big community online.

  3. #3
    Proficient Member CULOBG is offline
    MemberRank
    Mar 2011 Join Date
    187Posts

    Re: Online table from database

    thanks i will look into that i think i saw that into the role.jsp :)

  4. #4
    Angelemu founder tbnanubis is offline
    MemberRank
    Mar 2011 Join Date
    Unicorn ForestLocation
    527Posts

    Re: Online table from database

    Quote Originally Posted by nofxpunkerbrian View Post
    SELECT * FROM point WHERE zoneid > -1;

    This will show all accounts online, for actual characters that you want to view this will have to done by a jsp servlet call distributing the results from using the above query and which character of the account that appears is online at the time. This can be dangerous if you have a big db and also a big community online.
    I tried this once, noticing that the online status is the same for every char on the same acc, so there is no way that i know of to be sure which character is online.

  5. #5
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Online table from database

    Quote Originally Posted by nofxpunkerbrian View Post
    Its the binary files that updates the point database

    Just do this query:

    SELECT * FROM point WHERE zoneid > -1;

    This will show all accounts online, for actual characters that you want to view this will have to done by a jsp servlet call distributing the results from using the above query and which character of the account that appears is online at the time. This can be dangerous if you have a big db and also a big community online.
    You don't need JSP to get the actual character names. I've done it in pure PHP by replicating what the JSP sends to gamedbd

    csharp.php - pw-chat - Perfect World Chat - Google Project Hosting

  6. #6
    [B]aSH nofxpunkerbrian is offline
    MemberRank
    Apr 2009 Join Date
    1,151Posts

    Re: Online table from database

    Quote Originally Posted by das7002 View Post
    You don't need JSP to get the actual character names. I've done it in pure PHP by replicating what the JSP sends to gamedbd

    csharp.php - pw-chat - Perfect World Chat - Google Project Hosting
    JSP is its original way, yeah you found a work around which is good but again the original process is via Java so I stuck with that technique instead of yours.

  7. #7

    Re: Online table from database

    couldnt you compare the id with the roles table? or what ever pwadmin imports to.

    like this
    Code:
    $result2 = mysql_query("SELECT * FROM roles WHERE roleid = '$ID'");
    			while($row = mysql_fetch_array($result2)){
    			echo "<br>";
    			echo "<font color=red>&nbsp&nbsp&nbsp" . $row['rolename'] . "</font>";
    			echo "<font color=red>&nbsp&nbsp&nbsp" . $row['rolelevel'] . "</font>";
    			$Class = $row['roleprof']=$row['roleprof'];
    switch ($Class){
    	case "0":
    		echo "<font color=red>&nbsp&nbsp&nbsp" . $row['roleprof']=Blademaster . "</font>";
    		break;
    	case "1":
    		echo "<font color=red>&nbsp&nbsp&nbsp" . $row['roleprof']=Wizard . "</font>";
    		break;
    	case "3":
    		echo "<font color=red>&nbsp&nbsp&nbsp" . $row['roleprof']=Venomancer . "</font>";
    		break;	
    	case "4":
    		echo "<font color=red>&nbsp&nbsp&nbsp" . $row['roleprof']=Barbarian . "</font>";
    		break;	
    	case "6":
    		echo "<font color=red>&nbsp&nbsp&nbsp" . $row['roleprof']=Archer . "</font>";
    		break; 	
    	case "7":
    		echo "<font color=red>&nbsp&nbsp&nbsp" . $row['roleprof']=Cleric . "</font>";
    		break;
    }
    i made this to change the returned number from the roleprof column into the actual class.



Advertisement