Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* tile.js by 059
- MAPINFO
- int width
- int height
- string name
- string obf0
- int obf1
- int fp
- int background
- boolean allowPlayerTeleport
- boolean showDisplays
- string[] clientXML
- string[] extraXML
- UPDATE
- Tile[] tiles
- Entity[] newObjs
- int[] drops
- string obf2
- Tile
- short x
- short y
- int type
- */
- var ID_UPDATE = $.findPacketId("UPDATE");
- var ID_MAPINFO = $.findPacketId("MAPINFO");
- var mapName = "";
- function onServerPacket(event) { //when rr receives a packet from the server
- var packet = event.getPacket(); //get the packet so we can edit it and shit
- if (packet.id() == ID_UPDATE) { //check if it is an update packet
- for (var j = 0; j < packet.tiles.length; j++) { //go through every tile in the update packet
- if (packet.tiles[j].type == 254) { //if it is tile 254 (unwalkable "void" tile)
- packet.tiles[j].type = 88; //change it to 88 (walkable tile)
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement