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

store custom tfs 1.5

Mateus Robeerto

Excellent OT User
Joined
Jun 5, 2016
Messages
1,373
Solutions
73
Reaction score
744
Location
ლ(ಠ益ಠლ)
Can anyone tell me if there is a way to change 'coins' to 'points' like in the OTClient store? The OTClient store has limits and it is not possible to add more offers. I got a custom store and would like to know if it is possible to use only 'points' instead of 'coins'. Is it possible to exchange 'coins' for 'points'? Can you help me? I need to finish urgently to launch my server online

I am using the store module here.

store2.png
 
Last edited:
first we need to know what points system you are using, but it's very easy change as @margoh 's system is using storage for coins so all you need to do is replace all getPlayerStorageValue(player, 999999999) with the function from your ot that returns the amount of points you have

Lua:
function onExtendedOpcode(player, opcode, buffer)
    local tibiaCoins = getPlayerStorageValue(player, 999999999)
    player:sendExtendedOpcode(52, tibiaCoins)
    return true
end
 
I want it to be the same as the OTClient store, which uses 'points'. Another custom store must also recognize the 'points', understand
first we need to know what points system you are using, but it's very easy change as @margoh 's system is using storage for coins so all you need to do is replace all getPlayerStorageValue(player, 999999999) with the function from your ot that returns the amount of points you have

Lua:
function onExtendedOpcode(player, opcode, buffer)
    local tibiaCoins = getPlayerStorageValue(player, 999999999)
    player:sendExtendedOpcode(52, tibiaCoins)
    return true
end
I already made changes and it didn't help. I put the 'ocpode 201' the same way, and still, it didn't work. Should I separate 'ocpode'?store1.png
 
TibiaCoins are equal to points, right? The original opcode for it is 52, while in my store it is 201
Lua:
=
function onExtendedOpcode(player, opcode, buffer)
    local customCurrency = getPlayerStorageValue(player, 24774)
    player:sendExtendedOpcode(201, customCurrency)
    return true
end

This ID 24774 is for TibiaCoins. I believe we should use this ID to be recognized as 'points'. The codes are already available, but changing from 52 to 201 didn't work, and even going back to 52 still doesn't work as it should. I would like it to be recognized as 'points'[/CODE]


Lua:
COMMAND_BUYITEM = '!storebuy'
COMMAND_TRANSFER = '!transferpoints'
WEBSITE_GETCOINS = 'http://google.com'
COINS_OPCODE = 201

storeIndex = {
    [1] = {
        id = '1',
        name = 'Premium Time',
        description = 'Buy low-priced Premium Time to add it to your own account.',
        image = "/images/shop/premium_time",
        imageList = '/images/shop/premium_time_small'
    },
    [2] = {
        id = '2',
        name = 'Extra Services',
        description = 'Buy an Extra Service to change your character\'s name or sex.',
        image = "/images/shop/extra_services",
        imageList = '/images/shop/extra_services_small'
    },
    [3] = {
        id = '3',
        name = 'Mounts',
        description = 'Buy your character one or more of the fabulous Mounts offered here.',
        image = '/images/shop/mounts',
        imageList = '/images/shop/mounts_small'
    },
    [4] = {
        id = '4',
        name = 'Outfits',
        description = 'Buy your character one or more of the classy Outfits offered here.',
        image = '/images/shop/outfits',
        imageList = '/images/shop/outfits_small'
    },
    [5] = {
        id = '5',
        name = 'Transportation',
        description = 'Use a transportation service to save time.',
        image = '/images/shop/transportation',
        imageList = '/images/shop/transportation_small'
    },
}

