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

Force wrap item

Joriku

Working in the mines, need something?
Joined
Jul 16, 2016
Messages
1,087
Solutions
15
Reaction score
379
Location
Sweden
YouTube
Joriku
So, while using Znote acc. I am changing over from the In-game store (Tibia coins) onto points over at the website shop.Now the issue lays when I order an Cask, it can't deliver since it's not packaged.

Config.php90 => array(
'type' => 8, //Consumable
'itemid' => 25881, // Cask id
'count' => 1000,
'description' => "",
'points' => 1,
),

Cask used,
Items:
<item id="25881" article="a" name="great health cask">
<attribute key="description" value="This cask can be used to refill great health potions"/>
<attribute key="charges" value="1000"/>
<attribute key="wrapableto" value="23398"/>
<attribute key="weight" value="200000"/>
</item>

Inside items, this is the id the cask is wrapped to. However, using this creates an unusable package. It cannot be converted to a cask.Using Id: 23398 in-game creates an unusable package.

Buying the cask in the webshop:
18:10 There was a problem requesting your message, please contact the administrator

How could I get this to wrap an item if it can be wrapped, like a force try wrap?
Canary -> Latest

The script of Znote's talkaction:
Lua:
-- ORDER TYPE 8 (Regular item shop products)
                if q_type == 8 then
                    served = true
                    -- Get weight
                    if player:getFreeCapacity() >= ItemType(q_itemid):getWeight(q_count) then
                        db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";")
                        player:addItem(q_itemid, q_count)
                        player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received " .. q_count .. " x " .. ItemType(q_itemid):getName() .. "!")
                    else
                        player:sendTextMessage(MESSAGE_STATUS_WARNING, "Need more CAP!")
                    end
                end
 
Last edited:
I don't know why anyone would still want to use web based shop when the engine has full ingame store support... but you could just search for the ingame store code that sends the wrapped item to the player and copy it to the znote shop script
 
I don't know why anyone would still want to use web based shop when the engine has full ingame store support... but you could just search for the ingame store code that sends the wrapped item to the player and copy it to the znote shop script
Well, guess that's true.
My fear of using it is that people usually figures out a way to clone tibia coins.

Managed to get this, can't currently figure out a way to set offer amount onto the items
Lua:
-- ORDER TYPE 8 (Regular item shop products)
                if q_type == 8 then
                    served = true
                    -- Get weight
                    local decoKit = player:addItem(23398, 1)
                    if player:getFreeCapacity() >= ItemType(q_itemid):getWeight(q_count) then
                        db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") -- Delete database querry once redeemed.
                        if decoKit then
                            decoKit:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "You bought this item in the Store.\nUnwrap it in your own house to create a <" .. ItemType(q_itemid):getName() .. ">.") --Set description and get the current item inside.
                            decoKit:setCustomAttribute("unWrapId", q_itemid) -- Set current object purshased.
                            -- Set amount
                            player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received " .. q_count .. " x " .. ItemType(q_itemid):getName() .. "!")
                            else
                            player:sendTextMessage(MESSAGE_STATUS_WARNING, "Need more CAP!")
                        end
                    end
                end
 
Back
Top