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

Gesior AAC 2011 - Needed? Ideas?

I don't mean an auto acc maker, I mean fake accounts with fake e-mails :D with that we can even get rid off of the captcha system
+1 type in anything with an @ symbol and a .com
email sender and some small array with data about so called 5 minutes emails(of course they can make mails that will be abandoned or sth but its still better)
exactly it wont stop people. people can still easily have multiply accounts. I have 5 different emails i use regular so thats 5 accounts without even needing to set up a 1 time use email. It might work a little if someone is lazy but mostly the people who make multiply accounts are the ones who dont care about wasting their time to get an advantage or mess with the server.
 
One could make a registration limit per IP. Whether it be by count or by time.
 
I don't mean an auto acc maker, I mean fake accounts with fake e-mails :D with that we can even get rid off of the captcha system
10 Minute Mail
There are milions services like that :(
User can give you 'real' e-mail and press verify link in it.
I don't know why you want block 'fake accounts', if it's problem with number of them, you can remove them by creator IP or date of creation.
 
come on gesior! most of noobs don't know that (even me), btw using real (verified) e-mails is good so we can send newsletter etc... lets make a super combo :D verify e-mail+recaptcha+limit of created accounts (from same IP) in X time.
 
come on gesior! most of noobs don't know that (even me), btw using real (verified) e-mails is good so we can send newsletter etc... lets make a super combo :D verify e-mail+recaptcha+limit of created accounts (from same IP) in X time.
+1 I hate spam/junk/second accounts in my DB
 
@up
There will be IP of account creator in database. Check accounts with same IP and remove accounts that never logged.
This is part that create account:
PHP:
		$isAlreadyAccount = new Account($createAccountForm->getFieldValue('accountName'), Account::LOADTYPE_NAME);
		if(!$isAlreadyAccount->isLoaded())
		{
			$newAccount = new Account();
			$newAccount->setName($createAccountForm->getFieldValue('accountName'));
			$newAccount->setPassword(Website::getInstance()->encryptPassword($createAccountForm->getFieldValue('accountPassword')));
			$newAccount->setMail($createAccountForm->getFieldValue('accountEmail'));
			$newAccount->setGroupId($createAccountConfig->getValue('newAccountGroupId'));
			$newAccount->setCreateIP(ip2long($_SERVER['REMOTE_ADDR']));
			$newAccount->setCreateDate(time());
			$newAccount->save();
			$didCreateAccount = true;
			echo '<div class="bigTitle">Account created</div><br />';
			echo 'Now you can <a href="' . new Link('account', array('login')) . '">login</a>';
			if($createAccountConfig->isSetKey('sendMailWithLogin') && $createAccountConfig->getValue('sendMailWithLogin') && Website::getInstance()->canSendMail())
			{
				if(Website::getInstance()->sendMail(
				$createAccountForm->getFieldValue('accountEmail'),
				Display::getServerName() . ' - Registration',
				'<h2>Thank you for registration on our server ' . htmlspecialchars(Display::getServerName()) . '</h2>Here are informations about your account.<br />Name: <b>' . htmlspecialchars($createAccountForm->getFieldValue('accountName')) . '</b><br />Password: <b> ' . htmlspecialchars($createAccountForm->getFieldValue('accountPassword')) . '</b>',
				true))
					echo '<br />We sent you e-mail with account name and password.';
				else
					echo '<br />Unknown error occured. We cannot send you e-mail with account name and password, but you can login anyway.';
			}
			if($VISITOR->isLogged())
				$VISITOR->logout();
		}
Add anything more?
(limit of accounts per IP per time I will add when PlayersList class will be ready)
 
@up
There will be IP of account creator in database. Check accounts with same IP and remove accounts that never logged.
This is part that create account:
PHP:
		$isAlreadyAccount = new Account($createAccountForm->getFieldValue('accountName'), Account::LOADTYPE_NAME);
		if(!$isAlreadyAccount->isLoaded())
		{
			$newAccount = new Account();
			$newAccount->setName($createAccountForm->getFieldValue('accountName'));
			$newAccount->setPassword(Website::getInstance()->encryptPassword($createAccountForm->getFieldValue('accountPassword')));
			$newAccount->setMail($createAccountForm->getFieldValue('accountEmail'));
			$newAccount->setGroupId($createAccountConfig->getValue('newAccountGroupId'));
			$newAccount->setCreateIP(ip2long($_SERVER['REMOTE_ADDR']));
			$newAccount->setCreateDate(time());
			$newAccount->save();
			$didCreateAccount = true;
			echo '<div class="bigTitle">Account created</div><br />';
			echo 'Now you can <a href="' . new Link('account', array('login')) . '">login</a>';
			if($createAccountConfig->isSetKey('sendMailWithLogin') && $createAccountConfig->getValue('sendMailWithLogin') && Website::getInstance()->canSendMail())
			{
				if(Website::getInstance()->sendMail(
				$createAccountForm->getFieldValue('accountEmail'),
				Display::getServerName() . ' - Registration',
				'<h2>Thank you for registration on our server ' . htmlspecialchars(Display::getServerName()) . '</h2>Here are informations about your account.<br />Name: <b>' . htmlspecialchars($createAccountForm->getFieldValue('accountName')) . '</b><br />Password: <b> ' . htmlspecialchars($createAccountForm->getFieldValue('accountPassword')) . '</b>',
				true))
					echo '<br />We sent you e-mail with account name and password.';
				else
					echo '<br />Unknown error occured. We cannot send you e-mail with account name and password, but you can login anyway.';
			}
			if($VISITOR->isLogged())
				$VISITOR->logout();
		}
Add anything more?
(limit of accounts per IP per time I will add when PlayersList class will be ready)

In percentage how much of the AAC is done now?
Btw, will the mail server be setup within the aac or will you need to setup a mailserver yourself?
 
@up
There will be IP of account creator in database. Check accounts with same IP and remove accounts that never logged.
This is part that create account:
PHP:
		$isAlreadyAccount = new Account($createAccountForm->getFieldValue('accountName'), Account::LOADTYPE_NAME);
		if(!$isAlreadyAccount->isLoaded())
		{
			$newAccount = new Account();
			$newAccount->setName($createAccountForm->getFieldValue('accountName'));
			$newAccount->setPassword(Website::getInstance()->encryptPassword($createAccountForm->getFieldValue('accountPassword')));
			$newAccount->setMail($createAccountForm->getFieldValue('accountEmail'));
			$newAccount->setGroupId($createAccountConfig->getValue('newAccountGroupId'));
			$newAccount->setCreateIP(ip2long($_SERVER['REMOTE_ADDR']));
			$newAccount->setCreateDate(time());
			$newAccount->save();
			$didCreateAccount = true;
			echo '<div class="bigTitle">Account created</div><br />';
			echo 'Now you can <a href="' . new Link('account', array('login')) . '">login</a>';
			if($createAccountConfig->isSetKey('sendMailWithLogin') && $createAccountConfig->getValue('sendMailWithLogin') && Website::getInstance()->canSendMail())
			{
				if(Website::getInstance()->sendMail(
				$createAccountForm->getFieldValue('accountEmail'),
				Display::getServerName() . ' - Registration',
				'<h2>Thank you for registration on our server ' . htmlspecialchars(Display::getServerName()) . '</h2>Here are informations about your account.<br />Name: <b>' . htmlspecialchars($createAccountForm->getFieldValue('accountName')) . '</b><br />Password: <b> ' . htmlspecialchars($createAccountForm->getFieldValue('accountPassword')) . '</b>',
				true))
					echo '<br />We sent you e-mail with account name and password.';
				else
					echo '<br />Unknown error occured. We cannot send you e-mail with account name and password, but you can login anyway.';
			}
			if($VISITOR->isLogged())
				$VISITOR->logout();
		}
Add anything more?
(limit of accounts per IP per time I will add when PlayersList class will be ready)

Make sure it removes everything associated with the account & characters. Looks really good so far. I cant think of anything else at the moment to stop or limit multiply account creation
 
@up
If you make the layout it will be.

@Topic
Why does anyone care about the layout? Gesior is making the functions AAC. How it looks is up the YOU. It could look however you want it to look but you will need to code the layout yourself, pay for someone to code it for you, OR be a bum and hope someone releases it for free.
 
That's a good point Soul.
Yes good indeed, but I do NOT want to see anyone releasing that gay ass RL template, just so we can have heaps of n00bs with it on every ots site I can find!

For once be original!
 
License:
1. You will not release gay RL tibia layout!
2. bla bla bla...
....
:)