storeProducts = {
    {
        name = "30 days",
        id = '1',
        category_id = "1",
        description = 'Do you really want to buy "30 days" of premium time?\n\nNote: Once you have purchased Premium Time, your account\ninstantly receives premium status - no relog necessary!',
        tooltip = "",
        price = 250,
        image = "/images/shop/offer/30days"
    },
    {
        name = "90 days",
        id = '2',
        category_id = "1",
        description = 'Do you really want to buy "90 days" of premium time?\n\nNote: Once you have purchased Premium Time, your account\ninstantly receives premium status - no relog necessary!',
        tooltip = "",
        price = 700,
        image = "/images/shop/offer/90days"
    },
    {
        name = "Sex Change",
        id = '3',
        category_id = "2",
        description = 'Do you really want to buy "Sex Change"?',
        tooltip = "",
        price = 120,
        image = "/images/shop/offer/sexChange"
    },
    {
        name = "Floating Kashmir",
        id = '4',
        category_id = "3",
        description = 'Do you really want to buy "Floating Kashmir"?\n\nNote: The Mount will only be received by the character\nwho purchased it in the Store.',
        tooltip = "Floating Kashmir",
        price = 900,
        image = "/images/shop/offer/floatingKashmir"
    },
    {
        name = "Full Seaweaver Outfit",
        id = '5',
        category_id = "4",
        description = 'Do you really want to buy "Full Seaweaver Outfit"?\n\nNote: The Outfit will only be received by the character\nwho purchased it in the Store.',
        tooltip = "Full Seaweaver Outfit",
        price = 570,
        image = "/images/shop/offer/seaweaverOutfit"
    },
    {
        name = "Teleport to temple",
        id = '6',
        category_id = "5",
        description = 'Do you really want to "Teleport to temple"?',
        tooltip = "Teleport to temple",
        price = 55,
        image = "/images/shop/offer/templeTP"
    },
    {
        name = "Name change",
        id = '7',
        category_id = "2",
        description = 'Do you really want to buy "Name change"?',
        tooltip = "",
        price = 250,
        image = "/images/shop/offer/nameChange"
    },
    {
        name = "180 days",
        id = '8',
        category_id = "1",
        description = 'Do you really want to buy "180 days" of premium time?\n\nNote: Once you have purchased Premium Time, your account\ninstantly receives premium status - no relog necessary!',
        tooltip = "",
        price = 1500,
        image = "/images/shop/offer/180days"
    },
    {
        name = "360 days",
        id = '9',
        category_id = "1",
        description = 'Do you really want to buy "360 days" of premium time?\n\nNote: Once you have purchased Premium Time, your account\ninstantly receives premium status - no relog necessary!',
        tooltip = "",
        price = 3000,
        image = "/images/shop/offer/360days"
    },
    {
        name = "Flying Divan",
        id = '10',
        category_id = "3",
        description = 'Do you really want to buy "Flying Divan"?\n\nNote: The Mount will only be received by the character\nwho purchased it in the Store.',
        tooltip = "",
        price = 900,
        image = "/images/shop/offer/flyingDivan"
    },
    {
        name = "Magic Carpet",
        id = '11',
        category_id = "3",
        description = 'Do you really want to buy "Magic Carpet"?\n\nNote: The Mount will only be received by the character\nwho purchased it in the Store.',
        tooltip = "",
        price = 900,
        image = "/images/shop/offer/magicCarpet"
    },
    {
        name = "Shadow Hart",
        id = '12',
        category_id = "3",
        description = 'Do you really want to buy "Shadow Hart"?\n\nNote: The Mount will only be received by the character\nwho purchased it in the Store.',
        tooltip = "",
        price = 660,
        image = "/images/shop/offer/shadowHart"
    },
    {
        name = "Black Stag",
        id = '13',
        category_id = "3",
        description = 'Do you really want to buy "Black Stag"?\n\nNote: The Mount will only be received by the character\nwho purchased it in the Store.',
        tooltip = "",
        price = 660,
        image = "/images/shop/offer/blackStag"
    },
    {
        name = "Emperor Deer",
        id = '14',
        category_id = "3",
        description = 'Do you really want to buy "Emperor Deer"?\n\nNote: The Mount will only be received by the character\nwho purchased it in the Store.',
        tooltip = "",
        price = 660,
        image = "/images/shop/offer/emperorDeer"
    },
    {
        name = "Full Winter Warden Outfit",
        id = '15',
        category_id = "4",
        description = 'Do you really want to buy "Full Winter Warden Outfit"?\n\nNote: The Outfit will only be received by the character\nwho purchased it in the Store.',
        tooltip = "Full Winter Warden Outfit",
        price = 870,
        image = "/images/shop/offer/wardenOutfit"
    },
    {
        name = "Full Champion Outfit",
        id = '16',
        category_id = "4",
        description = 'Do you really want to buy "Full Champion Outfit"?\n\nNote: The Outfit will only be received by the character\nwho purchased it in the Store.',
        tooltip = "Full Champion Outfit",
        price = 570,
        image = "/images/shop/offer/championOutfit"
    },
    {
        name = "Full Conjurer Outfit",
        id = '17',
        category_id = "4",
        description = 'Do you really want to buy "Full Conjurer Outfit"?\n\nNote: The Outfit will only be received by the character\nwho purchased it in the Store.',
        tooltip = "Full Conjurer Outfit",
        price = 720,
        image = "/images/shop/offer/conjurerOutfit"
    },
}
 
lol, the function getPlayerStorageValue returns the value of a storage, not an item ID 😅 😅 😅 😅 😅 😅


do you have any command/talkaction that shows your player how much points he have? if yes, show me this script
 
lol, the function getPlayerStorageValue returns the value of a storage, not an item ID 😅 😅 😅 😅 😅 😅


do you have any command/talkaction that shows your player how much points he have? if yes, show me this script
huh? Was it a command? Serious? I didn't know about this talkaction, lol.
So I don't want a command/talkaction. Is it possible to have a 'points' system like the OTClient store? If it's not possible, can you pass me the talkaction so I can test it?
 
huh? Was it a command? Serious? I didn't know about this talkaction, lol.
So I don't want a command/talkaction. Is it possible to have a 'points' system like the OTClient store? If it's not possible, can you pass me the talkaction so I can test it?
you are not understanding me, first of all we need to know what point system you are using in your ot, is it znote AAC premium points? gesior?

or do you want to change the store system to use item id instead of coin (storage)?
 
Ah, I'm using Gesior's point system, even "premium points", yes, any (storage)...


It could be ID 24774 or 'premium points'. I don't have any talkaction/storage. Can you help me?
Post automatically merged:

Now yes, recognized as 'premium points'. I just don't want to use talkaction, I just want to click to buy. Alright, how can I solve this?store3.png
Post automatically merged:

I managed to click to buy and the auras/wings and mounts were delivered normally.

Solved ok 🫡
 
Last edited:
Ah, I'm using Gesior's point system, even "premium points", yes, any (storage)...


It could be ID 24774 or 'premium points'. I don't have any talkaction/storage. Can you help me?
Post automatically merged:

Now yes, recognized as 'premium points'. I just don't want to use talkaction, I just want to click to buy. Alright, how can I solve this?View attachment 77271
Post automatically merged:

I managed to click to buy and the auras/wings and mounts were delivered normally.

Solved ok 🫡
How did you do it without talkactions?
 
Is there any instruction on how to add anything to the V8 defauly shop module?
Indeed there is, just follow this tutorial and make some changes to your source, and it will be working perfectly. I followed this tutorial on my TFS 1.4.3 1098 and it worked well.

 
@Mateus Robeerto increase the maxpackets in the lua config and the packets in the source, to see if you can place more offers in the shop.
The problem was resolved; it was 'local MAX_PACKET_SIZE = 5088,' and it started working for now!
 
Back
Top