If I understand correctly you want to make it so you can open and close doors by saying or using something and for it to also repair with a certain command. This was one of the first things I tried when I first started with triggers. You need to have a trigger for each function first of all. Now you can have theses trigger by typing in something, walking over a region or using an item. All them are pretty much the same atleast the actions. Anyways, I will show an example of open/close since they are almost identical.
Event:
Player - Chat Message(Type your message in, the player specified part can be fixed, you dont need to make an event for each of them)
Unit - Generic Unit Event - A unit Begins casting an ability(to use items you would use a spell to activate the trigger, this can be a dummy spell, so it has no effects) or
Unit - A Unit Enters Region(you'll need to create a region for this to work)
Conditions

only for item)
Use an ability camparison to specify the spell on the item that is being used)
Actions

easy part)
Destructible - Open/Close/Destroy Gate(pick which you like then find the gate you would like the trigger to effect)
Voila! That was easy. Now, there are things that can be changed, you can use variables to specify the user that is controlling the gates using another trigger. Close is exactly the same, pretty much you change the action. Now the repair is a little different, but not by much, like really, not by much. You can keep all of the above events and conditions(if you use the item/spell thing, you will need to make a new item) and if you do use it for the open/close i may need to explain some more on how to do that, since you will need to be turning off and on the close and open triggers.
Actions:
Destructible - Ressurect
You will have to make seperate triggers for each door, I am sure there is a way to specify it more so the use of one trigger is only needed, but i dont feel like explaining. Oh yes, if you want repair time to have a delay, then you can use the action "wait" before the ressurect so that, that action will not go into effect until the time is up.