I wrote first version of vocations and vocation class.
class.vocations.php
PHP:
<?PHP
class Vocations
{
	private $vocations = array();
	private $XML;
	
	public function __construct($file)
	{
		$XML = new DOMDocument();
		if(!$XML->load($file))
			new Error_Critic('', 'Vocations::__construct - cannot load file <b>' . htmlspecialchars($file) . '</b>');

		$this->XML = $XML;
		$_tmp_vocations = array();

		foreach($XML->getElementsByTagName('vocation') as $vocation)
		{
			if($vocation->hasAttribute('id') && $vocation->hasAttribute('name'))
			{
				$vocationData = array();
				$vocationData['id'] = $vocation->getAttribute('id');
				$vocationData['name'] = $vocation->getAttribute('name');
				if($vocation->hasAttribute('fromvoc'))
					$vocationData['fromvoc'] = $vocation->getAttribute('fromvoc');
				else
					$vocationData['fromvoc'] = $vocationData['id'];
				if($vocation->hasAttribute('manamultiplier'))
					$vocationData['manamultiplier'] = $vocation->getAttribute('manamultiplier');
				else
					$vocationData['manamultiplier'] = 1;

				if($vocation->hasAttribute('gainhp'))
					$vocationData['gainhp'] = $vocation->getAttribute('gainhp');
				else
					$vocationData['gainhp'] = 0;
				if($vocation->hasAttribute('gainmana'))
					$vocationData['gainmana'] = $vocation->getAttribute('gainmana');
				else
					$vocationData['gainmana'] = 0;
				if($vocation->hasAttribute('gaincap'))
					$vocationData['gaincap'] = $vocation->getAttribute('gaincap');
				else
					$vocationData['gaincap'] = 0;

				if($vocation->hasAttribute('gainhpticks'))
					$vocationData['gainhpticks'] = $vocation->getAttribute('gainhpticks');
				else
					$vocationData['gainhpticks'] = 1;
				if($vocation->hasAttribute('gainhpamount'))
					$vocationData['gainhpamount'] = $vocation->getAttribute('gainhpamount');
				else
					$vocationData['gainhpamount'] = 0;

				if($vocation->hasAttribute('gainmanaticks'))
					$vocationData['gainmanaticks'] = $vocation->getAttribute('gainmanaticks');
				else
					$vocationData['gainmanaticks'] = 1;
				if($vocation->hasAttribute('gainmanaamount'))
					$vocationData['gainmanaamount'] = $vocation->getAttribute('gainmanaamount');
				else
					$vocationData['gainmanaamount'] = 0;

				if($vocation->hasAttribute('gainsoulticks'))
					$vocationData['gainsoulticks'] = $vocation->getAttribute('gainsoulticks');
				else
					$vocationData['gainsoulticks'] = 1;

				if($vocation->hasAttribute('attackspeed'))
					$vocationData['attackspeed'] = $vocation->getAttribute('attackspeed');
				else
					$vocationData['attackspeed'] = 2000;

				$_tmp_vocations[$vocation->getAttribute('id')] = $vocationData;
			}
			else
				new Error_Critic('#C', 'Cannot load vocation. <b>id</b> or/and <b>name</b> parameter is missing');
		}
		/*
		 * Set promotion level and base vocation id
		*/
		foreach($_tmp_vocations as $_tmp_vocation)
		{
			$_tmp_vocation['promotion'] = 0;
			$_tmp_vocation['base_id'] = $_tmp_vocation['id'];
			$promotion_voc = $_tmp_vocation;
			while($promotion_voc['fromvoc'] != $promotion_voc['id'])
			{
				$promotion_voc = $_tmp_vocations[$promotion_voc['fromvoc']];
				$_tmp_vocation['base_id'] = $promotion_voc['id'];
				$_tmp_vocation['promotion']++;
			}
			$this->vocations[$_tmp_vocation['id']] = new Vocation($_tmp_vocation);
		}
	}
	/*
	 * Get vocation
	*/
	public function getVocation($base_id, $promotion = 0)
	{
		foreach($this->vocations as $vocation)
			if($vocation->getBaseId() == $base_id && $vocation->getPromotion() == $promotion)
				return $vocation;
		return false;
	}
	/*
	 * Get vocation name without getting vocation
	*/
	public function getVocationName($base_id, $promotion = 0)
	{
		if($vocs = self::getVocation($base_id, $promotion))
			return $vocs->getName();
		return false;
	}
}
?>
class.vocation.php
(now only basic info)
PHP:
<?PHP
class Vocation
{
	private $data;
	
