Compare commits

...

15 Commits

Author SHA1 Message Date
slawkens1
ec6584555f update to 0.2.4 2017-06-09 07:00:47 +02:00
slawkens1
649facc5ab more fixes to loading of creatures
fixed when there are spaces at beginning of the file
fixed when file is unable to parse
2017-06-07 00:16:04 +02:00
slawkens1
57c2547098 added same printing to spells
more elegant way of showing message on reload creatures and spells
2017-06-06 23:32:50 +02:00
slawkens1
4fa32e79ce added id field on monsters, so you can delete in phpmyadmin
fixed adding some creatures with ' and "
2017-06-06 23:19:20 +02:00
Sławek
f393e525a6 Merge pull request #2 from JasonRox18/patch-2
added exp rate to the list
2017-06-06 13:23:35 +02:00
slawkens1
45b61e5f78 Fixed invite to guild 2017-06-05 01:00:07 +02:00
slawkens1
0219cc7a1f fixed typo loss_items => loss_containers
added highscores number_format so it shows 15,612,933,685 instead of
15612933685
2017-06-02 00:41:27 +02:00
JasonRox18
b212e9fb0f added exp rate to the list 2017-06-01 01:39:21 +01:00
slawkens1
ecef4de2d2 update to 0.2.3 2017-05-31 23:22:43 +02:00
slawkens1
e69ff12966 some fixes
* set default skills to 10 when creating new character
* fixed displaying of "Create forum thread" in newses
* fixed deleting guild
* fixed displaying vocation amount on online page
* better support for custom vocations, you just need to set in config
vocations_amount to yours.
2017-05-31 23:10:35 +02:00
slawkens1
6f10ee1965 fixed guild management on OTHire 0.0.3 2017-05-29 16:14:26 +02:00
slawkens1
d9bd1f6e99 Fixed https://otland.net/threads/myaac-v0-0-1.251454/page-8#post-2445222 2017-05-27 23:46:12 +02:00
slawkens1
35c8b65be7 Fixed huge space in player name
https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444328
2017-05-24 02:22:33 +02:00
slawkens1
753fb60e75 some small fix in guilds page 2017-05-23 22:01:34 +02:00
slawkens1
45e390c9d4 fixed https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444034
and https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444035
2017-05-23 21:50:18 +02:00
76 changed files with 221 additions and 137 deletions

View File

@@ -1,3 +1,23 @@
[0.2.4 - 09.06.2017]
- fixed invite to guild
- added id field on monsters, so you can delete them in phpmyadmin
- fixed adding some creatures with ' and "
- fixed when there are spaces at beginning of the file (creatures)
- fixed when file is unable to parse (creatures)
- fixed typo loss_items => loss_containers
- more elegant way of showing message on reload creatures and spells
[0.2.3 - 31.05.2017]
- fixed guild management on OTHire 0.0.3
- set default skills to 10 when creating new character
- fixed displaying of "Create forum thread" in newses
- fixed deleting guild on servers that use players.rank_id field
- fixed phpmailer class loading (https://otland.net/threads/myaac-v0-0-1.251454/page-8#post-2445222)
- fixed displaying vocation amount on online page
- better support for custom vocations, you just need to set in config vocations_amount to yours.
- fixed huge space in player name (https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444328)
- fixed Undefined variable (https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444034)
- fixed Undefined offset (https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2444035)
[0.2.2 - 22.05.2017]
- added missing cache/signature directory
- fixed https://otland.net/threads/myaac-v0-0-1.251454/page-7#post-2443868

View File

@@ -21,14 +21,14 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
session_start();
define('MYAAC', true);
define('MYAAC_VERSION', '0.2.2');
define('DATABASE_VERSION', 3);
define('MYAAC_VERSION', '0.2.4');
define('DATABASE_VERSION', 4);
define('TABLE_PREFIX', 'myaac_');
define('START_TIME', microtime(true));
define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : 'LINUX');

View File

