Graal Pastebin

New Paste
Pasted on May 15, 2012.
View the raw file

//#CLIENTSIDE
 
function onCreated() {
  SetPref();
  DrawMap();
  onTimeout();
}
 
function SetPref() {
  this.mapimage = "delt_deltlite-mapimg.png";
  this.scale = 8;
  this.mapdim = {11, 7};
  this.marker = "plisticononline.png";
}
 
function DrawMap() {
  MapImage.destroy();
  MapContainer.destroy();
 
  new GuiControl("MapContainer") {
    useownprofile = true;
    width = 2112 / thiso.scale;
    height = 1344 / thiso.scale;
    x = 15; y = screenheight - height - 35;
    profile.border = 1;
 
    new GuiBitmapCtrl("MapHead") {
      bitmap = thiso.marker;
      extent = {16, 16};
    }
  }
  new GuiBitmapCtrl("MapImage") {
    extent = {2112 / thiso.scale, 1344 / thiso.scale};
    x = 15; y = screenheight - extent[1] - 35;
    bitmap = thiso.mapimage;
  }
  MapContainer.bringtofront();
}
 
function PlaceOnMap() {
  MapHead.x = (player.x * (this.scale / 2)) / this.mapdim[0];
  MapHead.y = (player.y * (this.scale / 3)) / this.mapdim[1];
  MapHead.hint = "<b>X:</b>" SPC player.x NL "<b>Y:</b>" SPC player.y;
}
 
function onTimeout() {
  PlaceOnMap();
  setTimer(0.05);
}
 
function onPlayerEnters() {
  if (player.gmap == NULL) {
    MapContainer.visible = MapImage.visible = false;
  } else {
    MapContainer.visible = MapImage.visible = true;
  }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57