Request Core Plugin Change - From Say to Message
#1
To Whom It May Concern:

I am working on a plugin called LMO (Light Multiplayer Online) that adds in game speech commands letting people hear only what is said near them. This is for a RP heavy game. I also have moods (/mood) that affect speech and emotes (/emote) and other various RP functions. So you could have [/mood nervous] and do [/say Hello] and you would get ["Hello" Duquesne says nervously].

I have a whisper (/whisper), normal volume speech (/say), and screaming (/yell) which all deliver messages based on distance, not based on name (or just everyone).

The existing /say command, which sends a message to all players in the game, might be better served being named /broadcast or /message. I have already renamed it on my server to /broadcast so the plugins don't interfere with each other.

Please consider changing the default /say command to /broadcast or /message.

The following is my code so you can see what I am doing:

Code:
function LMOHandleSpeechCommand(Split,Player)
    if Split[2] == nil then
        Player:SendMessageInfo("Usage: "..Split[1].." <message>")
    elseif Split[1] == "/say" then
        range = cBoundingBox(Player:GetPosX() - 16, Player:GetPosX() + 16, Player:GetPosY() - 16, Player:GetPosY() + 16, Player:GetPosZ() - 16, Player:GetPosZ() + 16)
        action = "[SAY]"
       chatColor = cChatColor.White
    elseif Split[1] == "/whisper" then
        range = cBoundingBox(Player:GetPosX() - 2, Player:GetPosX() + 2, Player:GetPosY() - 2, Player:GetPosY() + 2, Player:GetPosZ() - 2, Player:GetPosZ() + 2)
        action = "[WHISPER]"
       chatColor = cChatColor.Purple
    elseif Split[1] == "/yell" then
        range = cBoundingBox(Player:GetPosX() - 128, Player:GetPosX() + 128, Player:GetPosY() - 128, Player:GetPosY() + 128, Player:GetPosZ() - 128, Player:GetPosZ() + 128)
        action = "[YELL]"
       chatColor = cChatColor.Red
    end
    world = Player:GetWorld()
    local Send = function(Entity)
        if Entity:IsPlayer() then
            Player = tolua.cast(Entity, "cPlayer")
            Player:SendMessage(chatColor..""..action..""..chatColor.." <"..Player:GetName().."> "..table.concat( Split , " " , 2 ))
        end
    end
    world:ForEachEntityInBox(range, Send)
    return true
end
Reply
Thanks given by: PureTryOut
#2
However, /say is a Vanilla Minecraft command, so that presents a difficulty as we are trying to make a transition to Cuberite straightforward.
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)