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

[PHP] Character Signature API

i have a problem when some one use a item that shine like golden ignot or soft boots rings bla bla bla all the 3 slot of the bottom bug it :S
 
I just created a new Signature API for my otlist (new PHP edition), and now I see that you made something that is 90% the same before me (mine got a few extra things, not so important). Damn, now I feel shitty about my waste of time :p

Can I assume this is public domain/BSD?
 
i have a problem when some one use a item that shine like golden ignot or soft boots rings bla bla bla all the 3 slot of the bottom bug it :S
What you can do to temporarily solve this is to save the rings etc from Tibia wikia.

I just created a new Signature API for my otlist (new PHP edition), and now I see that you made something that is 90% the same before me (mine got a few extra things, not so important). Damn, now I feel shitty about my waste of time :p

Can I assume this is public domain/BSD?
Use it however you feel like using it. I don't even mind if you earn money by using it. All I ask for is that the copyright inside the file remains.
 
The API allows you to include images in the signature, and if you create e.g. a GD script showing the outfit and the colours (as the one TibiaCast is using) it would be possible, yes. This API is however not directly linked with Tibia, and can be used for much more.
 
This is just an example on how to solve a cpu overload issue.
it has _NOT_ been tested, its just an example of a way solve it.

PHP:
class MadGDCache
{
    /**
     * @var array
     */
    protected $_options = array(
        'path' => 'cache',
        'lifetime' => 600 // seconds
    );

    /**
     * @param array $options
     * @return void
     */
    public function __construct(Array $options = array())
    {
        foreach($options as $options => $value)
        {
            $this->_options[$option] = $value;
        }
    }

    public function load($name)
    {
        $path = $this->_options['path'] . DIRECTORY_SEPARATOR . $name;

        if (file_exists($path) && filemtime($path) < (time() + $this->_options['lifetime'])) {

            return file_get_contents($path);
        }

        return false;
    }

    public function save($name, MadGD $image)
    {
        $path = $this->_options['path'] . DIRECTORY_SEPARATOR . $name;

        // Not sure if the imagepng will overwrite an existing file
        if(file_exists($path)) {

            unlink($path);
        }

        imagepng($image->instance, $path, 9 );
    }
}

Example

PHP:
$cache = new MadGDCache(array(
    'path' => dirname(__FILE__) . '/cache'
));

if (! $image = $cache->load('character_id_10010')) {
    $image = new MadGD;
    $image->setBackground('mySignature.png');

    $image->addText('This is my awesome sentance!')->setPosition(10, 10);

    $cache->save('character_id_10010', $image);

    ob_start();

    imagepng($image->instance, '', 9);

    $image = ob_get_clean();
}

header('Content-Type: image/png');
echo $image;
 
How i can add php in this? np: $image->setBackground(''.$belu.'.png'); <-- on this is error...
 
Signatue please give Download Fixd?

hey, please help me, i need sgnarutes complet for download expm:
sgnatures.php fixe
arial.ttf
signatures.psd

all my and bug =(
I need your signatures for weapos
visit my website
http://kleynz.servegame.com:8090/signature.php?character=Adm+Kleyner&image=0

I need their equal items, with signatures, for signatures from my site.
or even transfer to complete me.

me help?
 
I am sorry for the inconvenience that the dead link may have caused all of you. You are more than welcome to rip the API from Modern AAC though, as it is in there by default.

You can find it in your injections folder.
 
Back
Top