A Line of script from Ruby to Java

So I used a line of script in ace quite a bit to setup several scenario's and I would like to do the same thing in MV


here's what i would do


Conditional branch, script: $game_map.events[1].x == $game_map.events[@event_id].x


then another branch: $game_map.events[1].y == $game_map.events[@event_id].y


I would use it to push a boulder on a pressure plate and things like that. When the boulder was on the plate it would turn on a switch.


Sorry if this is in the wrong section...Please help. 
Java <> Javascript


Conditional Branch: Script: $gameMap.event(1).x == $gameMap.event(this._eventId).x


OR, instead of using $gameMap.event(id) you can just use character(id) where 0 is "this event"


Conditional Branch: Script: character(1).x == character(0).x


However, for a pressure plate situation, where the 'target' is not changing, you can just use a region code - draw with the region on the pressure plate, and in the boulder event, after each push, check if the boulder's region Id is the same as the one on the pressure plate.  So after your move route on the boulder, 


Conditional Branch: Script: character(0).regionId() == x


where x is the region number you used.
Thanks, i know its simple but programming was never my thing. Also thanks for giving me options. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/a-line-of-script-from-ruby-to-java.69802/