Feature Unpack items/outfits from any client to PNG with OTClient!

Gesior.pl

Mega Noob&LOL 2012
Joined
Sep 18, 2007
Messages
1,988
Reaction score
899
Location
PLand
This is little C++ code for OTClient to unpack items/outfits. This is code/tutorial for advanced OTS users!
With this code/tutorial you can unpack items/outfits images from your tibia version/your custom client .spr/.otb!


First you need to compile OTClient (https://github.com/edubart/otclient) and this is not part of this tutorial.
I compiled it on linux and windows without any problems with this tutorial:
https://github.com/edubart/otclient/wiki/Compiling-on-Windows


1. In src/client/thingtype.cpp find:
Code:
void ThingType::exportImage(std::string fileName)
{
   (here content of function)
}
and replace with:
Code:
void ThingType::exportImage(std::string fileName, int type)
{
    /* types:
    0 - normal export
    1 - outfit export, all animation frames
    2 - outfit export, only first animation frame
    3 - items export, first frame of animation
    */
    if(m_null)
        stdext::throw_exception("cannot export null thingtype");

    if(m_spritesIndex.size() == 0)
        stdext::throw_exception("cannot export thingtype without sprites");
    if(type == 0)
    {
        /* ORGINAL CODE */
        ImagePtr image(new Image(Size(32 * m_size.width() * m_layers * m_numPatternX, 32 * m_size.height() * m_animationPhases * m_numPatternY * m_numPatternZ)));
        for(int z = 0; z < m_numPatternZ; ++z) {
            for(int y = 0; y < m_numPatternY; ++y) {
                for(int x = 0; x < m_numPatternX; ++x) {
                    for(int l = 0; l < m_layers; ++l) {
                        for(int a = 0; a < m_animationPhases; ++a) {
                            for(int w = 0; w < m_size.width(); ++w) {
                                for(int h = 0; h < m_size.height(); ++h) {
                                    image->blit(Point(32 * (m_size.width() - w - 1 + m_size.width() * x + m_size.width() * m_numPatternX * l),
                                                      32 * (m_size.height() - h - 1 + m_size.height() * y + m_size.height() * m_numPatternY * a + m_size.height() * m_numPatternY * m_animationPhases * z)),
                                                g_sprites.getSpriteImage(m_spritesIndex[getSpriteIndex(w, h, l, x, y, z, a)]));
                                }
                            }
                        }
                    }
                }
            }
        }

        image->savePNG(fileName);
    }
    else if(type == 1)
    {
        /* OUTFITS ANIM */
        /*
        patternX = direction
        patternY = 0/1/2 = addon none/first/second
        patternZ = 0/1 = is sitting on mount no/yes
        layer = 0/1 = biala postac / co jak wypelniac
        */
        g_resources.makeDir("outfits_anim");
        g_resources.makeDir(stdext::format("outfits_anim/%d",getId()));
        for(int z = 0; z < m_numPatternZ; ++z) {
            for(int y = 0; y < m_numPatternY; ++y) {
                for(int x = 0; x < m_numPatternX; ++x) {
                    for(int l = 0; l < m_layers; ++l) {
                        for(int a = 0; a < m_animationPhases; ++a) {
                            ImagePtr image(new Image(Size(32 * m_size.width(), 32 * m_size.height())));
                            for(int w = 0; w < m_size.width(); ++w) {
                                for(int h = 0; h < m_size.height(); ++h) {
                                    image->blit(Point(32 * (m_size.width() - w - 1), 32 * (m_size.height() - h - 1)), g_sprites.getSpriteImage(m_spritesIndex[getSpriteIndex(w, h, l, x, y, z, a)]));
                                }
                            }
                            if(l == 1)
                                image->savePNG(stdext::format("outfits_anim/%d/%d_%d_%d_%d_template.png",getId(),a+1,z+1,y+1,x+1));
                            else
                                image->savePNG(stdext::format("outfits_anim/%d/%d_%d_%d_%d.png",getId(),a+1,z+1,y+1,x+1));
                        }
                    }
                }
            }
        }
    }
    else if(type == 2)
    {
        /* OUTFITS NO ANIM */
        /*
        patternX = direction
        patternY = 0/1/2 = addon none/first/second
        patternZ = 0/1 = is sitting on mount no/yes
        layer = 0/1 = biala postac / co jak wypelniac
        */
        g_resources.makeDir("outfits_no_anim");
        g_resources.makeDir(stdext::format("outfits_no_anim/%d",getId()));
        for(int z = 0; z < m_numPatternZ; ++z) {
            for(int y = 0; y < m_numPatternY; ++y) {
                for(int x = 0; x < m_numPatternX; ++x) {
                    for(int l = 0; l < m_layers; ++l) {
                        ImagePtr image(new Image(Size(32 * m_size.width(), 32 * m_size.height())));
                        for(int w = 0; w < m_size.width(); ++w) {
                            for(int h = 0; h < m_size.height(); ++h) {
                                image->blit(Point(32 * (m_size.width() - w - 1), 32 * (m_size.height() - h - 1)), g_sprites.getSpriteImage(m_spritesIndex[getSpriteIndex(w, h, l, x, y, z, 0)]));
                            }
                        }
                        if(l == 1)
                            image->savePNG(stdext::format("outfits_no_anim/%d/%d_%d_%d_%d_template.png",getId(),1,z+1,y+1,x+1));
                        else
                            image->savePNG(stdext::format("outfits_no_anim/%d/%d_%d_%d_%d.png",getId(),1,z+1,y+1,x+1));
                    }
                }
            }
        }
    }
    else if(type == 3)
    {
        /* ITEMS */
        g_resources.makeDir("items");

        ImagePtr image(new Image(Size(32 * m_size.width(), 32 * m_size.height())));
        for(int l = 0; l < m_layers; ++l) {
            for(int w = 0; w < m_size.width(); ++w) {
                for(int h = 0; h < m_size.height(); ++h) {
                image->blit(Point(32 * (m_size.width() - w - 1), 32 * (m_size.height() - h - 1)),
                    g_sprites.getSpriteImage(m_spritesIndex[getSpriteIndex(w, h, l, 0, 0, 0, 0)]));
                }
            }
        }
        image->savePNG(stdext::format("items/%s.png", fileName));
    }
}
1.1 At begining of file add:
Code:
#include <framework/core/resourcemanager.h>
2. In src/client/thingtype.h find:
Code:
void exportImage(std::string fileName);
and replace with:
Code:
void exportImage(std::string fileName, int type = 0);
3. Rebuild project.

C++ PART IS DONE!

Now LUA/client part.

EXAMPLE FOR TIBIA 10.76

1. Copy Tibia [tibia.com] client Tibia.dat and Tibia.spr to data/things/1076/Tibia.dat and data/things/1076/Tibia.spr
2. Copy OTS (make sure it's 10.76 OTS!) data/items/items.otb to OTClient data/things/1076/items.otb

-------------------------
3. Run OTClient.exe
4. At top of client window is small black icon that opens 'console'. Click it! :)
5. Tell (paste in console and press ENTER) OTClient where are files and what tibia version it is:
Code:
g_game.setClientVersion(1076) g_things.loadDat('things/1076/Tibia.dat') g_things.loadOtb('things/1076/items.otb') g_sprites.loadSpr('things/1076/Tibia.spr')
6. Choose what you want to unpack and paste code (when you paste it in console, it will be all in 1 line, just press ENTER, it will work!):
6.1. OUTFITS, with all animation frames
Code:
for i,v in pairs(g_things.getThingTypes(1)) do
    if(v and v:getId() > 0) then
        outfit = g_things.getThingType(v:getId(),1)
        outfit:exportImage(v:getId(), 1)
    end
end
6.2 OUTFITS, just first frame of animation
Code:
for i,v in pairs(g_things.getThingTypes(1)) do
    if(v and v:getId() > 0) then
        outfit = g_things.getThingType(v:getId(),1)
        outfit:exportImage(v:getId(), 2)
    end
end
6.3 ITEMS, first frame of animation, count = 1
Code:
for i,v in pairs(g_things.getThingTypes(0)) do
    if(v and v:getId() > 0) then
        itemOtb = g_things.findItemTypeByClientId(v:getId())
        if(itemOtb and itemOtb:getClientId() > 0) then
            item = g_things.getThingType(itemOtb:getClientId(),0)
            if(item and item:getId() > 0) then
                item:exportImage(itemOtb:getServerId(), 3)
            end
        end
    end
end
--------------------------------------
Now client will freez for few seconds/minutes.. client unfreez, but where are my images?

Windows: C:\Users\yourWindowsUserName\otclient\
[THERE WILL BE YOUR WINDOWS 'language' NAME FOR 'USERS' folder]
Linux: /home/yourUserName/.otclient/

Script will create folders:
items, outfits_no_anim, outfits_anim

Files in these folders are in format compatible with outfit generator/Gesior acc. maker images folder.
 
Last edited:
OP
Gesior.pl

Gesior.pl

Mega Noob&LOL 2012
Joined
Sep 18, 2007
Messages
1,988
Reaction score
899
Location
PLand
-- FIRST POST WAS TOO LONG --
----------------------------------------------
--------------------------------------
Format:
Items folder is full of XXXX.png files, XXXX - OTS item ID

Outfit folder name = outfit ID.
Outfit file names are like:
X_Y_Z_O.png
X - frame ID (from 1 up to 8 [not all creatures have 8 frames of animation])
Y - mount: 1 - not on mount, 2 - on mount
Z - addon: 1 - none, 2 - first, 3 - second [there is a special method how to compose these 3 images [none + first + second] into one .png, PHP code is in my forum outfit thread, in .zip]
O - direction (1 - 4)
--------------------------------------
If you want to convert all item PNG images into GIF images it's simpliest possible PHP code to do it. You just need webserver and 2 folders:
Code:
<?php
$from = 'items'; // images PNG folder
$to = 'gif'; // empty folder
function png2gif($pngs, $background = array(255, 255, 255), $dest = 'gif')
{
    // by WebReflection
    foreach($pngs as $png){
        $size = getimagesize($png);
        $img = imagecreatefrompng($png);
        $image = imagecreatetruecolor($width = $size[0], $height = $size[1]);
        imagefill($image, 0, 0, $bgcolor = imagecolorallocate($image, $background[0], $background[1], $background[2]));
        imagecopyresampled($image, $img, 0, 0, 0, 0, $width, $height, $width, $height);
        imagecolortransparent($image, $bgcolor);
        imagegif($image, str_ireplace('.png', '.gif', $dest.DIRECTORY_SEPARATOR.basename($png)), 100);
        imagedestroy($image);
    }
}
png2gif(glob($from . "/*.png"), $background = array(255, 255, 255), $to);
EDIT:
updated PHP code, now change PNG to GIF with transparent backgrounds!
 
Last edited:
OP
Gesior.pl

Gesior.pl

Mega Noob&LOL 2012
Joined
Sep 18, 2007
Messages
1,988
Reaction score
899
Location
PLand
You can also replace:
outfit:exportImage(v:getId(), 2)
or:
item:exportImage(itemOtb:getServerId(), 3)

with:
outfit:exportImage(v:getId(), 0)
or:
item:exportImage(itemOtb:getServerId(), 0)

To unpack all item/outfit images, frames, layers, stacks etc. to 1 big PNG image.

EXAMPLE (2148 - gold coin, all images in one):
 
OP
Gesior.pl

Gesior.pl

Mega Noob&LOL 2012
Joined
Sep 18, 2007
Messages
1,988
Reaction score
899
Location
PLand
My next script:
unpack map image with OTClient (I will release or sell soon)

These are two 8x8 tiles images composed into one image (grass in house is same as in RME):



example LUA command:
g_game.setClientVersion(860)
g_things.loadDat('things/860/Tibia.dat')
g_things.loadOtb('things/860/items.otb')
g_sprites.loadSpr('things/860/Tibia.spr')
g_map.loadOtbm('map.otbm')

g_map.drawMap('a.png', 67, 113, 7, 8) - position x: 67, y: 113, z: 7, size (width/height): 8 tiles
g_map.drawMap('b.png', 75, 113, 7, 8) - position x: 75, y: 113, z: 7, size (width/height): 8 tiles


Script generates 10x10 tiles images, because some items may use more then 32x32 pixels or may be moved 'up' (like depot box on table; 'up' in tibia means X pixels left and X pixels top), so it has to be cropped by some PHP script later (32 pixels from each side of image).
Then some script must compose all floor images (because when you are on first floor you can see ground level [and other lower floors]).


--------------------------------------------------
100 x 8x8 tiles images generate 7-8 seconds on my Intel i7 4.4GHz, so RL map 32000 x 32000 x 15 would generate 141 days using 4 cores, but I already got script to detect empty areas (for RL map minimap generator, it detects not empty areas in 5 minutes), so it should generate in few hours.

EDIT:
1000 x 1000 x 16 floors TFS 1.1 3.6MB map rendered in 8 minutes on one core.

EDIT2:
ORTS
map generation started. We will see, if works or not in few hours.
 
Last edited:
OP
Gesior.pl

Gesior.pl

Mega Noob&LOL 2012
Joined
Sep 18, 2007
Messages
1,988
Reaction score
899
Location
PLand

I'm planning to release code to generate images like that.. of whole map [8x8 tiles images].. by 2 simple LUA commands.. TOMMOROW (today?)!

LUA code to generate whole map:
PHP:
prepareClient(1076, '/things/1076/items.otb', '/map.otbm')
// it prints message like:
/*
Tile positions: Min 25, 45, 0 max 555, 699, 15
These positions are just suggestion. If you know better where is first/last tile then you can use other values.
*/
generateMap(25, 45, 0, 555, 699, 15, 16)
Last number (16) is number of threads to use to generate map (YES! MULTICORE OTCLIENT! :) ). In my tests (on my 4 x 4.0, 8 threads CPU, SSD Samsung Evo 500GB) I get :
1 thread - 50 seconds - 10% CPU
4 threads - 25 seconds - 38% CPU
8 threads - 17 seconds - 55% CPU
16 threads - 17 seconds - 60% CPU
It's not scaling very well, because of synchronization at one function (get item image), but I think it's good enough.

