ID:942850
 
(See the best response by Kaiochao.)
Code:
mob/verb
Communicate(msg as text)
set hidden = 1
if(lentext(msg) >= 150)
alert("Your message is too long.")
return

if(Say=="Say")
src.AreaWords=msg
LocCheck()

mob/proc
LocCheck()
for(var/obj/ChaosGate/C in view(1, loc))
AreaCheck()
return

view(src) << "<font color=white>[src]:[AreaWords]</font>"
AreaWords = ""

AreaCheck()
if(AreaWords=="Courageous Engaging Daydream")
view(src)<<"<font color=#FF0033>[src]:[AreaWords]</font>!"
Gating()
spawn(14) Move(locate(/area/Fields/Courageous_Engaging_Daydream))


Problem description:

This is actually two questions in one. What I'm trying to do is make a way for players to say a specific set of words near a portal, so that if they say they right words it will send them to the area chosen. I don't know an efficient way to do it, and this leads me to another problem. I don't know how to create a situation that allows text commands, so that if someone were to say, for instance, "say Hello", they would say "Hello" in the channel it was relevant to, in this case the area near the player. This system may seem similar to people who have played or seen the game Tibia, if that helps in any way.
Best response
All I would do is call a proc in the usual chat verb, passing the message to all relevant objects. Passing values, by the way, just means including them in the arguments of a proc call.