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

Solved Znote Add mounts and outfits to shop

monkeyy

Member
Joined
Aug 20, 2011
Messages
153
Reaction score
9
Hello folks!

Im using this great AAC which is very newb friendly, however I dont know how to add mounts and addons to the shop.
By default it looks like this:
Snaggy - easy screenshots

So as you can see players can buy mount items and addon items in the shop, but my question is;
How can I make it so people can purchase mounts and outfits?

Hope someone can help me out :)
 
ZnoteAAC/config.php at master · Znote/ZnoteAAC · GitHub
kVYYqjL.png
 
That looks really nice!
So I have two folders, I see that you put your shop offers in config.php as well.
So im a little bit confused if I have to change something in config.php

If I do this in shopitems.php:
Lua:
21 => array(
            'type' => 1,
            'itemid' => 18511,
            'count' => 1,
            'description' => "Music Box.",
            'points' => 35,
        ),   
        22 => array(
            'type' => 6,
            'itemid' => 32, // Mount ID
            'count' => 1,
            'description' => "Gnarlhound mount",
            'points' => 20,
        ),
       
    );

I get this as a result:
Snaggy - easy screenshots
As you can see it doesnt show the mount image like on your site(probably dont have the gnarlhound gif) And when I login and use !shop command, I dont get a mount :(
 
1))Log in and as God check on middle id of mount,

2))too old Znote Acc

3)) Try return to basic layout -- 'tibiacom' -->>
look result?
 
Nvm! For future newbs like me this is what you should add in your znoteshop.lua if you want to add mounts and outfits to the shop:


Lua:
-- ORDER TYPE 5 (Outfit and addon)
            if q_type == 5 then
                -- Make sure player don't already have this outfit and addon
                if not player:hasOutfit(q_itemid, q_count) then
                    db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";")
                    player:addOutfit(q_itemid)
                    player:addOutfitAddon(q_itemid, q_count)
                    player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received a new outfit!")
                else
                    player:sendTextMessage(MESSAGE_STATUS_WARNING, "You already have this outfit and addon!")
                end
            end
            -- ORDER TYPE 6 (Mounts)
            if q_type == 6 then
                -- Make sure player don't already have this outfit and addon
                if not player:hasMount(q_itemid) then
                    db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";")
                    player:addMount(q_itemid)
                    player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received a new mount!")
                else
                    player:sendTextMessage(MESSAGE_STATUS_WARNING, "You already have this mount!")
                end
            end
 
Back
Top