Uhm, I haven't integrated this script into my game, so I'm not sure how it's done. I'm actually not a great programmer, so I wouldn't want to tell you any false information. The best you can do is ask in the Pokemon Essentials forum. The guys here are really helpful, and you'll have your answer within the day.