Cmd triggered events. [V2.5!]

Poll

Like this?

OMG COOL
Hmm, that's nice
So useful I'm gonna use
Dafuq is this?
I don't get it?

Author Topic: Cmd triggered events. [V2.5!]  (Read 9722 times)

Trigger Events with commands!
If you say /eventcmd [CommandName], the event onCmd gets triggered on all bricks.
If you don't like this command, open up RTB preferences and change the name.
(For the 'advanced' peeps, this requires use of eval function and some other stuff. It does several checks to prevent overwriting of other functions and removes the old function before creating the new. 100% safe.)

To prevent lag while looping through all bricks to trigger the event, bricks are added to a list when the event is added and removed when the event is removed.

Then, you can choose
onCmd - Self - ifCmd [CmName] [Restriction] [IDs for restrict] [Which events to trigger]
to make different stuff happen with different commands.

You have the following restrictions:

Unrestricted (Everyone)
Same Minigame
Only Me
BL_ID Allow
BL_ID Deny
No Trust
Build Trust
Full Trust
Distance


ifCmd triggers onCmdCalled if the command is the same as what you chose...
And onCmdRestricted if the restriction fails.

Ah I fail to explain this. Look at the picture.



Introducing in V2.5:
Additional parameters.

Instead of /ec [Command]
You can now also say
/ec [Command] [Param] [Param] [Param] [Param] [Param].

Those parameters get saved to client variables which you can access with VCE_ifValue.
They are
<var:cl:ceparam1> | First parameter
<var:cl:ceparam2> | Next parameter
<var:cl:ceparam3> | Next parameter
<var:cl:ceparam4> | Next parameter
<var:cl:ceparam5> | Last paramter

You can now make awesome things like shops with this!
Example of use:





Finally released on RTB!
DOWNLOAD on RTB

« Last Edit: August 04, 2012, 03:39:56 PM by Mold »

Nice and First toast

meh, i guess it's alright

nice. Good replacement for scripting.

-Submitted to rtb
-Waiting for approval

You could do this with VCE, But this is much more simple

you'll be sure to get my download.

You could do this with VCE, But this is much more simple

you'll be sure to get my download.
The only way to do this with VCE is to either run a relay loop, or to touch the brick or anything.
This event captures ALL CLIENTS, and will trigger any brick that has the onCommand event.

das pree coo mang
 :cookie:ree coo mang.

The only way to do this with VCE is to either run a relay loop, or to touch the brick or anything.
This event captures ALL CLIENTS, and will trigger any brick that has the onCommand event.
It would be nice if only the person who made it would trigger it.
Unless that is already a pref.

It would be nice if only the person who made it would trigger it.
Unless that is already a pref.
Turn 'Use all bricks' in server preferences off
Use 'OnlyMe' restriction.
« Last Edit: August 02, 2012, 10:01:09 AM by Mold »

maybe a field, for who can trigger a particular event?

minigame / client / trust list / anyone



beyond that forget yeah good job
now i've gotta come up with something that uses this

I see how this can be usefull.

Tried it, loved it, great job. 

Only problem I have with it is having to type /eventcmd is quite annoying, for RPG's using VCE or stuff like that the command looks a lot uglier.

Is there any way to shorten that to just /ecmd or /cmd ?


AWESOME! I've been wating a long time for this! This is perfect for my Jail Escape! And the new house i'm going to build!