	public function __construct($data)
	{
		$this->data = $data;
	}

	public function getId()
	{
		return $this->data['id'];
	}

	public function getPromotion()
	{
		return $this->data['promotion'];
	}

	public function getParentVocation()
	{
		return $this->data['fromvoc'];
	}

	public function getName()
	{
		return $this->data['name'];
	}

	public function getBaseId()
	{
		return $this->data['base_id'];
	}
}
?>
Example of use:
PHP:
$vocs = new Vocations('C:/vocations.xml');
echo $vocs->getVocationName(1); // show 'Sorcerer'
echo $vocs->getVocationName(1, 1); // show 'Master Sorcerer'
echo $vocs->getVocationName(3,1); // show 'Royal Paladin'
$voc = $vocs->getVocation(1,1); // return master sorcerer vocation object
echo $voc->getId(); // show 5
Of course vocation file (in server files, external file or serialized object, all config in admin panel) in acc. maker will be definied and you don't have to know path, only use:
PHP:
$vocs = Website::getVocations();
or: // parameter 'true' will force reload vocations file - if you use few times 'Website::getVocations()', it will always return same object
PHP:
$vocs = Website::getVocations(true);
--------------------------------------------------------------
Today I'm working on 'create character' page.
This is current config file:
PHP:
<?PHP
$_web_config['formSize'] = 25;
$_web_config['useVerifyImage'] = false;
$_web_config['newPlayerGroupId'] = 1;
$_web_config['copyItems'] = true;
$_web_config['copySkills'] = true;

