Poll

Want?

/Yes
8 (80%)
/No
2 (20%)

Total Members Voted: 10

Author Topic: More Flexible Command Events  (Read 1142 times)

Why do you have this crusade against any add-on that involves /commands?

Because mods with /commands feel sloppy and the particular commands are forgotten.
I've had 4 to 5 instances if mods I used on and off and each time I needed to go back, I had to look up the topic to recall the commands.
It's an annoying and avoidable process.
/commands are just the worst thing ever put into mods. Especially when they aren't needed. It's an easy and cheap way around calling a function, and it shows.

I add guides to every /command action so that users know what's going on.

Heh, i actually made those command events. I was working on a new version where you could bind a unique command (like /yes or /no or /doadminstuff) to a specific brick but I never got it done because I could not decide how to do that in a user friendly way. Ideas?

What about this:
Player types a single /command once, activating command mode.  In this mode, the player just has to type the necessary parameters, without the need for the /command every time.  Anything they type in this mode is not visible server-wide.  Once finished, the player can either type /end, or the ending can be evented into the brick by the host.  What's useful about this is that a player can stay in this mode the entire time, and seperate talk events can be used for players to talk server-wide.

What about this:
Player types a single /command once, activating command mode.  In this mode, the player just has to type the necessary parameters, without the need for the /command every time.  Anything they type in this mode is not visible server-wide.  Once finished, the player can either type /end, or the ending can be evented into the brick by the host.  What's useful about this is that a player can stay in this mode the entire time, and seperate talk events can be used for players to talk server-wide.
So for example:

/cmdstart vanilla
>Pudding
>IceCream
>Beans
/cmdend

???

So for example:

/cmdstart vanilla
>Pudding
>IceCream
>Beans
/cmdend

???

Lets say you want to enter a bank, deposit money, specify an amount, and walk away.  Either of these is how I'd suggest doing it:

Code: [Select]
>/cmdmode
>bank
>deposit
>500
/cmdmode

or

Code: [Select]
>/cmdmode
>bank, desposit, 500
>/cmdmode

Where each line is a new text session.  Each field - "bank", "deposit", "500" - is defined by the eventer using the same set-up as the current command events.  Pertaining to the two above methods of input, the former would be used by someone who is new to the server and doesn't know all of the commands, and the latter is for players that know the commands and can easily type it all out quickly.  The only difference between these command events and using an event system that utilizes OnPlayerTalk is that these have a defined functional range and any text the player types does not show up for the entire server to see.  This system allows interaction with systems to be more fluid and natural.

Oh okay I see.  That would indeed be cool.

No. There should not be a /cmdmode.

The idea is that you can dynamically link /commands to the events on the brick. So your events will actually react to /yes and /no for example, or someone else might want /resetPuzzle to do something.

That has a problem though - input events do not have parameter boxes. How would the system know what commands to create and which events to call with them? Of course you could just have a registerCommand output event which lets you bind a command to specific onCommand input events on the brick. You would then have to trigger said event before it works though.

So long as it's registered before, that's fine.

0XonActivateSelfregisterCommandBan
0XonCommandCalledClientcenterPrintBADMIN!!1!
0XonCommandCalledPlayerkill

0XonActivateSelfregisterCommandBan
0XonCommandCalledClientcenterPrintBADMIN!!1!
0XonCommandCalledPlayerkill
...you would not be able to overwrite existing functions.