Graal Pastebin

New Paste
Pasted on January 20, 2012.
View the raw file

//#CLIENTSIDE
function onCreated() {
  this.speed = 2;
}
 
function onPlayerChats() {
  if (player.chat.starts("/window")) {
    new GuiWindowCtrl("Staff_Window") {
      profile = GuiBlueWindowProfile;
      extent = {
        300, 300
      };
      position = {
        200, 100
      };
      destroyonhide = true;
      clientrelative = true;
      text = "Staff tools window";
      player.chat = "Staff options open!";
 
 new GuiButtonCtrl("Boots_Button") {
        profile = GuiBlueButtonProfile;
        extent = {
          100, 30
        };
        text = "Staff Boots";
        position = {
          5, 40
        };
      }
    }
  }
}
 
function Boots_Button.onAction() {
  this.boots = !this.boots;
  player.chat = "Boots" SPC(this.boots ? "on!" : "off!"); 
  if (this.boots) {
    setTimer(0.05);
  }
}
 
function onTimeout() {
  if (this.boots) {
    for (temp.key = 0; temp.key < 4; temp.key++) {
      if (keydown(temp.key)) {
        player.x += vecx(temp.key) * this.speed;
        player.y += vecy(temp.key) * this.speed;
      }
    }
    setTimer(0.05);
  }
}
  • 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