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

AAC [HELP] MyAAC Headline not work

3221920

New Member
Joined
May 9, 2023
Messages
12
Reaction score
2
Location
España
Hello. I would be infinitely grateful to anyone who can help me solve this problem. On my website MyAAC has added a new section to explain my enchantment system. This is all perfect, the only bad thing is that I can't change the image of the headline. Does anyone know how to get it? I tried everything and looked in depth at the forum posts but couldn't figure it out. At this point my only alternative is to ask.

Thank you very much for your interest and if you help me, thank you even more.

my enchantmentsystem.php code located in htdocs\system\pages\enchantmentsystem.php

PHP:
<div style="text-align:center">
    <h1>Enchantment System</h1>
</div>

<p><strong>How it Works?</strong></p>
<p>The enchantment system allows players to evolve their special weapons to make them more powerful. Special weapons are those that can be obtained from the dwarves on the island of Eremo. Currently, enchantment essences can only be used on these weapons.</p>
<img src="images/essences/example.jpg" alt="Example Essence" />

<p><strong>How to Obtain Essences</strong></p>
<p>To obtain essences, you must purchase them from the NPC Roger The Lone, who is located in Maya City. However, you will need to complete a quest to approach him.</p>
<img src="images/essences/roger.jpg" alt="Roger The Lone" />

<p><strong>Conditions</strong></p>
<p>All items have a single enchantment slot, so you can imbue them with the corresponding essence only once. If the result is not as desired or you simply wish to remove the enchantment, you can use an Essence Remover to achieve it. Roger sells this item for 10 Crystal Coins.</p>

<h3>Enchanted Items</h3>
<table style="width:100%; border-collapse: collapse;">
    <tr>
        <th style="border: 1px solid #ddd; padding: 8px;">Look</th>
        <th style="border: 1px solid #ddd; padding: 8px;">Name</th>
        <th style="border: 1px solid #ddd; padding: 8px;">Utility</th>
        <th style="border: 1px solid #ddd; padding: 8px;">Use on</th>
    </tr>
    <tr>
        <td style="border: 1px solid #ddd; padding: 8px;"><img src="images/essences/ml.gif" alt="Magic Essence"></td>
        <td style="border: 1px solid #ddd; padding: 8px;">Magic Essence</td>
        <td style="border: 1px solid #ddd; padding: 8px;">Adds between 1 and 15 points of magic level to the item</td>
        <td style="border: 1px solid #ddd; padding: 8px;">Spellbooks and wands or rods</td>
    </tr>
        <tr>
            <td style="border: 1px solid #ddd; padding: 8px;"><img src="images/essences/melee.gif" alt="Melee Essence"></td>
            <td style="border: 1px solid #ddd; padding: 8px;">Melee Essence</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Adds between 1 and 15 points of all melee skills to the item</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Swords, axes, or clubs</td>
        </tr>
        <tr>
            <td style="border: 1px solid #ddd; padding: 8px;"><img src="images/essences/distance.gif" alt="Distance Essence"></td>
            <td style="border: 1px solid #ddd; padding: 8px;">Distance Essence</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Adds between 1 and 15 points of distance to the item</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Bows and crossbows</td>
        </tr>
        <tr>
            <td style="border: 1px solid #ddd; padding: 8px;"><img src="images/essences/shield.gif" alt="Shield Essence"></td>
            <td style="border: 1px solid #ddd; padding: 8px;">Shield Essence</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Adds between 1 and 15 points of defense to the item</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Shields and spellbooks</td>
        </tr>
        <tr>
            <td style="border: 1px solid #ddd; padding: 8px;"><img src="images/essences/mana.gif" alt="Mana Essence"></td>
            <td style="border: 1px solid #ddd; padding: 8px;">Mana Essence</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Adds between 1% and 10% more mana points to the item</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Armors, shields, amulets, legs, helmets, boots, backpacks</td>
        </tr>
        <tr>
            <td style="border: 1px solid #ddd; padding: 8px;"><img src="images/essences/health.gif" alt="Health Essence"></td>
            <td style="border: 1px solid #ddd; padding: 8px;">Health Essence</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Adds between 1% and 10% more health points to the item</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Armors, shields, amulets, legs, helmets, boots, backpacks</td>
        </tr>
        <tr>
            <td style="border: 1px solid #ddd; padding: 8px;"><img src="images/essences/remover.gif" alt="Essence Remover"></td>
            <td style="border: 1px solid #ddd; padding: 8px;">Essence Remover</td>
            <td style="border: 1px solid #ddd; padding: 8px;">Can remove any essence assigned to an item</td>
            <td style="border: 1px solid #ddd; padding: 8px;">All</td>
        </tr>
    </table>
</div>

my headline.php

PHP:
<?php
//require '../../common.php';

//$text = $_GET['text'];
/*
$page_file = BASE . 'pages/' . PAGE . '.php';
if(!@file_exists($page_file))
{
    $page_file = BASE . 'pages/custom/' . PAGE . '.php';
    if(!@file_exists($page_file))
        die('Page does not exists.');
}
*/
//$file = 'images/header/headline-' . PAGE . '.gif';
//if(!file_exists($file))
//{
    if(strlen($_GET['t']) > 100) // max limit
        $_GET['t'] = '';

    // set font path
    putenv('GDFONTPATH=' . __DIR__);

    // create image
    $image = imagecreatetruecolor(250, 28);

    // make the background transparent
    imagecolortransparent($image, imagecolorallocate($image, 0, 0, 0));

    // set text
    $font = getenv('GDFONTPATH') . DIRECTORY_SEPARATOR . 'martel.ttf';
    imagettftext($image, 18, 0, 4, 20, imagecolorallocate($image, 240, 209, 164), $font, utf8_decode($_GET['t']));

    // header mime type
    header('Content-type: image/gif');

    // save image
    imagegif($image/*, $file*/);
//}

// output image
//header('Content-type: image/gif');
//readfile($file);
?>
 

Attachments

Do you have an image called that? headline.enhancementsystem.gif or smth?
In \htdocs\templates\tibiacom\images\header you can see what the other header-images looks like.
 
Do you have an image called that? headline.enhancementsystem.gif or smth?
In \htdocs\templates\tibiacom\images\header you can see what the other header-images looks like.
EDIT: Im foolish. I had created the image, but instead of naming it "headline-enchantmentsystem" I named it "enchantmentsystem". Its resolved. Thank you very much.
 
Last edited:
Regardless of that, that script should work. If you will create new pages, you will still have this problem, or you will need to create that images manually.

What does it show when you open the image in new browser tab?

Any errors?

If it shows error: "Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor() " then it means you don't have the "gd" extension in php.ini enabled.
 
Regardless of that, that script should work. If you will create new pages, you will still have this problem, or you will need to create that images manually.

What does it show when you open the image in new browser tab?

Any errors?

If it shows error: "Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor() " then it means you don't have the "gd" extension in php.ini enabled.
Thanks a lot for the comment. Tonight when I return home I will confirm what you are telling me and I will edit this comment to see if in future additions I should not do it manually again.
 
Back
Top