• 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!

Znote AAC 1.4 - [TFS 0.2.13+] & [TFS 0.3.6+/0.4]

Znote AAC 1.2 released.

Download from Znote.eu
Download from Dropbox

Changelog Znote AAC 1.1 --> 1.2
Code:
- Admin panel will now display which Znote AAC version thats running.
- You can now disable IP validation if your having problems with it in config.php
- You can now disable salt in config.php if your TFS 0.3 noobserv dosn't support it. Thanks to ranyo13/rany
- Added firstitems.lua sample to give starting items to characters. (TFS 0.3)
- Fixed a bug in shop which could potentially let people buy items for no points. Thanks to averatec.
- Fixed so you no longer can invite characters to your guild if they already are invited or a part of it. Thanks to averatec.

Then how could I create accounts at the beginning then? This is very confusing...
Your lucky, I just fixed that issue. :p
Download Znote AAC 1.2 instead, and in config.php set $config['salt'] to false.
Then problem should be solved.

I have another question; how do you change startitems for new characters?
Aand ye, make sure you are running latest version (Znote AAC 1.2), then look into the LUA --> Creaturescript firstitems folder, you will find scripts for firstitems. :)
Read the Installation Instructions.txt if you need help to install it.
 
Last edited:
Anyone have bugs to report? I'm bored and can't find bugs on my own any more. :<
 
Can u upload a fully working db?

- - - Updated - - -

Oh nvm, I download 1.2 and now the box with install thingy shows :p
 
just a thing.. if you put a link, like in register that you redirects to wikipedia for see what is cheating or bot.. put in the <a href> another parameter called TARGET="_new", for make it more comfortable and don't lose the ot website, opening the link in another page

- - - Updated - - -

sorry errors I can't edit the post :)
 
Hey Znote, I am using your aac cms and its really nice.
However I am using the first version, and i've been doing a lot of changes to many of the files, so I want to ask you; when you update the aac version, is it possible for you to include what files that have been edited in the changelog?
Would make things a lot easier for me when updating!

Thanks for a sweet system, fellow norwegian.

Best regards
 
just a thing.. if you put a link, like in register that you redirects to wikipedia for see what is cheating or bot.. put in the <a href> another parameter called TARGET="_new", for make it more comfortable and don't lose the ot website, opening the link in another page
sorry errors I can't edit the post :)

Ahh yeah, forgot about that. :) Fixed in next version.

Hey Znote, I am using your aac cms and its really nice.
However I am using the first version, and i've been doing a lot of changes to many of the files, so I want to ask you; when you update the aac version, is it possible for you to include what files that have been edited in the changelog?
Would make things a lot easier for me when updating!

Thanks for a sweet system, fellow norwegian.

Best regards

Yes, actually... Since you have a premium account you always have access to the latest version of Znote AAC before it goes official, and you can also keep track of every file change I do through the subversion.
Premium Subversion - Znote AAC

You can see when last update was, click on the rev number to see which files are changed, and see the file change difference compared to previous version.
 
Damn sucks that its a private SVN, especially since im not allowed to be a donator.

Anyway Im not so good with php but I think I found a bug.
In config.php you have
Code:
	// WARNING! Account names written here will have admin access to web page!
	$config['page_admin_access'] = array(
		'otland',
		'otland1',
	);

In register.php I found
Code:
		$defaultAdmin = array(
			'otland',
			'otland1',
		);
		
		$isNoob = in_array(strtolower($_POST['username']), $defaultAdmin) ? true : false;

I might be wrong if someone changes the page access names they can still be created because its not looking at the config file.

So shouldnt register.php it be changed to this?
Code:
		$isNoob = in_array(strtolower($_POST['username']), $config['page_admin_access']) ? true : false;

- - - Updated - - -

In the user_create_character function why not set the experience the first time while setting the rest of the data? Which is the way you did it when setting the no vocation data
 
