• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Afs-cms

Status
Not open for further replies.
Avarians, the status server (players online and uptime) works on ur pc? I dont know if the problem is just here, how I told u, the uptime and max players online dont stay static, it disapear after some seconds... Just the status online/offline works perfectly.

What can I do?

Open config.lua of your TFS and set:
Code:
statusTimeout = 1000

Now it must work! ;)

Avarian, just search articles about SQL-Injection, i have found some, and they are really useful. I think they can help you with make ACC more security
 
@slawkens

You really are the best! It now working perfectly!!! :D

And now I can see players online, monsters and uptime all time, it's not disapearing! Very very nice, really thx! ^^
 
I'm having a problem, and I checked this whole thread.

The account registration is not working for me.. whenever someone tries to make an account, it doesn't send the information to the database. I've checked the connection settings, and everything is ok. It worked a yesterday, but for some reason it's not working now.

Help, please?
 
It cant simply stop working unless you messed with the code, which I doubt you did. So I cant tell you what to do because thats not something that can simply stop working unless you dont have "Key" in accounts, and if your using TFS then you will..

Which part isnt working?

Making a key for a new account?
or creating a key for an existing account?
 
I'm having a problem, and I checked this whole thread.

The account registration is not working for me.. whenever someone tries to make an account, it doesn't send the information to the database. I've checked the connection settings, and everything is ok. It worked a yesterday, but for some reason it's not working now.

Help, please?

I have the same problem here, the reason is... TFS dont come with all database fields that Avarians use, like rlname, hideemail.. etc..
U can manage ur sql table Accounts inserting the fields that arent there... the fields name is:
After field "key" insert too the fields "rlname", "location", "hide" and "hidemail".
It must work now. Works fine for me =)

@Avarians, on my page just show the first 25 top highscores, when I click to show the next 25-50 the page back blank. Its normal?

My page: www.opencurse.redesnovac.com
 
Last edited:
I dont think so.. but I only run my AAC tests on a server with two characters on it so i've never really been able to test that..um do you have more then 25 characters? if you do then it's definitely a bug and if you dont then it's something that could easily be fixed.
 
Yes, there is more than 25 players. I m trying to fix that, but really its very comples 0.o

And about character information, when a player create a guild, in his information dont show the name of the guild that he are in, it always point as "None".

EDITED

I've fixed it Avarians, the guild membership can be viwed on character information =)


$rankid = $player_sql['rank_id'];
$query20 = mysql_query("SELECT * FROM `guild_ranks` WHERE (`id` = '$rankid') ") or die(mysql_error());
$query_result20 = mysql_fetch_row($query20);
$guildscheck = $query_result20[1];
$query123 = mysql_query("SELECT * FROM `guilds` WHERE (`id` = '$guildscheck') ") or die(mysql_error());
$query_result123 = mysql_fetch_row($query123);

$space = $query_result123[1];

echo '<h2>Character information:</h2>';
echo '<table width=400px><tr><tr><td width=100px>Name: </td><td width=300px>'.$player_sql['name'].'<br/></td></tr>';
$sexs = array("Female", "Male");
echo '<tr><td width=100px>Sex:</td><td width=300px>'.$sexs[$player_sql['sex']].'<br /></td></tr>';
echo '<tr><td width=100px>Level:</td><td width=300px>'.$player_sql['level'].'<br /></td></tr>';
$vocations = array("None", "Sorcerer", "Druid", "Paladin", "Knight", "Master Sorcerer", "Elder Druid", "Royal Paladin", "Elite Knight");
echo '<tr><td width=100px>Vocation:</td><td width=300px>'.$vocations[$player_sql['vocation']].'<br /></td></tr>';
echo '<tr><td width=100px>Residence:</td><td width=300px>'.$town.'<br /></td></tr>';

if (empty($space)) {
echo '<tr><td width=100px>Guild: </td><td width=300px>None';
echo '<br /></td></tr>';
}
else
{
echo '<tr><td width=100px>Guild: </td><td width=300px>'.$query_result20[2].' of the <a href="guilds.php?act=view&guild='.$query_result123[1].'">'.$query_result123[1].'</a>';
echo '<br /></td></tr>';
}
 
Last edited:
Thanks i'll test it, also I fixed highscores last night, if you want I suppose I could post a minor update (No Security Fixes) or I can just tell you what to do?
 
I think as you can post a update v1.5.5 xD

but I waiting for v1.6 release and security fixes :)
 
Yea i'm not going to post a update till v1.6 is ready.