@@ -13,7 +13,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
@@ -24,6 +24,8 @@ $config = array(
'template' => 'kathrine', // template used by website (kathrine, tibiacom)
'template_allow_change' => true, // allow users to choose their own template while browsing website?
'vocations_amount' => 4, // how much basic vocations your server got (without promotion)
// what client version are you using on this OT?
// used for the Downloads page and some templates aswell
'client' => 1098, // 954 = client 9.54

View File

@@ -21,7 +21,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/

View File

@@ -116,6 +116,7 @@ CREATE TABLE `myaac_hooks`
) ENGINE = MyISAM;
CREATE TABLE `myaac_monsters` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hide_creature` tinyint(1) NOT NULL default '0',
`name` varchar(255) NOT NULL,
`mana` int(11) NOT NULL,
@@ -129,7 +130,8 @@ CREATE TABLE `myaac_monsters` (
`convinceable` tinyint(1) NOT NULL,
`race` varchar(255) NOT NULL,
`gfx_name` varchar(255) NOT NULL,
`file_path` varchar(255) NOT NULL
`file_path` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = MyISAM;
CREATE TABLE `myaac_movies`

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -379,12 +379,12 @@ function delete_guild($id)
global $db, $ots;
foreach($rank_list as $rank_in_guild) {
if(fieldExist('rank_id', 'players'))
$players_with_rank = $db->query('SELECT `id`, `rank_id` FROM `players` WHERE `rank_id` = ' . $rank->getId() . ' AND `deleted` = 0;');
else if(tableExist('guild_members'))
if(tableExist('guild_members'))
$players_with_rank = $db->query('SELECT `players`.`id` as `id`, `guild_members`.`rank_id` as `rank_id` FROM `players`, `guild_members` WHERE `guild_members`.`rank_id` = ' . $rank_in_guild->getId() . ' AND `players`.`id` = `guild_members`.`player_id` ORDER BY `name`;');
else
else if(tableExist('guild_membership'))
$players_with_rank = $db->query('SELECT `players`.`id` as `id`, `guild_membership`.`rank_id` as `rank_id` FROM `players`, `guild_membership` WHERE `guild_membership`.`rank_id` = ' . $rank_in_guild->getId() . ' AND `players`.`id` = `guild_membership`.`player_id` ORDER BY `name`;');
else
$players_with_rank = $db->query('SELECT `id`, `rank_id` FROM `players` WHERE `rank_id` = ' . $rank_in_guild->getId() . ' AND `deleted` = 0;');
$players_with_rank_number = $players_with_rank->rowCount();
if($players_with_rank_number > 0) {
@@ -1149,7 +1149,7 @@ function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true)
global $mailer, $config;
if(!$mailer)
{
require(SYSTEM . 'libs/phpmailer/class.phpmailer.php');
require(SYSTEM . 'libs/phpmailer/PHPMailerAutoload.php');
$mailer = new PHPMailer();
}

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -123,11 +123,11 @@ if($cache->enabled() && $cache->fetch('vocations', $tmp)) {
}
else {
$vocations = new DOMDocument();
$path_extra = 'XML/';
if($config['otserv_version'] >= OTSERV_FIRST && $config['otserv_version'] <= OTSERV_LAST)
$path_extra = '';
$file = $config['data_path'] . 'XML/vocations.xml';
if(!@file_exists($file))
$file = $config['data_path'] . 'vocations.xml';
$vocations->load($config['data_path'] . $path_extra . 'vocations.xml');
$vocations->load($file);
if(!$vocations)
die('ERROR: Cannot load <i>vocations.xml</i> file.');
@@ -135,10 +135,7 @@ else {
$config['vocations'] = array();
foreach($vocations->getElementsByTagName('vocation') as $vocation) {
$id = $vocation->getAttribute('id');
//if($id == $vocation->getAttribute('fromvoc'))
$config['vocations'][$id] = $vocation->getAttribute('name');
//else
// $config['vocations'][$id] = $vocation->getAttribute('name');
$config['vocations'][$id] = $vocation->getAttribute('name');
}
if($cache->enabled()) {

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Slawkens <slawkens@gmail.com>
* @author Mark Samman (Talaturen) <marksamman@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -39,6 +39,16 @@
*/
class OTS_Monster extends DOMDocument
{
private $loaded = false;
public function loadXML($source , $options = 0)
{
$this->loaded = parent::loadXML($source, $options);
}
public function loaded()
{
return $this->loaded;
}
/**
* Returns monster name.
*

View File

@@ -117,7 +117,8 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess
{
// loads file
$monster = new OTS_Monster();
$monster->load($this->monstersPath . $this->monsters[$name]);
//echo $this->monstersPath . $this->monsters[$name];
$monster->loadXML(trim(file_get_contents($this->monstersPath . $this->monsters[$name])));
return $monster;
}

View File

@@ -217,8 +217,9 @@ class OTS_Player extends OTS_Row_DAO
$this->data['rank_id'] = 0;
if(isset($this->data['promotion'])) {
global $config;
if((int)$this->data['promotion'] > 0)
$this->data['vocation'] + ($this->data['promotion'] * 4);
$this->data['vocation'] += ($this->data['promotion'] * $config['vocations_amount']);
}
// loads skills
if( $this->isLoaded() )
@@ -472,7 +473,6 @@ class OTS_Player extends OTS_Row_DAO
if($id != $i - 1)
$set .= ',';
}
$skills = $this->db->query('UPDATE `players` SET ' . $set . ' WHERE `id` = ' . $this->data['id']);
@@ -1868,13 +1868,13 @@ class OTS_Player extends OTS_Row_DAO
public function setGuildNick($guildnick)
{
$this->data['guildnick'] = (string) $guildnick;
if(fieldExist('guildnick', 'players'))
$this->db->query('UPDATE `players` SET `guildnick` = ' . $this->db->quote($this->data['guildnick']) . ' WHERE `id` = ' . $this->getId());
else if(tableExist('guild_members'))
if(tableExist('guild_members'))
$this->db->query('UPDATE `guild_members` SET `nick` = ' . $this->db->quote($this->data['guildnick']) . ' WHERE `player_id` = ' . $this->getId());
else
else if(tableExist('guild_membership'))
$this->db->query('UPDATE `guild_membership` SET `nick` = ' . $this->db->quote($this->data['guildnick']) . ' WHERE `player_id` = ' . $this->getId());
}
else if(fieldExist('guildnick', 'players'))
$this->db->query('UPDATE `players` SET `guildnick` = ' . $this->db->quote($this->data['guildnick']) . ' WHERE `id` = ' . $this->getId());
}
/**
* @version 0.0.3
@@ -1907,23 +1907,29 @@ class OTS_Player extends OTS_Row_DAO
public function getRank()
{
$rank_id = 0;
if(fieldExist('rank_id', 'players')) {
$query = $this->db->query('SELECT `rank_id` FROM `players` WHERE `id`= ' . $this->data['id'] . ';')->fetch();
$rank_id = $query['rank_id'];
} else {
$table = 'guild_membership';
if(tableExist('guild_members'))
$table = 'guild_members';
$query = $this->db->query('SELECT `rank_id` FROM `' . $table . '` WHERE `player_id`= ' . $this->data['id'] . ' LIMIT 1;');
if(tableExist('guild_members')) {
$query = $this->db->query('SELECT `rank_id` FROM `guild_members` WHERE `player_id`= ' . $this->data['id'] . ' LIMIT 1;');
if($query->rowCount() == 1) {
$query = $query->fetch();
$rank_id = $query['rank_id'];
}
}
else if(tableExist('guild_membership')) {
$query = $this->db->query('SELECT `rank_id` FROM `guild_membership` WHERE `player_id`= ' . $this->data['id'] . ' LIMIT 1;');
if($query->rowCount() == 1) {
$query = $query->fetch();
$rank_id = $query['rank_id'];
}
}
else if(fieldExist('rank_id', 'players')) {
$query = $this->db->query('SELECT `rank_id` FROM `players` WHERE `id`= ' . $this->data['id'] . ';')->fetch();
$rank_id = $query['rank_id'];
}
if($rank_id == 0) {
return new OTS_GuildRank();
}
if($rank_id == 0) return new OTS_GuildRank();;
$guildRank = new OTS_GuildRank();
$guildRank->load($rank_id);
return $guildRank;
@@ -2168,7 +2174,7 @@ class OTS_Player extends OTS_Row_DAO
throw new E_OTS_NotLoaded();
}
return $this->data['loss_items'];
return $this->data['loss_containers'];
}
public function setLossContainers($loss_containers)
{

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

3
system/migrations/4.php Normal file
View File

@@ -0,0 +1,3 @@
<?php
$db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `id` int(11) NOT NULL AUTO_INCREMENT primary key FIRST;");
?>

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -1066,7 +1066,7 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
$char_to_copy = new OTS_Player();
$char_to_copy->find($char_to_copy_name);
if(!$char_to_copy->isLoaded())
$newchar_errors[] .= 'Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config/config.php and set valid characters to copy names. Character to copy'.$char_to_copy_name.'</b> doesn\'t exist.';
$newchar_errors[] .= 'Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config/config.php and set valid characters to copy names. Character to copy: <b>'.$char_to_copy_name.'</b> doesn\'t exist.';
}
if(empty($newchar_errors))
@@ -1106,6 +1106,9 @@ Please enter your account name and your password.<br/><a href="?subtopic=createa
$player->setManaSpent($char_to_copy->getManaSpent());
$player->setSoul($char_to_copy->getSoul());
for($skill = POT::SKILL_FIRST; $skill <= POT::SKILL_LAST; $skill++)
$player->setSkill($skill, 10);
$player->setLookBody($char_to_copy->getLookBody());
$player->setLookFeet($char_to_copy->getLookFeet());
$player->setLookHead($char_to_copy->getLookHead());

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -58,7 +58,7 @@ function generate_player_lookup($player)
if(!isset($player_eq[$i]) || $player_eq[$i] == 0)
$player_eq[$i] = $empty_slots[$i];
}
/*
if(PHP_VERSION_ID == NULL || PHP_VERSION_ID < 70000) {
for($i = 1; $i < 11; $i++)
{
@@ -66,7 +66,7 @@ function generate_player_lookup($player)
Items::generate($player_eq[$i]);
}
}
*/
for($i = 1; $i < 11; $i++)
{
if(check_number($player_eq[$i]))
@@ -505,7 +505,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil
if($mostdmg)
{
$mostdmg = ($death['mostdamage_is_player']) ? getPlayerLink($death['mostdamage_by']) : $death['mostdamage_by'];
$dead_add_content .= '<br>and by ' . $mostdmg;
$dead_add_content .= ' and by ' . $mostdmg;
if ($death['mostdamage_unjustified']) {
$dead_add_content .= " <font color='red' style='font-style: italic;'>(unjustified)</font>";
@@ -711,7 +711,7 @@ else
foreach($query as $player) {
if(isset($player['promotion'])) {
if((int)$player['promotion'] > 0)
$player['vocation'] + ($player['promotion'] * 4);
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
}
echo '<li>' . getPlayerLink($player['name']) . ' (<small><strong>level ' . $player['level'] . ', ' . $config['vocations'][$player['vocation']] . '</strong></small>)</li>';
}

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -72,6 +72,10 @@ if(isset($_POST['reload_monsters']) && $canEdit)
//add monsters
foreach($allmonsters as $lol) {
$monster = $allmonsters->current();
if(!$monster->loaded()) {
warning('Error while adding monster: ' . $allmonsters->currentFile());
continue;
}
//load monster mana needed to summon/convince
$mana = $monster->getManaCost();
//load monster experience
@@ -135,9 +139,15 @@ if(isset($_POST['reload_monsters']) && $canEdit)
$flags['convinceable'] = '0';
if(!in_array($name, $names_added)) {
try { $db->query("INSERT INTO myaac_monsters (hide_creature, name, mana, exp, health, speed_lvl, use_haste, voices, immunities, summonable, convinceable, race, gfx_name, file_path) VALUES (0, '".$name."', '".$mana."', '".$exp."', '".$health."', '".$speed_lvl."', '".$use_haste."', '".$voices_string."', '".$immunities_string."', '".$flags['summonable']."', '".$flags['convinceable']."', '".$race."', '".$gfx_name."', '" . $allmonsters->currentFile() . "')"); } catch(PDOException $error) {}
try {
$db->query("INSERT INTO myaac_monsters (hide_creature, name, mana, exp, health, speed_lvl, use_haste, voices, immunities, summonable, convinceable, race, gfx_name, file_path) VALUES (0, ".$db->quote($name).", '".$mana."', '".$exp."', '".$health."', '".$speed_lvl."', '".$use_haste."', ".$db->quote($voices_string).", ".$db->quote($immunities_string).", '".$flags['summonable']."', '".$flags['convinceable']."', '".$race."', ".$db->quote($gfx_name).", " . $db->quote($allmonsters->currentFile()) . ")");
success("Added: ".$name."<br/>");
}
catch(PDOException $error) {
warning('Error while adding monster (' . $name . '): ' . $error->getMessage());
}
$names_added[] = $name;
echo "Added: ".$name."<br/>";
}
}
}

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
$title = 'Downloads';

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -17,6 +17,7 @@ if(tableExist('guild_members'))
else
define('GUILD_MEMBERS_TABLE', 'guild_membership');
define('MOTD_EXISTS', fieldExist('motd', 'guilds'));
if($action == 'login')
{
if(check_guild_name($_REQUEST['guild']))
@@ -52,7 +53,9 @@ if($action == '')
//echo 'Guilds needs to have atleast 4 members, otherwise it will be deleted automatically after 4 days.<BR/><BR/>Guild statistics are self-updated once per 3 days.<BR/><BR/>';
echo '<A HREF="?subtopic=guilds&preview=1">Normal preview</A> / <A HREF="?subtopic=guilds&preview=2">Advanced ranks & statistics</A><BR/><BR/><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
//echo '<A HREF="?subtopic=guilds&preview=1">Normal preview</A> / <A HREF="?subtopic=guilds&preview=2">Advanced ranks & statistics</A><BR/><BR/>
echo '
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR='.$config['vdarkborder'].'><TD COLSPAN='.($_REQUEST['preview'] == 2 ? '7' : '3').' class="white"><B>Active Guilds on '.$config['lua']['serverName'].'</B></TD></TR>
<TR BGCOLOR='.$config['darkborder'].' '.($_REQUEST['preview'] == 2 ? 'ALIGN="CENTER"' : '' ).'>';
if($_REQUEST['preview'] == 2) {
@@ -297,7 +300,7 @@ if($action == 'show')
//$s_total_members++;
//$s_total_level += $player->getLevel();
echo '<TR><TD><FORM ACTION="?subtopic=guilds&action=change_nick&name='.$player->getName().'" METHOD=post>' . getPlayerLink($player->getName());
echo '<TR><TD>' . getPlayerLink($player->getName()) . '<FORM ACTION="?subtopic=guilds&action=change_nick&name='.$player->getName().'" METHOD=post>';
$guild_nick = $player->getGuildNick();
if($logged)
{
@@ -316,8 +319,8 @@ if($action == 'show')
if($level_in_guild > $rank->getLevel() || $guild_leader)
if($guild_leader_char->getName() != $player->getName())
echo '&nbsp;<font size=1>{<a href="?subtopic=guilds&action=kickplayer&guild='.urlencode($guild->getName()).'&name='.urlencode($player->getName()).'">KICK</a>}</font>';
if($player->isOnline())
$s_members_online++;
//if($player->isOnline())
// $s_members_online++;
echo '</FORM></TD><TD align="right" width="10%">'.$player->getLevel().'</TD><TD align="right" width="20%"><font color="'.($player->isOnline() ? 'green"><b>Online' : 'red"><b>Offline').'</b></font></TD></TR>';
}
echo '</TABLE></TD></TR>';
@@ -800,7 +803,7 @@ $guild_errors[] = 'Player with name <b>'.$name.'</b> doesn\'t exist.';
else
{
$rank_of_player = $player->getRank();
if($player_rank->isLoaded()) {
if($rank_of_player->isLoaded()) {
$guild_errors[] = 'Player with name <b>'.$name.'</b> is already in guild. He must leave guild before you can invite him.';
}
}
@@ -1301,7 +1304,7 @@ if(isset($todo) && $todo == 'save')
$player->setRank($rank);
}
}
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD class="white"><B>Create guild</B></TD></TR><TR BGCOLOR='.$config['darkborder'].'><TD WIDTH=100%><b>Congratulations!</b><br/>You have created guild <b>'.$guild_name.'</b>. <b>'.$player->getName().'</b> is leader of this guild. Now you can invite players, change picture, description and motd of guild. Press submit to open guild manager.</TD></TR></TABLE><br/><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100%><FORM ACTION="?subtopic=guilds&action=show&guild='.$guild_name.'" METHOD=post><TR><TD><center><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$template_path.'/images/buttons/sbutton_Submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></center></TD></TR></FORM></TABLE>';
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['vdarkborder'].'><TD class="white"><B>Create guild</B></TD></TR><TR BGCOLOR='.$config['darkborder'].'><TD WIDTH=100%><b>Congratulations!</b><br/>You have created guild <b>'.$guild_name.'</b>. <b>'.$player->getName().'</b> is leader of this guild. Now you can invite players, change picture, description' . (MOTD_EXISTS ? ' and motd' : '') . ' of guild. Press submit to open guild manager.</TD></TR></TABLE><br/><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100%><FORM ACTION="?subtopic=guilds&action=show&guild='.$guild_name.'" METHOD=post><TR><TD><center><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$template_path.'/images/buttons/sbutton_Submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></center></TD></TR></FORM></TABLE>';
/*$db->query('INSERT INTO `guild_ranks` (`id`, `guild_id`, `name`, `level`) VALUES (null, '.$new_guild->getId().', "the Leader", 3)');
$db->query('INSERT INTO `guild_ranks` (`id`, `guild_id`, `name`, `level`) VALUES (null, '.$new_guild->getId().', "a Vice-Leader", 2)');
$db->query('INSERT INTO `guild_ranks` (`id`, `guild_id`, `name`, `level`) VALUES (null, '.$new_guild->getId().', "a Member", 1)');*/
@@ -1385,8 +1388,10 @@ echo '<br/><br/><table style=\'clear:both\' border=0 cellpadding=0 cellspacing=0
<tr bgcolor='.$config['darkborder'].'><td width="170"><font color="red"><b>Option</b></font></td><td><font color="red"><b>Description</b></font></td></tr>
<tr bgcolor='.$config['lightborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=passleadership">Pass Leadership</a></b></td><td><b>Pass leadership of guild to other guild member.</b></td></tr>
<tr bgcolor='.$config['darkborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=deleteguild">Delete Guild</a></b></td><td><b>Delete guild, kick all members.</b></td></tr>
<tr bgcolor='.$config['lightborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changedescription">Change Description</a></b></td><td><b>Change description of guild.</b></td></tr>
<tr bgcolor='.$config['darkborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changemotd">Change MOTD</a></b></td><td><b>Change MOTD of guild.</b></td></tr>
<tr bgcolor='.$config['lightborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changedescription">Change Description</a></b></td><td><b>Change description of guild.</b></td></tr>';
if(MOTD_EXISTS)
echo '<tr bgcolor='.$config['darkborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changemotd">Change MOTD</a></b></td><td><b>Change MOTD of guild.</b></td></tr>';
echo '
<tr bgcolor='.$config['lightborder'].'><td width="170"><b><a href="?subtopic=guilds&guild='.$guild->getName().'&action=changelogo">Change guild logo</a></b></td><td><b>Upload new guild logo.</b></td></tr>
</table>';
echo '<br><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Add new rank</div> <span class="CaptionVerticalRight" style="background-image:url('.$template_path.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$template_path.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$template_path.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td width="120" valign="top">New rank name:</td><td> <form action="?subtopic=guilds&guild='.$guild->getName().'&action=addrank" method="POST"><input type="text" name="rank_name" size="20"><input type="submit" value="Add"></form></td></tr> </table> </div> </table></div></td></tr>';
@@ -1414,8 +1419,10 @@ echo '<h3>Ranks info:</h3><b>0. Owner of guild</b> - it\'s highest rank, only on
<li>Invite/Cancel Invitation/Kick Player from guild
<li>Change ranks of all players in guild
<li>Delete guild or pass leadership to other guild member
<li>Change names, levels(leader,vice,member), add and delete ranks
<li>Change MOTD, logo and description of guild<hr>
<li>Change names, levels(leader,vice,member), add and delete ranks';
if(MOTD_EXISTS)
echo '<li>Change MOTD, logo and description of guild<hr>';
echo '
<b>3. Leader</b> - it\'s second rank in guild. Player with this rank can:
<li>Invite/Cancel Invitation/Kick Player from guild (only with lower rank than his)
<li>Change ranks of players with lower rank level ("vice leader", "member") in guild<hr>
@@ -2060,7 +2067,7 @@ echo '<br/><center><form action="?subtopic=guilds" METHOD=post><div class="BigBu
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
if($action == 'changemotd') {
if($action == 'changemotd' && MOTD_EXISTS) {
$guild_name = $_REQUEST['guild'];
if(!check_guild_name($guild_name)) {
$guild_errors[] = 'Invalid guild name format.';

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -209,7 +209,7 @@ echo '
if($config['highscores_vocation']) {
if(isset($player['promotion'])) {
if((int)$player['promotion'] > 0)
$player['vocation'] + ($player['promotion'] * 4);
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
}
echo '<br/><small>' . $config['vocations'][$player['vocation']] . '</small>';
@@ -221,7 +221,7 @@ echo '
</td>';
if($skill == POT::SKILL__LEVEL)
echo '<td><center>' . $player['experience'] . '</center></td>';
echo '<td><center>' . number_format($player['experience']) . '</center></td>';
echo '</tr>';
}

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -372,7 +372,7 @@ if(!$news_cached)
</td>
</tr>
<?php
if($action == 'add'):
if($action == ''):
?>
<tr bgcolor="<?php echo getStyle($rows++); ?>">
<td><b>Create forum thread in section:</b></td>

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
$_GET['archive'] = true;

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -52,7 +52,12 @@ if($config['online_outfit']) {
}
}
$vocs = array(0, 0, 0, 0, 0);
if($config['online_vocations']) {
$vocs = array();
foreach($config['vocations'] as $id => $name)
$vocs[$id] = 0;
}
if(tableExist('players_online')) // tfs 1.0
$playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `level`, `vocation`' . $outfit . ', `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players`, `players_online` WHERE `players`.`id` = `players_online`.`player_id` AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order);
else
@@ -75,9 +80,9 @@ foreach($playersOnline as $player)
if(isset($player['promotion'])) {
if((int)$player['promotion'] > 0)
$player['vocation'] + ($player['promotion'] * 4);
$player['vocation'] += ($player['promotion'] * $config['vocations_amount']);
}
$data .= '<tr bgcolor="' . getStyle(++$players) . '">';
if($config['account_country'])
$data .= '<td>' . getFlagImage($player['country']) . '</td>';
@@ -90,7 +95,8 @@ foreach($playersOnline as $player)
<td>'.$config['vocations'][$player['vocation']].'</td>
</tr>';
$vocs[$player['vocation']]++;
if($config['online_vocations'])
$vocs[($player['vocation'] > $config['vocations_amount'] ? $player['vocation'] - $config['vocations_amount'] : $player['vocation'])]++;
}
if(!$players): ?>
@@ -135,6 +141,8 @@ if(!$players): ?>
else if(tableExist('server_config')) { // tfs 1.0
$query = $db->query('SELECT `value` as `record` FROM `server_config` WHERE `config` = ' . $db->quote('players_record'));
}
else
$query = NULL;
if(isset($query) && $query->rowCount() > 0)
{
@@ -180,7 +188,7 @@ if($config['online_vocations']): ?>
</tr>
<?php
for($i = 1; $i < 5; $i++)
for($i = 1; $i <= $config['vocations_amount']; $i++)
echo '<tr bgcolor="' . getStyle($i) . '">
<td width="25%">' . $config['vocations'][$i] . '</td>
<td width="75%">' . $vocs[$i] . '</td>

View File

@@ -6,7 +6,7 @@
* @author Averatec <pervera.pl & otland.net>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -60,6 +60,8 @@ if(isset($config['lua']['experience_stages']))
echo '<li>Houses with inactive owners are cleaned after 30 days.</li>';
}
if(isset($config['lua']['rate_exp']))
$config['lua']['rateExp'] = $config['lua']['rate_exp'];
if(isset($config['lua']['rate_mag']))
$config['lua']['rateMagic'] = $config['lua']['rate_mag'];
if(isset($config['lua']['rate_skill']))
@@ -72,7 +74,10 @@ if(isset($config['lua']['experience_stages']))
<br/>
<h2>Rates</h2>
<?php if(isset($config['lua']['rateMagic'])): ?>
<?php if(isset($config['lua']['rateExp'])): ?>
<li>Exp Rate: <b>x<?php echo $config['lua']['rateExp']; ?></b></li>
<?php endif;
if(isset($config['lua']['rateMagic'])): ?>
<li>Magic Level: <b>x<?php echo $config['lua']['rateMagic']; ?></b></li>
<?php endif;
if(isset($config['lua']['rateSkill'])): ?>

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
@@ -68,8 +68,13 @@ if(isset($_POST['reload_spells']) && $canEdit)
}
$type = 2;
$count = $spell->getConjureCount();
try { $db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES ('".$spell_txt."', '".$name."', '".$spell_txt."', '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')"); } catch(PDOException $error) {}
echo "Added: ".$name."<br>";
try {
$db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES ('".$spell_txt."', '".$name."', '".$spell_txt."', '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')");
success("Added: ".$name."<br>");
}
catch(PDOException $error) {
warning('Error while adding spell (' . $name . '): ' . $error->getMessage());
}
}
//add instant spells
@@ -118,8 +123,13 @@ if(isset($_POST['reload_spells']) && $canEdit)
}
$type = 1;
$count = 0;
try { $db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES ('".$spell_txt."', '".$name."', '".$spell_txt."', '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')"); } catch(PDOException $error) {}
echo "Added: ".$name."<br/>";
try {
$db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES (".$db->quote($spell_txt).", ".$db->quote($name).", ".$db->quote($spell_txt).", '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')");
success("Added: ".$name."<br/>");
}
catch(PDOException $error) {
warning('Error while adding spell (' . $name . '): ' . $error->getMessage());
}
}
}

View File

@@ -6,7 +6,7 @@
* @author Gesior <jerzyskalski@wp.pl>
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -5,7 +5,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.2.2
* @version 0.2.4
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');

View File

@@ -6,7 +6,7 @@
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2016 WodzAAC
* @version 0.2.2
* @version 0.2.4
* @link http://myaac.info
*/