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

tfs 1.2 scroll give mounts,outfit,addons

i try myself but i have problems to send storage 998898
and add dosendcancelplayer

Code:
local config = {
    [24347] = {mountid = 1, storage = 998898}
}

function onUse(player, item, itemid, fromPosition, target, toPosition, isHotkey)
    local scroll = config[item.itemid]
    if not scroll then
        return false
    end
   
    doPlayerAddMount(player, config[item.itemid].mountid)
    player:sendTextMessage(player, MESSAGE_EVENT_ADVANCE, "You have received ".. scroll.mountid .." premium mount.")
    item:remove(1)
    return true
end
 
i try myself but i have problems to send storage 998898
and add dosendcancelplayer

Code:
local config = {
    [24347] = {mountid = 1, storage = 998898}
}

function onUse(player, item, itemid, fromPosition, target, toPosition, isHotkey)
    local scroll = config[item.itemid]
    if not scroll then
        return false
    end
  
    doPlayerAddMount(player, config[item.itemid].mountid)
    player:sendTextMessage(player, MESSAGE_EVENT_ADVANCE, "You have received ".. scroll.mountid .." premium mount.")
    item:remove(1)
    return true
end

Maybe something like:

Code:
local config = {
    [24347] = {mountid = 1, storage = 998898}
}

function onUse(player, item, itemid, fromPosition, target, toPosition, isHotkey)
    local scroll = config[item.itemid]

    if player:getStorageValue(scroll.storage >= 1) then
        return false
    end

    player:setStorageValue(scroll.storage, 1)
    player:addMount(scroll.mountid)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received ".. scroll.mountid .." premium mount.")
    item:remove(1)
    return true
end
 
Maybe something like:

Code:
local config = {
    [24347] = {mountid = 1, storage = 998898}
}

function onUse(player, item, itemid, fromPosition, target, toPosition, isHotkey)
    local scroll = config[item.itemid]

    if player:getStorageValue(scroll.storage >= 1) then
        return false
    end

    player:setStorageValue(scroll.storage, 1)
    player:addMount(scroll.mountid)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received ".. scroll.mountid .." premium mount.")
    item:remove(1)
    return true
end
don't work how to use setstoragevalue ;]

Code:
local config = {
    [24347] = {mountid = 1, storage = 998898},
    [24348] = {mountid = 2, storage = 998897}
}

function onUse(player, item, itemid, fromPosition, target, toPosition, isHotkey)
    local scroll = config[item.itemid]

    if player:getStorageValue(scroll.storage >= 1) then
        return false
    end

    player:setStorageValue(scroll.storage, 1)
    player:addMount(scroll.mountid)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received ".. scroll.mountid .." premium mount.")
    item:remove(1)
    return true
end
 
Back
Top