Anyone who wants to get their highscores working properly can PM me for the fix.
 
@Avarians, I've fixed too the banishiment status, so on character account information will show the banishiment, day until, and the reason.

There is the code working.

On info.php change the lines:
PHP:
$ban_query = mysql_query("SELECT * FROM `bans` WHERE (`player` = '".$char."' OR `account` = '".$acc_logged_sql['accno']."')");
$ban_sql = mysql_fetch_array($ban_query);

To:
PHP:
$account_ban = $player_sql['account_id'];
$ban_query = mysql_query("SELECT * FROM `bans` WHERE (`account` = '$account_ban') ") or die(mysql_error());
$ban_sql = mysql_fetch_array($ban_query);


And the lines:
PHP:
$positionss = array("None", "$group_id1", "$group_id2", "$group_id3", "$group_id4", "$group_id5", "$group_id6", "$group_id7", "$group_id8", "$group_id9");
echo '<tr><td width=100px>Position:</td><td width=300px><font color="Red">'.$positionss[$player_sql['group_id']].'</font></td></tr>';
if(mysql_num_rows($ban_query) != 0)
{
			
} 
echo '</table>';

To:
PHP:
$positionss = array("None", "$group_id1", "$group_id2", "$group_id3", "$group_id4", "$group_id5", "$group_id6", "$group_id7", "$group_id8", "$group_id9");
if($player_sql['group_id'] > 2)
{
echo '<tr><td width=100px>Position:</td><td width=300px><font color="Red">'.$positionss[$player_sql['group_id']].'</font></td></tr>';
} else {
echo '<tr><td width=100px>Position:</td><td width=300px>'.$positionss[$player_sql['group_id']].'</td></tr>';
}
if(mysql_num_rows($ban_query) != 0)
{
echo '<tr><td width=100px>Account status:</td><td width=300px><font color="Red">Baned until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' by '.$ban_sql['comment'].'</font></td></tr>';
} 
echo '</table>';

It's working here, the show if the player is banned. =)


And about highscores u can sent the working code for me, because I configure my page to show 100 by page, and it is very slow to open the 100 players from database =\

Thx ^^
 
Thanks for the fix, I remember I tried to make it work before and thought I had erased the whole thing cause it annoyed me lol.

Also I'll PM you the high scores fix soon.
 
I did something more with bans, so instead of
PHP:
if(mysql_num_rows($ban_query) != 0)
{
echo '<tr><td width=100px>Account status:</td><td width=300px><font color="Red">Baned until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' by '.$ban_sql['comment'].'</font></td></tr>';
} 
echo '</table>';

You can put (i know its long and should be done better, but i just dont know how to :]):
PHP:
		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 0 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of invalid name.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 1 )
{
		echo '<tr><td width=100px><font color="Red"> Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of invalid name.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 2 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of invalid name.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 3 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of invalid name.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 4 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of invalid name.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 5 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of invalid name.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 6 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of invalid name.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 7 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of invalid name.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 8 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of invalid name.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 9 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of offensive statement.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 10 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of spamming.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 11 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of advertisement not related to game.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 12 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of real money advertisement.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 13 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of non-english public statement.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 14 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of off-topic public statement.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 15 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of inciting rule violation.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 16 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of bug abuse.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 17 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of game weakness abuse.</font></td></tr>';
		echo '</table>';
} 
		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 18 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of macro use.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 19 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of using unofficial sotware to play.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 20 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of hacking.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 21 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of multi-clienting.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 22 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of account trading.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 23 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of account sharing.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 24 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of threatening gamemaster.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 25 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of pretending to have official position.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 26 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of pretending to have influence on gamemaster.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 27 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of false report to gamemaster.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 28 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of excessive unjustified player killing.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 29 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of destructive behaviour.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 30 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red"> Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of spoiling action.</font></td></tr>';
		echo '</table>';
} 

		if(mysql_num_rows($ban_query) != 0 and $ban_sql[reason_id] == 31 )
{
		echo '<tr><td width=100px><font color="Red">Banished:</font></td><td width=300px><font color="Red">Until '.$bantime = date('M d Y, H:i:s',$ban_sql['time']).' because of invalid payment.</font></td></tr>';
		echo '</table>';		
} 
		else
		echo '</table>';

It works well =P

Also I would like if someone of you can pm me those highscores fixes.^^
 
I'll test them both out and see which I like better.

I'll PM you the high scores fix now.
 
Status
Not open for further replies.
Back
Top