@name Example4U
@persist [O E]:entity Chat:array
@trigger all 

if(first() | duped()){ # ween first spawned do this (only once)
runOnChat(1) # run on chat
#runOnTick(1) # Run every serevr tick its not needed now.

O = owner() # O is the owner of the e2
E = entity() # E is the e2 chip  
}

if(chatClk(O)){ #ween the owner says something , run this code below!
# Chat is a array.
Chat = O:lastSaid():explode(" ") # get what the owner of the e2 said and split the spaces!

if(Chat[1,string] == "-hello"){ # if the first line of the chat is -hello
print("Hello " + Chat[2,string] + " !") # print the second line! like -hello cake prints Hello Cake!
}

}
