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

TFS 1.X+ [Tfs1.2] [10.98] PACC Rune/Item

Haskys

Member
Joined
Jul 19, 2019
Messages
97
Reaction score
8
Location
Poland
Hello,

Does anyone have a script on the item that adds x days pacc?
Something like a pacc rune
Engine: tfs 1.2

Haskys
 
Solution
Lua:
local SCROLLS = { -- ID of Scroll, Number of Premium Days
    [X] = Y
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local scroll = SCROLLS[item:getId()]
    if not scroll then
        return true
    end

    player:addPremiumDays(scroll)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, scroll .. ' premium days have been added to your account. Please re-log to take effect!')
    item:remove()
    return true
end

Just replace : X for ID of scroll, Y for premium days and add in actions.
Lua:
local SCROLLS = { -- ID of Scroll, Number of Premium Days
    [X] = Y
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local scroll = SCROLLS[item:getId()]
    if not scroll then
        return true
    end

    player:addPremiumDays(scroll)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, scroll .. ' premium days have been added to your account. Please re-log to take effect!')
    item:remove()
    return true
end

Just replace : X for ID of scroll, Y for premium days and add in actions.
 
Solution
Back
Top