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

Making word not visible in local chat

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
993
Solutions
5
Reaction score
55
Hi
so i have commands which, when i type, text appear in local chat to, so it's really pissing me off.
Example i type "test" this message send to local chat and then code start working. I want to make it i type "test" no one see this word "test". I hope you understand me guys :D
p.s i think i dont need to send any code just told me how do i have to make something like this
 
Solution
Not home to test.. But I'd assume this should work like we stated earlier.
Just return false everything.
Lua:
function onSay(player, words, param)
    local pid = player:getId()
   
    local TRANS = transform[player:getVocation():getId()]
   
    if not TRANS then
        player:sendCancelMessage("You cannot transform.")
        return false
    end
    if player:getLevel() < TRANS.level then
        player:sendCancelMessage("You must reach level "..TRANS.level.." to transform.")
        return false
    end
    if player:getSoul() < TRANS.rage then
        player:sendCancelMessage("You need "..TRANS.rage.." to transform.")
        return false
    end
    if player:getMana() < TRANS.mana then
        player:sendCancelMessage("You need...
at the end of the talkaction command just return false

Code:
function onSay(player,x,x,x)
code
return false
end
 
at the end of the talkaction command just return false

Code:
function onSay(player,x,x,x)
code
return false
end
It work, but not fully how i want. Now it work like this - so imagine you're 0 and you have to reach 1 so till you reach that 1, they hide message but if you reached 1 they do not hide message and still send in local chat.
To make it more clear
[0] : Command - hided
[1]: Command - not hide at this point
It's pretty messy to explain but maybe you get me what i mean.
you mean the command appears at the screen? if yes I know how to help you just show your code if you can
Nah i mean do not show some kind of text in local chat if you try to type it, but still let execute command.
 
use storages..

Code:
function onSay(player,x,x,x)
if storage(123123) == 0 then
<code>
return false
else
<code>
return true
end
 
Like others said, it'd be easiest just to show code at this point.
We are kinda guessing at thin air.
 
Like others said, it'd be easiest just to show code at this point.
We are kinda guessing at thin air.
Code:
function onSay(player, words, param)
    local pid = player:getId()

    local TRANS = transform[player:getVocation():getId()]

    if not TRANS then return player:sendCancelMessage("You cannot transform.") end
    if player:getLevel() < TRANS.level then return player:sendCancelMessage("You must reach level "..TRANS.level.." to transform.") end
    if player:getSoul() < TRANS.rage then return player:sendCancelMessage("You need "..TRANS.rage.." to transform.") end
    if player:getMana() < TRANS.mana then return player:sendCancelMessage("You need "..TRANS.mana.." to transform.") end

    local outfit = player:getOutfit()
    outfit.lookType = TRANS.looktype

    if TRANS.constant then
        player:setOutfit(outfit)
    else
        player:setOutfit(outfit, false)
    end

    player:addSoul(-TRANS.rage)
    player:setMaxHealth(player:getMaxHealth() + TRANS.addHealth)
    player:setMaxMana(player:getMaxMana() + TRANS.addMana)
    player:getPosition():sendMagicEffect(TRANS.effect)
    player:setVocation(TRANS.newVoc)
    player:save()
return false
end
 
Not home to test.. But I'd assume this should work like we stated earlier.
Just return false everything.
Lua:
function onSay(player, words, param)
    local pid = player:getId()
   
    local TRANS = transform[player:getVocation():getId()]
   
    if not TRANS then
        player:sendCancelMessage("You cannot transform.")
        return false
    end
    if player:getLevel() < TRANS.level then
        player:sendCancelMessage("You must reach level "..TRANS.level.." to transform.")
        return false
    end
    if player:getSoul() < TRANS.rage then
        player:sendCancelMessage("You need "..TRANS.rage.." to transform.")
        return false
    end
    if player:getMana() < TRANS.mana then
        player:sendCancelMessage("You need "..TRANS.mana.." to transform.")
        return false
    end
   
    local outfit = player:getOutfit()
    outfit.lookType = TRANS.looktype
   
    if TRANS.constant then
        player:setOutfit(outfit)
    else
        player:setOutfit(outfit, false)
    end
   
    player:addSoul(-TRANS.rage)
    player:setMaxHealth(player:getMaxHealth() + TRANS.addHealth)
    player:setMaxMana(player:getMaxMana() + TRANS.addMana)
    player:getPosition():sendMagicEffect(TRANS.effect)
    player:setVocation(TRANS.newVoc)
    player:save()
    return false
end
 
Solution
Back
Top