[time in stats is for TFS 1.0 'ground floor' generation, 2240 images, 256x256 pixels, 90MB together]

-------------
Project will be fork of OTClient (around 20 changes in sources + 2 in LUA).
 

Mokerhamer

Retired Global Mod
Joined
Aug 6, 2007
Messages
1,766
Reaction score
35
Gesior Mind unpacking 10.80? It contains 3 new mounts. Animation possible? (Walking characters instead of standing still)

I have a lot of issues compiling OT client on windows (Code blocks and visual basic)
 
OP
Gesior.pl

Gesior.pl

Mega Noob&LOL 2012
Joined
Sep 18, 2007
Messages
1,988
Reaction score
899
Location
PLand
Gesior Mind unpacking 10.80? It contains 3 new mounts. Animation possible? (Walking characters instead of standing still)

I have a lot of issues compiling OT client on windows (Code blocks and visual basic)
Outfits 10.80 unpacked with all animation frames:
https://mega.co.nz/#!ZgphiYgD!_vD0JpyQne--RvW7SgbXB6aq4L5Sck5jgPAP2wPYhKs

Now you just need to generate .gifs with animations :)

EDIT:
Maybe I will have some time tommorow and I will write outfit generator that generates .gif images with all animation frames.
 

Mokerhamer

Retired Global Mod
Joined
Aug 6, 2007
Messages
1,766
Reaction score
35

