Nurutomo2

OurWorldOfPixels Teleport Script

Feb 7th, 2018
980
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. WorldOfPixels.camera.teleport = function(x, y) {
  2.     var m = new ArrayBuffer(9);
  3.     var dv = new DataView(m);
  4.     dv.setUint8(0, 3);
  5.     dv.setInt32(1, x, true);
  6.     dv.setInt32(5, y, true);
  7.     var messageEvent = new MessageEvent("message", {
  8.             "data": m,
  9.         "origin": "ws://ourworldofpixels.com:443"
  10.     });
  11.     return WorldOfPixels.net.connection.dispatchEvent(messageEvent);
  12. }
  13.  
  14. function tp(x,y) {
  15.     WorldOfPixels.camera.teleport(x,y)
  16.     OWOP.chat.send('Teleporting to X: ' + x + ' Y: ' + y)
  17. }
Advertisement
Add Comment
Please, Sign In to add comment