Making word not visible in local chat

Discussion in 'Support' started by henkas, Jan 12, 2018.

  1. henkas

    henkas Member

    Joined:
    Jul 8, 2015
    Messages:
    138
    Likes Received:
    3
    Best Answers:
    3
    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
     
  2. Best Answer:
    Post #11 by Xikini, Jan 12, 2018
  3. jestem pro

    jestem pro Member

    Joined:
    Apr 20, 2013
    Messages:
    298
    Likes Received:
    22
    Best Answers:
    3
    you mean the command appears at the screen? if yes I know how to help you just show your code if you can
     
  4. Aeronx

    Aeronx Active Member

    Joined:
    Dec 17, 2015
    Messages:
    467
    Likes Received:
    30
    Best Answers:
    3
    at the end of the talkaction command just return false

    Code (Text):
    1. function onSay(player,x,x,x)
    2. code
    3. return false
    4. end
     
    henkas likes this.
  5. henkas

    henkas Member

    Joined:
    Jul 8, 2015
    Messages:
    138
    Likes Received:
    3
    Best Answers:
    3
    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.
    Nah i mean do not show some kind of text in local chat if you try to type it, but still let execute command.
     
  6. Aeronx

    Aeronx Active Member

    Joined:
    Dec 17, 2015
    Messages:
    467
    Likes Received:
    30
    Best Answers:
    3
    use storages..

    Code (Text):
    1. function onSay(player,x,x,x)
    2. if storage(123123) == 0 then
    3. <code>
    4. return false
    5. else
    6. <code>
    7. return true
    8. end
     
  7. Xikini

    Xikini I whore myself out for likes

    Joined:
    Nov 17, 2010
    Messages:
    3,403
    Likes Received:
    1,717
    Best Answers:
    60
    Like others said, it'd be easiest just to show code at this point.
    We are kinda guessing at thin air.
     
  8. henkas

    henkas Member

    Joined:
    Jul 8, 2015
    Messages:
    138
    Likes Received:
    3
    Best Answers:
    3
    Code (Text):
    1.  
    2. function onSay(player, words, param)
    3.     local pid = player:getId()
    4.  
    5.     local TRANS = transform[player:getVocation():getId()]
    6.  
    7.     if not TRANS then return player:sendCancelMessage("You cannot transform.") end
    8.     if player:getLevel() < TRANS.level then return player:sendCancelMessage("You must reach level "..TRANS.level.." to transform.") end
    9.     if player:getSoul() < TRANS.rage then return player:sendCancelMessage("You need "..TRANS.rage.." to transform.") end
    10.     if player:getMana() < TRANS.mana then return player:sendCancelMessage("You need "..TRANS.mana.." to transform.") end
    11.  
    12.     local outfit = player:getOutfit()
    13.     outfit.lookType = TRANS.looktype
    14.  
    15.     if TRANS.constant then
    16.         player:setOutfit(outfit)
    17.     else
    18.         player:setOutfit(outfit, false)
    19.     end
    20.  
    21.     player:addSoul(-TRANS.rage)
    22.     player:setMaxHealth(player:getMaxHealth() + TRANS.addHealth)
    23.     player:setMaxMana(player:getMaxMana() + TRANS.addMana)
    24.     player:getPosition():sendMagicEffect(TRANS.effect)
    25.     player:setVocation(TRANS.newVoc)
    26.     player:save()
    27. return false
    28. end
    29.  
     
  9. Aeronx

    Aeronx Active Member

    Joined:
    Dec 17, 2015
    Messages:
    467
    Likes Received:
    30
    Best Answers:
    3
    What exactly you dont want to show on textdialog and when?
     
    henkas likes this.
  10. henkas

    henkas Member

    Joined:
    Jul 8, 2015
    Messages:
    138
    Likes Received:
    3
    Best Answers:
    3
    Just dont let send word "transform" in local chat this word should be invisible all the time
     
  11. Static_

    Static_ Support Team Support Team

    Joined:
    Feb 14, 2015
    Messages:
    3,329
    Likes Received:
    1,453
    Best Answers:
    209
    return false should work just fine
     
  12. Xikini

    Xikini I whore myself out for likes

    Joined:
    Nov 17, 2010
    Messages:
    3,403
    Likes Received:
    1,717
    Best Answers:
    60
    Best Answer
    Not home to test.. But I'd assume this should work like we stated earlier.
    Just return false everything.
    Code (Lua):
    1. function onSay(player, words, param)
    2.     local pid = player:getId()
    3.    
    4.     local TRANS = transform[player:getVocation():getId()]
    5.    
    6.     if not TRANS then
    7.         player:sendCancelMessage("You cannot transform.")
    8.         return false
    9.     end
    10.     if player:getLevel() < TRANS.level then
    11.         player:sendCancelMessage("You must reach level "..TRANS.level.." to transform.")
    12.         return false
    13.     end
    14.     if player:getSoul() < TRANS.rage then
    15.         player:sendCancelMessage("You need "..TRANS.rage.." to transform.")
    16.         return false
    17.     end
    18.     if player:getMana() < TRANS.mana then
    19.         player:sendCancelMessage("You need "..TRANS.mana.." to transform.")
    20.         return false
    21.     end
    22.    
    23.     local outfit = player:getOutfit()
    24.     outfit.lookType = TRANS.looktype
    25.    
    26.     if TRANS.constant then
    27.         player:setOutfit(outfit)
    28.     else
    29.         player:setOutfit(outfit, false)
    30.     end
    31.    
    32.     player:addSoul(-TRANS.rage)
    33.     player:setMaxHealth(player:getMaxHealth() + TRANS.addHealth)
    34.     player:setMaxMana(player:getMaxMana() + TRANS.addMana)
    35.     player:getPosition():sendMagicEffect(TRANS.effect)
    36.     player:setVocation(TRANS.newVoc)
    37.     player:save()
    38.     return false
    39. end
     
  13. Aeronx

    Aeronx Active Member

    Joined:
    Dec 17, 2015
    Messages:
    467
    Likes Received:
    30
    Best Answers:
    3
    then best answer should be mine haha! :p
     

Share This Page

Loading...