Relic Castle

Hiya, I've got a little script that injects some behaviour into the PokeBattle_Trainer class.

All good, but I wanted to add some behaviour to the messaging system. I dug into the Kernel.pbMessageDisplay method and found all the regex that does the command replacement. I added my additional behaviour and it's all cool. But I don't like that I had to edit the Essentials code. (I can't share it easily!)

Is there a mechanism I'm missing to add my own commands to the messaging system so my script can be kept siloed?

I suppose I could alias pbMessageDisplay, do the substitution and pass it back along to the original. But I think that would only work for my script and I couldn't do the same thing for any additional scripts. If I'm wrong about this please tell me, I only started using Ruby yesterday.

Thanks for any help.
Top