LaloHao

Member
Joined
Sep 14, 2008
Messages
73
Reaction score
14
Location
Mexico
Is there any way to pack them back? I'm looking for a quick method of creating dat/spr for custom items, unfortunately all tools i've seen are windows only
 

narko

vertrauenswürdig ~
Joined
Oct 19, 2008
Messages
1,317
Reaction score
114
Location
Unknown
I succesfully exported outfits and items using this tutorial. Is there any way to export mount images? I would like to use it with outfits.php from gesior aac.
-- FIRST POST WAS TOO LONG --
----------------------------------------------
--------------------------------------
Format:
Items folder is full of XXXX.png files, XXXX - OTS item ID

Outfit folder name = outfit ID.
Outfit file names are like:
X_Y_Z_O.png
X - frame ID (from 1 up to 8 [not all creatures have 8 frames of animation])
Y - mount: 1 - not on mount, 2 - on mount
Z - addon: 1 - none, 2 - first, 3 - second [there is a special method how to compose these 3 images [none + first + second] into one .png, PHP code is in my forum outfit thread, in .zip]
O - direction (1 - 4)
--------------------------------------
If you want to convert all item PNG images into GIF images it's simpliest possible PHP code to do it. You just need webserver and 2 folders:
Code:
<?php
$from = 'items'; // images PNG folder
$to = 'gif'; // empty folder
function png2gif($pngs, $background = array(255, 255, 255), $dest = 'gif')
{
    // by WebReflection
    foreach($pngs as $png){
        $size = getimagesize($png);
        $img = imagecreatefrompng($png);
        $image = imagecreatetruecolor($width = $size[0], $height = $size[1]);
        imagefill($image, 0, 0, $bgcolor = imagecolorallocate($image, $background[0], $background[1], $background[2]));
        imagecopyresampled($image, $img, 0, 0, 0, 0, $width, $height, $width, $height);
        imagecolortransparent($image, $bgcolor);
        imagegif($image, str_ireplace('.png', '.gif', $dest.DIRECTORY_SEPARATOR.basename($png)), 100);
        imagedestroy($image);
    }
}
png2gif(glob($from . "/*.png"), $background = array(255, 255, 255), $to);
EDIT:
updated PHP code, now change PNG to GIF with transparent backgrounds!
 
