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

undead mage

Active Member
Joined
Mar 25, 2012
Messages
364
Solutions
2
Reaction score
47
Location
Amsterdam
Well I wanted to request some commands that you had in tfs 0.3.7 but you don't have now

1. /bc
Old Script:
Code:
function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        return true
    end

    local t = string.explode(param, " ", 1)
    if(not t[2]) then
        doBroadcastMessage(t[1])
    elseif(not doBroadcastMessage(t[2], MESSAGE_TYPES[t[1]])) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Bad message color type.")
    end

    return true
end

2. !bless
Old Script:
Code:
-- [(  Script edited by: www.ChaitoSoft.com )] --
function onSay(cid, words, param)
if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
doPlayerSendCancel(cid,'You already have all blessings.')
else
if doPlayerRemoveMoney(cid, 20000) == TRUE then
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doSendMagicEffect(getPlayerPosition(cid), 28)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You received all blessings!')
else
doPlayerSendCancel(cid, "You need 20k to buy blessings!")
end
end
return TRUE
end
 
Not sure but I think this is what you're looking for?

!bless
Code:
function getCost(level)
    if level <= 30 then
        return 2000*5
    elseif level >= 120 then
        return 20000*5
    else
        return ((level - 20) * 200 * 5)
    end
end

function onSay(cid, words, param)
    local p = Player(cid)
    local cost = getCost(getPlayerLevel(cid))
    if(not(isPlayerPzLocked(cid))) then
        if(p:hasBlessing(1) and p:hasBlessing(2) and p:hasBlessing(3) and p:hasBlessing(4) and p:hasBlessing(5) and p:hasBlessing(6)) then
            p:sendCancelMessage("You have already been blessed by the gods.")
            return false
        end
        if(p:removeMoney(cost)) then
            for b = 1,6 do
                p:addBlessing(b)
            end
            p:getPosition():sendMagicEffect(39)
            p:sendTextMessage(19, "You have been blessed by the gods!")
        else
            p:sendCancelMessage("You need "..cost.." gold coins to buy all blessings.")
        end
    else
        p:sendCancelMessage("You can't buy bless, when you are in a battle.")
    end
return false
end

/b
Code:
function onSay(player, words, param)
    if not getPlayerFlagValue(player, PlayerFlag_CanBroadcast) then
        return true
    end

    print("> " .. player:getName() .. " broadcasted: \"" .. param .. "\".")
    for _, targetPlayer in ipairs(Game.getPlayers()) do
        targetPlayer:sendPrivateMessage(player, param, TALKTYPE_BROADCAST)
    end
    return false
end
 
Not sure but I think this is what you're looking for?

!bless
Code:
function getCost(level)
    if level <= 30 then
        return 2000*5
    elseif level >= 120 then
        return 20000*5
    else
        return ((level - 20) * 200 * 5)
    end
end

function onSay(cid, words, param)
    local p = Player(cid)
    local cost = getCost(getPlayerLevel(cid))
    if(not(isPlayerPzLocked(cid))) then
        if(p:hasBlessing(1) and p:hasBlessing(2) and p:hasBlessing(3) and p:hasBlessing(4) and p:hasBlessing(5) and p:hasBlessing(6)) then
            p:sendCancelMessage("You have already been blessed by the gods.")
            return false
        end
        if(p:removeMoney(cost)) then
            for b = 1,6 do
                p:addBlessing(b)
            end
            p:getPosition():sendMagicEffect(39)
            p:sendTextMessage(19, "You have been blessed by the gods!")
        else
            p:sendCancelMessage("You need "..cost.." gold coins to buy all blessings.")
        end
    else
        p:sendCancelMessage("You can't buy bless, when you are in a battle.")
    end
return false
end

/b
Code:
function onSay(player, words, param)
    if not getPlayerFlagValue(player, PlayerFlag_CanBroadcast) then
        return true
    end

    print("> " .. player:getName() .. " broadcasted: \"" .. param .. "\".")
    for _, targetPlayer in ipairs(Game.getPlayers()) do
        targetPlayer:sendPrivateMessage(player, param, TALKTYPE_BROADCAST)
    end
    return false
end

I will test bless out when I get home but I ment /bc not /b because with /bc you could also choose white and green and if you choose white then it would come at the bottom of your screen like when you try to walk in a wall it says Sorry, not possible. There would the text appear if you use /bc white (text)
 
Back
Top