Author Topic: Event_makechatcommand?  (Read 1792 times)

I need an add-on that lets you make your own commands simply, for example the command /kill would kill the player or /shrink and it would change the players scale.

So like Onplayeractivate> Self > makechatcommand > type in something in a little box like /dothis and then choose what you want like player > kill
So when you type /dothis in chat it kills the player!

I think this is needed if your confused about what im talking about tell me.

so you want a way to have all output events targeted on the player to have a chat command?
seems like that shouldn't be too hard to do

so you want a way to have all output events targeted on the player to have a chat command?
seems like that shouldn't be too hard to do
That would be awsome if you could make it!


The structure coud to Like this.

OnActivate-self-makechatcommand [/kill me]

OnChatcommand-self-checkchatcommand [/kill me]

OnChatcommandCorrect-writer-kill

Now this style limits chatcommands to be 1 for 1 brick. But this coud be use for like math competitions. Like this:

OnRelay-minigame-chatmsgall-[2+6=?]

OnRelay-self-makechatcommand [/8]

OnChatcommand-self-checkchatcommand [/8]

OnChatcommandCorrect-writer-addHealth [-1]

Then there will be another brick tha looks for players that have 99hp

OnRelay-self-fireRelay

OnRelay-self-ifPlayerHealth-equals [99]

OnVariableTrue-client-IncScore [1]

OnVariabeTrue-minigame-chatmassageall [%1 Has Won]

This will need VCE to work. Also in not sure about ifPlayerHealth variable. I'll fix that when I find it out.
« Last Edit: August 15, 2014, 06:11:06 AM by Nicepoint »

This is a terrible idea. Come to a server, and make /crash. Now what happens? Also, I'm not even sure this is possible.

This is a terrible idea. Come to a server, and make /crash. Now what happens? Also, I'm not even sure this is possible.
This is very possible, not abusive if done right, and I was actually working on something like this. It would allow you to dynamically bind specific commands to bricks for everyone or specific clients.

I never got around to actually finish it though. Maybe I should work on it again.

This is a terrible idea. Come to a server, and make /crash. Now what happens? Also, I'm not even sure this is possible.
You pick events, not console commands. Also, this really should be on a server with restricted events (the addon or the preference) or in a no-building minigame, but even if it isn't it won't be that abusable.

Also, this really should be on a server with restricted events (the addon or the preference) or in a no-building minigame
Why? There is no way you could cause any harm.

There are already command events, but it's annoying having to type /(custom command name) etc... every time.  Also, it would be pretty easy if it utilized the same system as follows:

onEventCmd >> Self/NB >> ifEventCmd [Command Root] [Event Range]
onEventCmdTrue ...
onEventCmdFalse ...

And then perhaps create some VCE variables for following parameters.

Like for instance, for a custom stereo in your house, /setmusic AfterSchoolSpecial.

Or for an RPG,

/donate 5 Gold
« Last Edit: August 15, 2014, 06:32:14 PM by SWAT One »

The old version already has VCE values for the first 5 arguments to the command.

The on/ifCmd is actually a security issue that I didn't think about back then. The new version will directly bind /cmds (not /ec cmds) to specific bricks, and after that they can't be used by other bricks. You can also dynamically bind them for specific clients, for example to have a brick start a prompt which then can be answered with /yes /no while the same commands might do a completely different action after clicking some other brick.

You'll just have to remember to un-bind the command after it's not needed anymore. Or maybe trying to bind an already used command should overwrite the older binding, not sure yet.

That might be trouble with different levels of permission or administration.  Perhaps preserve the command to a BL_ID and then require full trust to make the command co-owned?

For instance, if Person A registers /explode, and Person B wants to register /explode, it would both require full trust, and when the full trust is valid, prompt with a yes/no option to allow Person B to combine Person B's event effects with Person A's.  It would keep them on separate bricks.
« Last Edit: August 15, 2014, 08:47:13 PM by SWAT One »

If you bind the same commamd to multiple bricks that would just lead to a huge mess. It's probably best to only allow a single binding at a time.

If you bind the same commamd to multiple bricks that would just lead to a huge mess. It's probably best to only allow a single binding at a time.
I dont know what hell you guys are talking about but someone needs to make this.

pretty sure they're talking about something else, you just want the player output events as commands, right?