Yes, thanks for pointing that out. Its not much of a deal, otland and otland1 are just sample usernames to present how the config system works. It was pretty much speed coded and I forgot to refer register.php to the proper array and just created a duplicate.

And well, I kinda assumed that hosters wrote admin accounts there that already exists and thus cannot be created. Anyway I will patch it up to make the aac even more dummy-safe. :)

And pretty much same deal in user_create_character, if you look closely enough you will find much messy codes and unnecessary queries that I will optimize.
(The whole users.php file is a bigass mess without any structure or proper documentation, will work on this as well).

Gonna release a Znote AAC function list soon.
 
Im going through a lot of users.php now. hope you dont mind me posting bugs(?). Any chance you can still include a list of changed files when you push out updates? Unlike Hauni I cant get access to the SVN.
function user_character_list
was:
Code:
function user_character_list($account_id) {
	//$count = user_character_list_count($account_id);
	$account_id = sanitize($account_id);
	$query = mysql_query("SELECT `name`, `level`, `vocation`, `town_id`, `lastlogin`, `online` FROM `players` WHERE `account_id`='$account_id' ORDER BY `level` DESC LIMIT 0, 30");

	$count = mysql_num_rows($query);
	for ($i = 0; $i < $count; $i++) {
		$row = mysql_fetch_row($query);
		$array[] = $row;
		$array[$i][2] = vocation_id_to_name($array[$i][2]); // Change vocation id to vocation name
		$array[$i][3] = town_id_to_name($array[$i][3]); // Change town id to town name
		
		// Make lastlogin human read-able. 
		if ($array[$i][4] != 0) {
			$array[$i][4] = date(config('date'),$array[$i][4]);
		} else {
			$array[$i][4] = 'Never.';
		}
		
		$array[$i][5] = online_id_to_name($array[$i][5]); // 0 to "offline", 1 to "ONLINE". 
		// deprecated, znote_players now has hide_char
		//$array[$i][6] = hide_char_to_name($array[$i][6]); // 0 to "visible", 1 to "hidden".
	}
	if (isset($array)) {return $array; } else {return false;}
}

This prevents a warning message when there are no characters on the account.
Code:
function user_character_list($account_id) {
	//$count = user_character_list_count($account_id);
	$account_id = sanitize($account_id);
	$query = mysql_query("SELECT `name`, `level`, `vocation`, `town_id`, `lastlogin`, `online` FROM `players` WHERE `account_id`='$account_id' ORDER BY `level` DESC LIMIT 0, 30");
	if ($query) {
		$count = mysql_num_rows($query);
		for ($i = 0; $i < $count; $i++) {
			$row = mysql_fetch_row($query);
			$array[] = $row;
			$array[$i][2] = vocation_id_to_name($array[$i][2]); // Change vocation id to vocation name
			$array[$i][3] = town_id_to_name($array[$i][3]); // Change town id to town name
			
			// Make lastlogin human read-able. 
			if ($array[$i][4] != 0) {
				$array[$i][4] = date(config('date'),$array[$i][4]);
			} else {
				$array[$i][4] = 'Never.';
			}
			
			$array[$i][5] = online_id_to_name($array[$i][5]); // 0 to "offline", 1 to "ONLINE". 
			// deprecated, znote_players now has hide_char
			//$array[$i][6] = hide_char_to_name($array[$i][6]); // 0 to "visible", 1 to "hidden".
		}
	} else
		return false;
}
 
Im going through a lot of users.php now. hope you dont mind me posting bugs(?). Any chance you can still include a list of changed files when you push out updates? Unlike Hauni I cant get access to the SVN.

Not at all, I appreciate it. :)

This prevents a warning message when there are no characters on the account.

these changes breaks myaccount.php.
 
Nice work!
Just a tip: You should get into MySqlI instead of just building mysql queries.
Makes your code more object oriented.
Yet, nice work :)
 
These needs to be added to the database.

