• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Request] need shop to sell addons & mounts [TFS 1.0]

God Mythera

Veteran OT User
Joined
Aug 11, 2012
Messages
2,051
Solutions
2
Reaction score
260
Location
United States
Hello and im trying to figure out how to make it so players receive addons & mounts after buyingon the site, i keep trying to fix it and i have no idea how to fix it =\ so could someone maybe help me?

This is the script i have.

data\creaturescripts\scripts\others\addons-montarias.lua
Code:
function onLogin(cid)

                                                               
local player = Player(cid)
local addons ={
          --[storage] = {outfit_male, outfit_female},
        [28416] = {143, 147}, -- barbarian
        [28417] = {134, 142}, -- warrior
        [28418] = {152, 156}, -- assassins
        [28419] = {465, 466}, -- Insectoid
        [28420] = {133, 141},  -- summoner
        [28421] = {472, 471}, -- Entrepreneur
        [28422] = {144, 148}, -- duid
        [28423] = {278, 279}, -- brotherhood
        [28424] = {577, 578}, -- Dream Warden
        [28425] = {610, 618}, -- Glooth Engineer
        [28426] = {130, 138}, -- mage
        [28427] = {634, 635}, -- Conjurer
        [28428] = {128, 136}, -- Citizen
        [28429] = {129, 137}, -- Hunter
        [28430] = {131, 139}, -- Kinghit
        [28431] = {132, 140}, -- Noblewoman
        [28432] = {145, 149}, -- Wizard
        [28433] = {146, 150}, -- Oriental
        [28434] = {151, 155}, -- Pirate
        [28435] = {153, 157}, -- Beggar
        [28436] = {154, 158}, -- Shaman
        [28437] = {251, 252}, -- Norsewoman
        [28438] = {268, 269}, -- Nightmare
        [28439] = {273, 270}, -- jester
        [28441] = {289, 288}, -- demonhunter
        [28442] = {325, 324}, -- yalaharian
        [28444] = {335, 336}, -- warnaster
        [28445] = {327, 366}, -- wayfarer
        [28446] = {430, 431}, -- afflicted
        [28447] = {432, 433}, -- elementalist
        [28448] = {463, 464}, -- deepling
        [28449] = {512, 513}, -- crystal warlord
        [28450] = {516, 514}, -- soil guardian
        [28451] = {541, 542}, -- demon
        [28452] = {574, 575}, -- cave explorer
        [28453] = {619, 620}, -- jersey
        [28454] = {637, 636}, -- beastmaster
        [28455] = {632, 633} -- champion
       
        }
       
                for storage, addon in pairs(addons) do
                        if player:getStorageValue(storage) > 0 then
                                player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
                                player:addOutfitAddon(addon[1], 3)
                                player:addOutfitAddon(addon[2], 3)
                                player:sendTextMessage(MESSAGE_INFO_DESCR, "Seu Addon full foi adicionado!")
                                player:setStorageValue(storage, 0)
                        end
                end
               
                                                                                               
local mounts ={
                --[storage] = mounts,
        [80000] = 1, -- Widow Queen
        [80001] = 2, -- Racing Bird
        [80002] = 3, -- War Bear
        [80003] = 4, -- Black Sheep
        [80004] = 5, -- Midnight Panther
        [80005] = 6, -- Draptor
        [80006] = 7, -- Titanica
        [80007] = 8, -- Tin Lizzard
        [80008] = 9, -- Blazebringer
        [80009] = 10, -- Rapid Boar
        [80010] = 11, -- Stampor
        [80011] = 12, -- Undead Cavebear
        [80012] = 13, -- Donkey
        [80013] = 14, -- Tiger Slug
        [80014] = 15, -- Uniwheel
        [80015] = 16, -- Crystal Wolf
        [80016] = 17, -- War Horse
        [80017] = 18, -- Kingly Deer
        [80018] = 19, -- Tamed Panda
        [80019] = 20, -- Dromedary
        [80020] = 21, -- King Scorpion
        [80021] = 22, -- Rented Horse
        [80022] = 23, -- Armoured War Horse
        [80023] = 24, -- Shadow Draptor"
        [80024] = 25, -- Rented Horse
        [80025] = 26, -- Nethersteed
        [80026] = 27, -- Ladybug
        [80027] = 28, -- Manta
        [80028] = 29, -- Ironblight
        [80029] = 30, -- Magma Crawler
        [80030] = 31, -- Dragonling
        [80031] = 32, -- Gnarlhound
        [80032] = 33, -- Crimson Ray
        [80033] = 34, -- Steelbeak
        [80034] = 35, -- Water Buffalo
        [80035] = 36, -- Tombstinger
        [80036] = 37, -- Platesaurian
        [80037] = 38, -- Ursagrodon
        [80038] = 39, -- The Hellgrip
        [80039] = 40, -- Jade Lion
        [80040] = 41, -- Golden Lion
        [80041] = 42, -- Shock Head
        [80042] = 43, -- Walker
        [80043] = 44, -- Azudocus
        [80044] = 45, -- Carpacosaurus
        [80045] = 46, -- Death Crawler
        [80046] = 47, -- Flamesteed
        [80047] = 48, -- Jade Pincer
        [80048] = 49, -- Tempest
        [80049] = 50 -- Winter King
       
        }
               
                for storage, mount in pairs(mounts) do
                        if player:getStorageValue(storage) > 0 then
                                player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
                                player:addMount(mount)
                                player:sendTextMessage(MESSAGE_INFO_DESCR, "Sua Mount foi adicionado!")
                                player:setStorageValue(storage, 0)
                        end
                end    
        return true
end
Code:
    <event type="login" name="AddonsMounts" script="others/addons-montarias.lua"/>

Am i missing any scripts maybe? : s
 

Similar threads

Back
Top