• 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 Mount outfits won't show up in store.

LIINDI

New Member
Joined
Mar 14, 2018
Messages
78
Solutions
1
Reaction score
3
Hi!

Im just curious if anyone could help me to get my animated mount outfits to work on my store.
When adding a new mount to the online store this is what comes up.

GJk2EtS.png

So as you can see up top that's the exact values i used.
I tried buying it for myself but i couldn't recieve it. It only stood (Wait 30 seconds and make sure your inventory is not full etc).

This stood in my console while it was trying to add the item.

Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/shop.lua:eek:nThink
LuaScriptInterface::luaPlayerAddItemEx(). Item not found
stack traceback:
[C]: in function 'addItemEx'
data/lib/compat/compat.lua:379: in function 'doPlayerAddItemEx'
data/globalevents/scripts/shop.lua:90: in function <data/globalevents/scripts/shop.lua:7>


I think it has to do with how i have linked the mount outfits? This is what i use.

htdocs/Config.php
PHP:
    // images
    'outfit_images_url' => 'animoutfit.php', // set to animoutfit.php for animated outfit
    'item_images_url' => 'http://item-images.ots.me/1092/', // set to images/items if you host your own items in images folder

Gifts.php
PHP:
$mount_image = 'images/shop-system/mounts_category.png';
                if(isset($config['mounts']) && $config['mounts'][$mount['mount_id']]) {
                    $mount_image = $config['outfit_images_url'] . '?id=' . $config['mounts'][$mount['mount_id']] . '&addons=0&head=' . $config['shop_outfit_colors']['head'] . '&body=' . $config['shop_outfit_colors']['body'] . '&legs=' . $config['shop_outfit_colors']['legs'] . '&feet=' . $config['shop_outfit_colors']['feet'];

data/Config.lua
Lua:
coinImagesURL = "http://olympiaserver.zapto.org/store/"

When i inspect the missing png file and check the src it gives me this
Code:
http://olympiaserver.zapto.org/animoutfit.php?id=1019&addons=0&head=4&body=38&legs=87&feet=114
JzIrbbJ.png


Im using
The OTX Server Global - Version: (3.10) based on tfs 1.2
And
myaac-0.7.10 + myaac-gesior-shop-system-v2.0

Im lost...

Anyone have any clues here?

Great Regards
LINDI
 
Solution
Hmm when adding that line into gifts. :/
Parse error: syntax error, unexpected ''.png'' (T_CONSTANT_ENCAPSED_STRING) in D:\Xampp\htdocs\system\pages\gifts.php on line 554

Code:
foreach($offer_list['mount'] as $mount)
            {
                $mount_image = 'images/shop-system/mounts_category.png';
                if(isset($config['mounts']) && $config['mounts'][$mount['mount_id']]) {
                    $mount_image = BASE_URL . 'images/mounts/' . $mount['mount_id'] '.png';
                }

Ye, I forgot one dot.

Fixed version:
Code:
$mount_image = BASE_URL . 'images/mounts/' . $mount['mount_id'] . '.png';
Shop.lua
Lua:
#
-- message send to player by script "type" (types you can check in "global.lua")
SHOP_MSG_TYPE = 18
-- time (in seconds) between connections to SQL database by shop script
SQL_interval = 30
-- ### END OF CONFIG ###
function onThink(interval, lastExecution)
    local result_plr = db.storeQuery("SELECT * FROM z_ots_comunication")
    if(result_plr ~= false) then
        repeat
            local id = tonumber(result.getDataInt(result_plr, "id"))
            local action = tostring(result.getDataString(result_plr, "action"))
            local delete = tonumber(result.getDataInt(result_plr, "delete_it"))
            local cid = getPlayerByName(tostring(result.getDataString(result_plr, "name")))
            if(cid) then
                local itemtogive_id = tonumber(result.getDataInt(result_plr, "param1"))
                local itemtogive_count = tonumber(result.getDataInt(result_plr, "param2"))
                local container_id = tonumber(result.getDataInt(result_plr, "param3"))
                local container_count = tonumber(result.getDataInt(result_plr, "param4"))
                local add_item_type = tostring(result.getDataString(result_plr, "param5"))
                local add_item_name = tostring(result.getDataString(result_plr, "param6"))
                local received_item = 0
                local full_weight = 0
              
                -- Script para addons e montaria full pelo Gesior --
                if(add_item_type == 'mounts') then
                local player = Player(cid)
                if (getPlayerStorageValue(cid,itemtogive_id) == -1) then
                doPlayerAddMount(cid, itemtogive_id)
                setPlayerStorageValue(cid,itemtogive_id,1)
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
                doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received '.. add_item_name ..' from Th3 Insanity Shop.')
                db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
                db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";")
                else
                doPlayerSendTextMessage(cid,25,"You Already have this Mount.")
                end
                return TRUE
              
                end              
                -- fim do script --
                -- Script para addons e montaria full pelo Gesior --
                if(add_item_type == 'addons') then
                local player = Player(cid)
                if (getPlayerStorageValue(cid,itemtogive_id) == -1) then
                doPlayerAddOutfit(cid, itemtogive_id, 3)
                doPlayerAddOutfit(cid, container_id, 3)
                setPlayerStorageValue(cid,itemtogive_id,1)
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
                doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received '.. add_item_name ..' from Th3 Insanity Shop.')
                db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
                db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";")
                else
                doPlayerSendTextMessage(cid,25,"You Already have this Outfit.")
                end
                return TRUE
                end              
                -- fim do script --
              
              
              
                if(add_item_type == 'container') then
                    container_weight = getItemWeight(container_id, 1)
                    if(isItemRune(itemtogive_id)) then
                        items_weight = container_count * getItemWeight(itemtogive_id, 1)
                    else
                        items_weight = container_count * getItemWeight(itemtogive_id, itemtogive_count)
                    end
                    full_weight = items_weight + container_weight
                else
                    full_weight = getItemWeight(itemtogive_id, itemtogive_count)
                    if(isItemRune(itemtogive_id)) then
                        full_weight = getItemWeight(itemtogive_id, 1)
                    else
                        full_weight = getItemWeight(itemtogive_id, itemtogive_count)
                    end
                end
                local free_cap = getPlayerFreeCap(cid)
                if(full_weight <= free_cap) then
                    if(add_item_type == 'container') then
                        local new_container = doCreateItemEx(container_id, 1)
                        local iter = 0
                        while(iter ~= container_count) do
                            doAddContainerItem(new_container, itemtogive_id, itemtogive_count)
                            iter = iter + 1
                        end
                        received_item = doPlayerAddItemEx(cid, new_container)
                    else
                        local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
                        received_item = doPlayerAddItemEx(cid, new_item)
      
                    end
                    if(type(received_item) == "number" and received_item == RETURNVALUE_NOERROR) then
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received '.. add_item_name ..' from Th3 Insanity Shop.')
                        db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
                        db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";")
                    else
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, ' '.. add_item_name ..' from Th3 Insanity is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.')
                    end
                else
                    doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, ' '.. add_item_name ..' Th3 Insanity is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.')
                end
            end
        until not result.next(result_plr)
        result.free(result_plr)
    end
    return true
