I suggest learning something like C++, but RPG Maker XP (from what I remember) had Ruby scripting which made it pretty flexible.