$_web_config['nameFieldSize'] = 25;
$_web_config['nameMinimumLenght'] = 1;
$_web_config['nameMaximumLenght'] = 30;
$_web_config['nameAllowedLetters'] = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM-' ";
$_web_config['nameMaxSameLetters'] = 2;
$_web_config['nameFirstWordsBlocked'] = array('god ', 'cm ', 'gm ', 'tutor ', 'admin ', 'hoster ', '-', "'", ' ');
$_web_config['nameLastWordsBlocked'] = array('-', "'", ' ');
$_web_config['nameWordsBlocked'] = array('account manager', 'gamemaster', 'game master', 'game-master', "game'master", '--', '- ', ' -', '  ', "''", "' ", " '", "'-", "-'");
$_web_config['nameFirstLettersUpper'] = true;

$_web_config['townsAllowed'] = array(1);
$_web_config['townsUserSelect'] = false;
$_web_config['townsSpawnInTemple'] = true;

$_web_config['sexAllowed'] = array(0, 1);
$_web_config['sexUserSelect'] = true;

$_web_config['vocationsShowInfo'] = true;
$_web_config['vocationsShowDescription'] = true;
$_web_config['vocationsAllowed'][0]['characterToCopy'] = 'Sorcerer Sample';
$_web_config['vocationsAllowed'][0]['name'] = 'Sorcerer';
$_web_config['vocationsAllowed'][0]['description'] = 'aaaaaaaaaaaa';

$_web_config['vocationsAllowed'][1]['characterToCopy'] = 'Druid Sample';
$_web_config['vocationsAllowed'][1]['name'] = 'Druid';
$_web_config['vocationsAllowed'][1]['description'] = 'bbbbbbbbbbbbbbbbbb';

$_web_config['vocationsAllowed'][2]['characterToCopy'] = 'Paladin Sample';
$_web_config['vocationsAllowed'][2]['name'] = 'Paladin';
$_web_config['vocationsAllowed'][2]['description'] = 'ccccccccccccccccccc';

$_web_config['vocationsAllowed'][3]['characterToCopy'] = 'Knight Sample';
$_web_config['vocationsAllowed'][3]['name'] = 'Knight';
$_web_config['vocationsAllowed'][3]['description'] = 'dddddddddddddddddddddddd';

?>
 
Fuu this:
PHP:
/* 
     * Get vocation name without getting vocation 
    */ 
    public function getVocationName($base_id, $promotion = 0) 
    { 
        if($vocs = self::getVocation($base_id, $promotion)) 
            return $vocs->getName(); 
        return false; 
    }
I think this is should be better:
PHP:
/* 
     * Get vocation name without getting vocation 
    */ 
    public function getVocationName($base_id, $promotion = true) 
    { 
        if($vocs = self::getVocation($base_id, $promotion)) 
            return $vocs->getName(); 
        return false; 
    }
Show $promotion as boolean, not integer.
 
It's INT and it will be INT, because it's PROMOTION LEVEL, not promotion on/off.
---------
PHP:
...

		/*
		 * Set promotion level and base vocation id
		*/
		foreach($_tmp_vocations as $_tmp_vocation)
		{
			$_tmp_vocation['promotion'] = 0;
			$_tmp_vocation['base_id'] = $_tmp_vocation['id'];
			$promotion_voc = $_tmp_vocation;
			while($promotion_voc['fromvoc'] != $promotion_voc['id'])
			{
				$promotion_voc = $_tmp_vocations[$promotion_voc['fromvoc']];
				$_tmp_vocation['base_id'] = $promotion_voc['id'];
				$_tmp_vocation['promotion']++;
			}
			$this->vocations[$_tmp_vocation['id']] = new Vocation($_tmp_vocation);
		}

..
------------------------------------------------------
FIRST CHARACTER CREATED WITH NEW ACCOUNT MAKER - 2011-07-07 22:24
------------------------------------------------------
 
Back
Top