end

Yeah im unsure aswell. Its really confusing actually.
 
1. You are using wrong .lua script. Use the one that is provided with the plugin. Its located in your MyAAC install directory - gesior-shop-system.lua - it's a new globalevent.

2. About mount images: you wrongly configured that 'outfit_images_url' => 'animoutfit.php' in your config.php

It should be a full URL to the animoutfit.php

Like this: (if you want to use Gesior provided online site)
Code:
'outfit_images_url' => 'http://outfit-images.ots.me/animatedOutfits1090/animoutfit.php',
 
1. You are using wrong .lua script. Use the one that is provided with the plugin. Its located in your MyAAC install directory - gesior-shop-system.lua - it's a new globalevent.

2. About mount images: you wrongly configured that 'outfit_images_url' => 'animoutfit.php' in your config.php

It should be a full URL to the animoutfit.php

Like this: (if you want to use Gesior provided online site)
Code:
'outfit_images_url' => 'http://outfit-images.ots.me/animatedOutfits1090/animoutfit.php',

1: Oh so i should just paste that one into my data/globalevents/scripts and delete the shop.lua? :)

*EDIT*
Code:
[Warning - Event::checkScript] Can not load script: scripts/shop.lua
cannot open data/globalevents/scripts/shop.lua: No such file or directory
[Warning - Events::load] Unknown party method: onShareExperience

Where do i configure for it to choose gesiorshop.lua instead of shop.lua?

*EDIT 2* Sorry i missread a bit. I now realize you need to have both shop.lua & gesior-shop.lua in globalevents lol.

2: The outfits on the website works fine now but the small png/gif of the mount isn't visible after i've added it.. :/

What might that depend on? The Prismatic Unicorn which im trying to add does exist in my mounts.xml.
 
Last edited:
1: Oh so i should just paste that one into my data/globalevents/scripts and delete the shop.lua? :)

*EDIT*
Code:
[Warning - Event::checkScript] Can not load script: scripts/shop.lua
cannot open data/globalevents/scripts/shop.lua: No such file or directory
[Warning - Events::load] Unknown party method: onShareExperience

Where do i configure for it to choose gesiorshop.lua instead of shop.lua?

*EDIT 2* Sorry i missread a bit. I now realize you need to have both shop.lua & gesior-shop.lua in globalevents lol.

