Anonymous - 2001-09-25

I want to create a /roll command. When a user uses the /roll 1d6 they would roll one random number with six sides. For example...

/roll 1d6
Chat..."You rolled 1d6. Result is equal to X"

I have created a PHP script to create a random number, but I don't know how to integrate it into the chat.

Does anyone have any tips?

Thanks,
Cesar Lozano