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

Windows Request:Rune lever

Griffin0750

New Member
Joined
Sep 16, 2008
Messages
34
Reaction score
0
Can someone hook me up with a Rune lever script that sends X runes to your backpack for X money
(no backpack)
 
requests belong in uh..
requests

Code:
local cfg = {
    rune = 2268, -- Sudden Death Rune
    count = 370, -- Total count of runes to buy
    cost = 1000 -- Cost in gold coins
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local count, num = cfg.count, nil
    if not player:removeMoney(cfg.cost) then
        player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'You need '.. cfg.cost - player:getMoney() .. ' more gold.')
        return true
    end
    while count > 0 do
        num = math.min(100, count)
        player:addItem(cfg.rune, num)
        count = count - num
    end
    player:sendTextMessage(MESSAGE_INFO_DESCR, string.format('You have bought %d %s for %d gold coins.', cfg.count, ItemType(cfg.rune):getPluralName(), cfg.cost))
    return true
end
 
Last edited:
Back
Top