2: The outfits on the website works fine now but the small png/gif of the mount isn't visible after i've added it.. :/

What might that depend on? The Prismatic Unicorn which im trying to add does exist in my mounts.xml.

1. No, not really. You should be using only one globalevent for the shop. The second is redundant. Also - not needed, it just makes the things worse. So - use only this one provided with MyAAC cause it supports mounts and addons with custom addons like 1, 2, 3 - the original script supports only full addon - you can't add only one or second part of the addon.

2. What do you get instead of the mount image? Actually, mount image depends on the same outfit URL, which is already used in characters page etc.
Here's part of the code:
Code:
$mount_image = $config['outfit_images_url'] . '?id=' . $config['mounts'][$mount['mount_id']] . '&addons=0&head=' . $config['shop_outfit_colors']['head'] . '&body=' . $config['shop_outfit_colors']['body'] . '&legs=' . $config['shop_outfit_colors']['legs'] . '&feet=' . $config['shop_outfit_colors']['feet'];

That means - it uses too that config.outfit_images_url to show a mount. So it should work exactly the same like your normal outfits on the website.
 
1. So then i need to remove the Shop.Lua and instead use Gesior-shop-system.lua ? When i did that it said the above error inte my console..
  1. [Warning - Event::checkScript] Can not load script: scripts/shop.lua
  2. cannot open data/globalevents/scripts/shop.lua: No such file or directory
Where do i edit so it does not try to execute the shop.lua and instead use the gesior-shop-system.lua? Do you know?

2. This is what appears instead of mount png.
JzIrbbJ.png


I guess it's because the of the shop.lua error? Its' reading the wrong lua..?
 
1. So then i need to remove the Shop.Lua and instead use Gesior-shop-system.lua ? When i did that it said the above error inte my console..
  1. [Warning - Event::checkScript] Can not load script: scripts/shop.lua
  2. cannot open data/globalevents/scripts/shop.lua: No such file or directory
Where do i edit so it does not try to execute the shop.lua and instead use the gesior-shop-system.lua? Do you know?

2. This is what appears instead of mount png.
JzIrbbJ.png


I guess it's because the of the shop.lua error? Its' reading the wrong lua..?

1. In data/globalevents/globalevents.xml

2. Can you right click on the picture and open in new window? What's the URL (address) of the picture?
 

When you go to that link, it says "Outfit does not exist or file cache is not generated.". So most probably - this outfit doesn't exist yet on 10.99 (was added in 11.00) or its problem with Gesior script.

If you have that outfit, then you can try to put them in your images/mounts folder under the name: 115.png
Should look like this: images/mounts/115.png (same with other mounts, with mount id)

Why 115.png? Cause its the id of 1019 clientid in mounts.xml
Code:
<mount id="115" clientid="1019" name="Prismatic unicorn" speed="20" premium="yes" />

Then, change this line in your system/pages/gifts.php

Code:
$mount_image = $config['outfit_images_url'] . '?id=' . $config['mounts'][$mount['mount_id']] . '&addons=0&head=' . $config['shop_outfit_colors']['head'] . '&body=' . $config['shop_outfit_colors']['body'] . '&legs=' . $config['shop_outfit_colors']['legs'] . '&feet=' . $config['shop_outfit_colors']['feet'];
To:
Code:
$mount_image = BASE_URL . 'images/mounts/' . $mount['mount_id'] '.png';

Now, it will look for outfit image in images/mounts/ under id.png
 
When you go to that link, it says "Outfit does not exist or file cache is not generated.". So most probably - this outfit doesn't exist yet on 10.99 (was added in 11.00) or its problem with Gesior script.

If you have that outfit, then you can try to put them in your images/mounts folder under the name: 115.png
Should look like this: images/mounts/115.png (same with other mounts, with mount id)

Why 115.png? Cause its the id of 1019 clientid in mounts.xml
Code:
<mount id="115" clientid="1019" name="Prismatic unicorn" speed="20" premium="yes" />

Then, change this line in your system/pages/gifts.php

Code:
$mount_image = $config['outfit_images_url'] . '?id=' . $config['mounts'][$mount['mount_id']] . '&addons=0&head=' . $config['shop_outfit_colors']['head'] . '&body=' . $config['shop_outfit_colors']['body'] . '&legs=' . $config['shop_outfit_colors']['legs'] . '&feet=' . $config['shop_outfit_colors']['feet'];
To:
Code:
$mount_image = BASE_URL . 'images/mounts/' . $mount['mount_id'] '.png';

Now, it will look for outfit image in images/mounts/ under id.png

Hmm when adding that line into gifts. :/
Parse error: syntax error, unexpected ''.png'' (T_CONSTANT_ENCAPSED_STRING) in D:\Xampp\htdocs\system\pages\gifts.php on line 554