OP
Gesior.pl

Gesior.pl

Mega Noob&LOL 2012
Joined
Sep 18, 2007
Messages
1,988
Reaction score
899
Location
PLand
I succesfully exported outfits and items using this tutorial. Is there any way to export mount images? I would like to use it with outfits.php from gesior aac.
Mounts are normal outfits. They should be exported too.
Array of TFS mount IDs and their 'outfit ids':
PHP:
$mountsTFS = [1 => 368, 2 => 369, 3 => 370, 4 => 371, 5 => 372, 6 => 373, 7 => 374, 8 => 375, 9 => 376, 10 => 377, 11 => 378, 12 => 379, 13 => 387, 14 => 388, 15 => 389, 16 => 390, 17 => 392, 18 => 401, 19 => 402, 20 => 405, 21 => 406, 22 => 421, 23 => 426, 24 => 427, 25 => 437, 26 => 438, 27 => 447, 28 => 450, 29 => 502, 30 => 503, 31 => 506, 32 => 515, 33 => 521, 34 => 522, 35 => 526, 36 => 546, 37 => 547, 38 => 548, 39 => 559, 40 => 571, 41 => 572, 42 => 580, 43 => 606, 44 => 621, 45 => 622, 46 => 624, 47 => 626, 48 => 627, 49 => 628, 50 => 629, 51 => 630, 52 => 631, 53 => 644, 54 => 647, 55 => 648, 56 => 649, 57 => 650, 58 => 651, 59 => 669, 60 => 670, 61 => 671, 62 => 672, 63 => 673, 64 => 674, 65 => 682, 66 => 685, 67 => 686, 68 => 687, 69 => 688, 70 => 689, 71 => 690, 72 => 691, 73 => 692, 74 => 693, 75 => 726, 76 => 727, 77 => 728, 78 => 734, 79 => 735, 80 => 736, 81 => 738, 82 => 739, 83 => 740, 84 => 761, 85 => 762, 86 => 763, 87 => 848, 88 => 849, 89 => 850, 90 => 851];
Different OTSes use different mount IDs in database. I made in my outfits.php code that works with any format:
PHP:
    protected function outfit($outfit, $addons, $head, $body, $legs, $feet, $mount, $direction = 3, $animation = 1) {
        $outfitPath = "outfitsIdle1092/";

        $mountsTFS = [1 => 368, 2 => 369, 3 => 370, 4 => 371, 5 => 372, 6 => 373, 7 => 374, 8 => 375, 9 => 376, 10 => 377, 11 => 378, 12 => 379, 13 => 387, 14 => 388, 15 => 389, 16 => 390, 17 => 392, 18 => 401, 19 => 402, 20 => 405, 21 => 406, 22 => 421, 23 => 426, 24 => 427, 25 => 437, 26 => 438, 27 => 447, 28 => 450, 29 => 502, 30 => 503, 31 => 506, 32 => 515, 33 => 521, 34 => 522, 35 => 526, 36 => 546, 37 => 547, 38 => 548, 39 => 559, 40 => 571, 41 => 572, 42 => 580, 43 => 606, 44 => 621, 45 => 622, 46 => 624, 47 => 626, 48 => 627, 49 => 628, 50 => 629, 51 => 630, 52 => 631, 53 => 644, 54 => 647, 55 => 648, 56 => 649, 57 => 650, 58 => 651, 59 => 669, 60 => 670, 61 => 671, 62 => 672, 63 => 673, 64 => 674, 65 => 682, 66 => 685, 67 => 686, 68 => 687, 69 => 688, 70 => 689, 71 => 690, 72 => 691, 73 => 692, 74 => 693, 75 => 726, 76 => 727, 77 => 728, 78 => 734, 79 => 735, 80 => 736, 81 => 738, 82 => 739, 83 => 740, 84 => 761, 85 => 762, 86 => 763, 87 => 848, 88 => 849, 89 => 850, 90 => 851];
        if($mount == 0 || $mount >= 65535)
        {
            // old mount system
            $mount_id = ($mount & 0xFFFF);
            $mountState = (($mount & 0xFFFF0000) != 0) ? 2 : 1;
        }
        elseif($mount < 300)
        {
            // tfs 1.x mount system
            $mount_id = $mountsTFS[$mount];
            $mountState = 2;
        }
        else
        {
            $mount_id = $mount;
            $mountState = 2;
        }
...
 

narko

vertrauenswürdig ~
Joined
Oct 19, 2008
Messages
1,317
Reaction score
114
Location
Unknown
Thanks for the explanation, it worked perfectly!
Mounts are normal outfits. They should be exported too.
Array of TFS mount IDs and their 'outfit ids':
PHP:
$mountsTFS = [1 => 368, 2 => 369, 3 => 370, 4 => 371, 5 => 372, 6 => 373, 7 => 374, 8 => 375, 9 => 376, 10 => 377, 11 => 378, 12 => 379, 13 => 387, 14 => 388, 15 => 389, 16 => 390, 17 => 392, 18 => 401, 19 => 402, 20 => 405, 21 => 406, 22 => 421, 23 => 426, 24 => 427, 25 => 437, 26 => 438, 27 => 447, 28 => 450, 29 => 502, 30 => 503, 31 => 506, 32 => 515, 33 => 521, 34 => 522, 35 => 526, 36 => 546, 37 => 547, 38 => 548, 39 => 559, 40 => 571, 41 => 572, 42 => 580, 43 => 606, 44 => 621, 45 => 622, 46 => 624, 47 => 626, 48 => 627, 49 => 628, 50 => 629, 51 => 630, 52 => 631, 53 => 644, 54 => 647, 55 => 648, 56 => 649, 57 => 650, 58 => 651, 59 => 669, 60 => 670, 61 => 671, 62 => 672, 63 => 673, 64 => 674, 65 => 682, 66 => 685, 67 => 686, 68 => 687, 69 => 688, 70 => 689, 71 => 690, 72 => 691, 73 => 692, 74 => 693, 75 => 726, 76 => 727, 77 => 728, 78 => 734, 79 => 735, 80 => 736, 81 => 738, 82 => 739, 83 => 740, 84 => 761, 85 => 762, 86 => 763, 87 => 848, 88 => 849, 89 => 850, 90 => 851];
Different OTSes use different mount IDs in database. I made in my outfits.php code that works with any format:
PHP:
    protected function outfit($outfit, $addons, $head, $body, $legs, $feet, $mount, $direction = 3, $animation = 1) {
        $outfitPath = "outfitsIdle1092/";

        $mountsTFS = [1 => 368, 2 => 369, 3 => 370, 4 => 371, 5 => 372, 6 => 373, 7 => 374, 8 => 375, 9 => 376, 10 => 377, 11 => 378, 12 => 379, 13 => 387, 14 => 388, 15 => 389, 16 => 390, 17 => 392, 18 => 401, 19 => 402, 20 => 405, 21 => 406, 22 => 421, 23 => 426, 24 => 427, 25 => 437, 26 => 438, 27 => 447, 28 => 450, 29 => 502, 30 => 503, 31 => 506, 32 => 515, 33 => 521, 34 => 522, 35 => 526, 36 => 546, 37 => 547, 38 => 548, 39 => 559, 40 => 571, 41 => 572, 42 => 580, 43 => 606, 44 => 621, 45 => 622, 46 => 624, 47 => 626, 48 => 627, 49 => 628, 50 => 629, 51 => 630, 52 => 631, 53 => 644, 54 => 647, 55 => 648, 56 => 649, 57 => 650, 58 => 651, 59 => 669, 60 => 670, 61 => 671, 62 => 672, 63 => 673, 64 => 674, 65 => 682, 66 => 685, 67 => 686, 68 => 687, 69 => 688, 70 => 689, 71 => 690, 72 => 691, 73 => 692, 74 => 693, 75 => 726, 76 => 727, 77 => 728, 78 => 734, 79 => 735, 80 => 736, 81 => 738, 82 => 739, 83 => 740, 84 => 761, 85 => 762, 86 => 763, 87 => 848, 88 => 849, 89 => 850, 90 => 851];
        if($mount == 0 || $mount >= 65535)
        {
            // old mount system
            $mount_id = ($mount & 0xFFFF);
            $mountState = (($mount & 0xFFFF0000) != 0) ? 2 : 1;
        }
        elseif($mount < 300)
        {
            // tfs 1.x mount system
            $mount_id = $mountsTFS[$mount];
            $mountState = 2;
        }
        else
        {
            $mount_id = $mount;
            $mountState = 2;
        }
...
 

strutZ

Australian OT Member {AKA Beastn}
Joined
Nov 16, 2014
Messages
1,338
Reaction score
469
Any chance of getting this compiled? ;)
 

samco

4x4 Developer.
Joined
Jul 3, 2007
Messages
908
Reaction score
184
Location
Spain
Hello, is there any chance to get released compiled OTC with those changes made? (To be honest, just lazy AF) xd

Ok Ok, i did it myself, lazyness is not worth.

Having a problem when executing the code for aimated outfits:

Code:
Assertion failed: (index < m_spritesIndex.size()), function getSpriteIndex, file /Users/samuelcorzo/Personal/otclient/src/client/thingtype.cpp, line 635.
Abort trap: 6
Bump for @up issue?
 
Last edited by a moderator:
Top