SQL:
CREATE TABLE `znote` (  `id` int(10) NOT NULL AUTO_INCREMENT,
  `version` varchar(30) NOT NULL COMMENT 'Znote AAC version',
  `installed` int(10) NOT NULL,
  `cached` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;


INSERT INTO `znote` (`version`, `installed`) VALUES
('$version', '$time');


CREATE TABLE `znote_accounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `ip` int(10) NOT NULL,
  `created` int(10) NOT NULL,
  `points` int(10) DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;


INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`) VALUES
('1', '0', '$time');


CREATE TABLE `znote_paypal` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `txn_id` varchar(30) NOT NULL,
  `email` varchar(255) NOT NULL,
  `accid` int(11) NOT NULL,
  `price` int(11) NOT NULL,
  `points` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


CREATE TABLE `znote_players` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `player_id` int(11) NOT NULL,
  `created` int(11) NOT NULL,
  `hide_char` tinyint(4) NOT NULL,
  `comment` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


INSERT INTO `znote_players` (`player_id`, `created`, `hide_char`, `comment`) VALUES
('1', '$time', '0', '. . .');


CREATE TABLE `znote_shop` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` int(11) NOT NULL,
  `itemid` int(11) DEFAULT NULL,
  `count` int(11) NOT NULL DEFAULT '1',
  `describtion` varchar(255) NOT NULL,
  `points` int(11) NOT NULL DEFAULT '10',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


CREATE TABLE `znote_shop_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `player_id` int(11) NOT NULL,
  `type` int(11) NOT NULL,
  `itemid` int(11) NOT NULL,
  `count` int(11) NOT NULL,
  `points` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


CREATE TABLE `znote_shop_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `type` int(11) NOT NULL,
  `itemid` int(11) NOT NULL,
  `count` int(11) NOT NULL,
  `time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


CREATE TABLE `znote_visitors` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ip` int(11) NOT NULL,
  `value` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


CREATE TABLE `znote_visitors_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ip` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  `type` tinyint(4) NOT NULL,
  `account_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
Hey, is there a option to change font? Just to simple arial or whatever cause default Znote AAC font seems to not have Polish diacritics (or any other?) and second question is: can i by any chance translate interface? I mean, everything is in files, i have to find it, translate and it's done, right?
 
Table 'ironserver.znote_visitors_details' doesn't exist

You can type wrong sql details in config.php and visit site to see a generated SQL schema for your OT server, which you need to import to database.

Hey, is there a option to change font? Just to simple arial or whatever cause default Znote AAC font seems to not have Polish diacritics (or any other?) and second question is: can i by any chance translate interface? I mean, everything is in files, i have to find it, translate and it's done, right?

In the template/layout, edit the header and make sure it runs in a polish-supported format. (I think its default set to UTF-8).
Also in the .css file, usually in the body {} tag, you can change font name, family and backup families to something else than what it is by default.
 
I managed to change font but it still doesn't have diacritics.
I copied new fonts to layout/fonts and changed css to something like this:

@font-face {
font-family: 'StMarieThin';
src: url('../fonts/StMarie-Thin.otf') format('otf');
}


#logo h1, #logo h2 {
font: normal 420% 'stmarie-thin', arial, sans-serif;
border-bottom: 0;
text-transform: none;
margin: 0;
}

I know this won't work on IE but i just wanted to see if it changes anything cause to be honest i have no idea what i'm doing ^_^

Even changed to Arial and it didn't worked as well lol :huh:

BTW. i know i'm just changing server name and motto, thats most i need ATM. I will worry about news after this one is done.
 
Why are passwords saved as 839e8320dad6f8f9b2f2a22b00081421hh123h12 I want them to be normal!
 
Why are passwords saved as 839e8320dad6f8f9b2f2a22b00081421hh123h12 I want them to be normal!

They are encrypted... check your config and check password=sha1 to password=plain or smt like that. Though, I dont see why anyone would want to do that.
 
Back
Top