Code:
foreach($offer_list['mount'] as $mount)
            {
                $mount_image = 'images/shop-system/mounts_category.png';
                if(isset($config['mounts']) && $config['mounts'][$mount['mount_id']]) {
                    $mount_image = BASE_URL . 'images/mounts/' . $mount['mount_id'] '.png';
                }
 
Hmm when adding that line into gifts. :/
Parse error: syntax error, unexpected ''.png'' (T_CONSTANT_ENCAPSED_STRING) in D:\Xampp\htdocs\system\pages\gifts.php on line 554

Code:
foreach($offer_list['mount'] as $mount)
            {
                $mount_image = 'images/shop-system/mounts_category.png';
                if(isset($config['mounts']) && $config['mounts'][$mount['mount_id']]) {
                    $mount_image = BASE_URL . 'images/mounts/' . $mount['mount_id'] '.png';
                }

Ye, I forgot one dot.

Fixed version:
Code:
$mount_image = BASE_URL . 'images/mounts/' . $mount['mount_id'] . '.png';
 
Solution
Ye, I forgot one dot.

Fixed version:
Code:
$mount_image = BASE_URL . 'images/mounts/' . $mount['mount_id'] . '.png';

Thanks mate! Still not working but i guess it's because all of my mount images are in GIF format..

Do you know if there's any place to download all mounts with numbers but with .png or how to change so the site reads gifs?

Regards
LINDI
 
Last edited:
Nvm you already helped so much! Really appreciate it! Gonna look up a Gif to PNG converter and get it sorted!

But if i use PNG it won't be animated though but its fine.

Thanks alot. You're boss!
 
Thanks mate! Still not working but i guess it's because all of my mount images are in GIF format..

Do you know if there's any place to download all mounts with numbers but with .png or how to change so the site reads gifs?

Regards
LINDI

Just change this '.png' to '.gif' in this line:
Code:
$mount_image = BASE_URL . 'images/mounts/' . $mount['mount_id'] . '.png';

Then it will look for .gif instead of png. But remember it needs to have mount id from mounts.xml. Like I posted above.

I found them!!

Qwizer/gesior-accmaker

Here are all mounts already saved in .gif format with mount id as the name! But it is only till 90.gif, the rest you would need to add manually.
Hope it helps!

You can download the whole code with images here: https://github.com/Qwizer/gesior-accmaker/archive/master.zip
 
Just change this '.png' to '.gif' in this line:
Code:
$mount_image = BASE_URL . 'images/mounts/' . $mount['mount_id'] . '.png';

Then it will look for .gif instead of png. But remember it needs to have mount id from mounts.xml. Like I posted above.

I found them!!

Qwizer/gesior-accmaker

Here are all mounts already saved in .gif format with mount id as the name! But it is only till 90.gif, the rest you would need to add manually.
Hope it helps!

You can download the whole code with images here: https://github.com/Qwizer/gesior-accmaker/archive/master.zip

Dude absolutely brilliant!
Hmm seems like my addons (outfits) are wrongly configured though. Same issue there where it's not showing the animated pic and it's linking to this
Code:
http://outfit-images.ots.me/animatedOutfits1090/animoutfit.php?id=963&addons=1&head=4&body=38&legs=87&feet=114

Did they also come with your myacc so that i could just configure the path? :)[/code]
 
Dude absolutely brilliant!
Hmm seems like my addons (outfits) are wrongly configured though. Same issue there where it's not showing the animated pic and it's linking to this
Code:
http://outfit-images.ots.me/animatedOutfits1090/animoutfit.php?id=963&addons=1&head=4&body=38&legs=87&feet=114

Did they also come with your myacc so that i could just configure the path? :)[/code]

No, they're not included into myaac. You need to download them separate.

This link is correct, but that outfit with id 963 doesn't exist on 10.98 I suppose. Is your server using 11.00 client?
 
No, they're not included into myaac. You need to download them separate.

This link is correct, but that outfit with id 963 doesn't exist on 10.98 I suppose. Is your server using 11.00 client?
Alright! I'll check it out!

It's 10.98 but it contains alot of 11 featured :)
 
did the problem find a solution?
I have the myacc0.8.0 version with the gesior_shop_system 2.2 plugin and client 12
I did everything step by step as you wrote and all the time there is the same problem

the same problem is with addons :(
is there any update to this system?
 
I found a solution!

htdocs/Config.php
PHP:
'outfit_images_url' => 'animoutfit.php', // set to animoutfit.php for animated outfit

change to
PHP:
'outfit_images_url' => 'https://outfits.ferobraglobal.com/animoutfit.php', // set to animoutfit.php for animated outfit

Let me know if I helped
 
Back
Top