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

MyAAC v0.8.13

@slaw Bro how i can use $_GET on new pages created in system/pages?

Lua:
<?php
/**
 * Items
 *
 * @package   MyAAC
 * @author    Gesior <[email protected]>
 * @author    Slawkens <[email protected]>
 * @copyright 2019 MyAAC
 * @link      https://my-aac.org
 */
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Items';

if(isset($_GET['item_id']))
{
    echo 'This is a new page using $_GET to show items.';
}

Im trying using url /?items/2195 but i got

Code:
The requested URL /?items/2195 was not found on this server.
 
@slaw Bro how i can use $_GET on new pages created in system/pages?

Lua:
<?php
/**
 * Items
 *
 * @package   MyAAC
 * @author    Gesior <[email protected]>
 * @author    Slawkens <[email protected]>
 * @copyright 2019 MyAAC
 * @link      https://my-aac.org
 */
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Items';

if(isset($_GET['item_id']))
{
    echo 'This is a new page using $_GET to show items.';
}

Im trying using url /?items/2195 but i got

Code:
The requested URL /?items/2195 was not found on this server.

This is a bit tricky actually. You need to use the other format to pass parameters.

Like this:

/?p=items&id=5

Then you can use $_GET['id']

2. Option if you want to use friendly URLs like /items/5 then you can modify this array in index.php where rules are defined:
 
This is a bit tricky actually. You need to use the other format to pass parameters.

Like this:

/?p=items&id=5

Then you can use $_GET['id']

2. Option if you want to use friendly URLs like /items/5 then you can modify this array in index.php where rules are defined:
Thanks you, i add the rule on index.php and work very well, greetings!
 
@slaw friendly URLs work only with apache and mod rewrite? If i use nginx and create rewrite rule it was working fine?

It works in both, because rules are defined in index.php

Just redirect all to index.php, it's easy in nginx
 
Some of my pages stopped work after this commit, report is page is not found, but just my shop page you know how i can fix it ?

the official patch has some issues like it won't pass custom pages like pages/foo.bar.php nor will it pass pages/Ødegår.php, nor will it pass pages/subfolder/blah.php,

if your problem is any of the first 2, then try replacing
Code:
if(!@file_exists($file) || preg_match('/[^A-z0-9_\-]/', $page))
with
Code:
if(strlen($page) !== strcspn($page, '/\\') || !@file_exists($file))

but if your problem is subfolders, then it gets tricky, you'll have to do something like
Code:
$includeFile = file_exists($file);
if($includeFile){
    $includeFile = realpath($file);
    if(0!==strpos($includeFile, SYSTEM . 'pages'.DIRECTORY_SEPARATOR)){
        $includeFile=false;
    }
}
if(false===$includeFile){
        {
            $page = '404';
             (...)

!PS i'm confident about the first solution, but i want someone else to verify the 2nd solution (the solution that supports subfolders, i'm not completely confident that i didn't make any mistakes there, and i haven't tested it)
 
Last edited:
Having problems creating a character. No errors but the new characters do not copy temple position or town ID from my samples.
(Samples have positions and town set in my database)
They copy outfits and eq but new player cannot login due to wrong temple position!
any help?
 
Thats because MyAAC doesn't copy the town from the sample chars, it creates it based on the selection the player chooses when creating a char.

if you wanted to change this you will need to edit a number of files.

example:
this line sets the town and would need to be something like.
PHP:
$player->setTownId($char_to_copy->getTownId());

see image below for the character create functions.
1633106501179.png
 
Thats because MyAAC doesn't copy the town from the sample chars, it creates it based on the selection the player chooses when creating a char.

if you wanted to change this you will need to edit a number of files.

example:
this line sets the town and would need to be something like.
PHP:
$player->setTownId($char_to_copy->getTownId());

see image below for the character create functions.
View attachment 62461
It works now, thank you!
 
The Question: what should I do? What do you need?

The Question is general about MyAAC.

I need to accomulate thoughts.
 
The Question: what should I do? What do you need?

The Question is general about MyAAC.

I need to accomulate thoughts.
I'm working on TFS 1.4 upgrade to version 12.72 (you can find it on my github). If you would like to join my cause, you can make a login.php file compatible with it.
 
Here are all the plugins, packed as .zip files, in the directory:


It's official website, download only from here, please!

They are all in the latest versions.

I won't update each thread here on otland, because it's time waste.

Please inform everyone that you know, that there is a new way to download plugins.
 
Last edited:
Not sure who deleted my message but how is it unrelated to the thread when it is myaac Im using and the item generator is a part of myaac?
 
Not sure who deleted my message but how is it unrelated to the thread when it is myaac Im using and the item generator is a part of myaac?

I reported two last posts, because in the thread I wrote: "Please use support board if you have issues".

This topic should be used as discussion thread about myaac, and not for problems with myaac.

So - if you have issue - please use support board - Support (https://otland.net/forums/support.16/)
 
Hi, is my engine not fully compatible with myaac?
When i reload monsters on webpage i got errors like that:
Error while adding monster (Amazon): SQLSTATE[HY000]: General error: 1364 Field 'elements' doesn't have a default value
 
Is there a way to add for example 7 days of premium to every new account?
And how to edit the sample chars? Can't find an linked tutorial in here..
 
Back
Top