• 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 Znote outfit issues (shop)

thomson9292

New Member
Joined
Feb 28, 2017
Messages
97
Solutions
1
Reaction score
2
Three questions.

1. Is it possible to put in shop outfits from real tibia shop? I didn't see id's for those outfits in znote files.
2. Can players change sex via znote shop and "transfer/save" their outfits during this process?
3. Is it possible to make condition that will prevent to apply female outfit to male player?
At the beginning I was thinking about universal outfits in shop for males ale females. I mean if you buy eg. citizen outfit you can apply this for male or female character and there is no reason to make double outfit versions in shop but I think it could be more complicated.
 
Solution
You could host the images yourself (not sure where you can get them), I have never seen the real tibia shop. You most likely need to do some modifications to the code to support them.

After buying character sex change, they can change it in character list under myaccount.

The Lua code for adding outfits (and addons) to players: (TFS 1.0+)
ZnoteAAC/znoteshop.lua at 695cb58b04618d275982d502ca25cc879df3fead · Znote/ZnoteAAC · GitHub
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)...
You could host the images yourself (not sure where you can get them), I have never seen the real tibia shop. You most likely need to do some modifications to the code to support them.

After buying character sex change, they can change it in character list under myaccount.

The Lua code for adding outfits (and addons) to players: (TFS 1.0+)
ZnoteAAC/znoteshop.lua at 695cb58b04618d275982d502ca25cc879df3fead · Znote/ZnoteAAC · GitHub
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
The variable q_itemid is used as outfit id, and the variable q_count is used as the addon type in this scenario. (if q_type is 5).
It can probably be improved by verifying that the player can learn the outfit/is the correct gender for the outfit.
 
Solution
Back
Top