Graal Pastebin

New Paste
Pasted on August 26, 2011.
View the raw file

function onActionServerside() {
  if (params[0] == "addflags") serverr.(@params[1]) = params[2];
}
 
//#CLIENTSIDE
function onCreated() {
  creategui();
  getflags();
}
//--------------------Creation GUI-----------------------
 
function addrowsys_Button1.onAction() {
  new GuiWindowCtrl("Extent_Window1") {
    profile = GuiBlueWindowProfile;
    clientrelative = true;
    clientextent = "176,118";
    canmaximize = false;
    canminimize = false;
    canmove = true;
    canresize = true;
    closequery = false;
    destroyonhide = true;
    text = "Add a flag";
    x = 517;
    y = 209;
    new GuiTextEditCtrl("Extent_TextEdit1") {
      profile = GuiBlueTextEditProfile;
      height = 20;
      width = 80;
      x = 7;
      y = 19;
    }
    new GuiTextEditCtrl("Extent_TextEdit2") {
      profile = GuiBlueTextEditProfile;
      height = 20;
      width = 80;
      x = 7;
      y = 59;
    }
    new GuiTextCtrl("Extent_Text1") {
      profile = GuiBlueTextProfile;
      height = 20;
      text = "Flag Content";
      width = 73;
      x = 92;
      y = 58;
    }
    new GuiTextCtrl("Extent_Text2") {
      profile = GuiBlueTextProfile;
      height = 20;
      text = "Title / Name";
      width = 69;
      x = 93;
      y = 18;
    }
    new GuiButtonCtrl("Extent_Button1") {
      profile = GuiBlueButtonProfile;
      height = 22;
      text = "Add Flag";
      width = 164;
      x = 6;
      y = 90;
    }
  }
}
//-----------------------Main GUI------------------------
 
function CreateGui() {
  new GuiWindowCtrl("addrowsys_Window1") {
    profile = GuiBlueWindowProfile;
    clientrelative = true;
    clientextent = "367,238";
    isexternal = false;
    canmaximize = false;
    canminimize = false;
    canmove = true;
    canresize = false;
    closequery = false;
    destroyonhide = true;
    text = "Server Flag Editor";
    x = 480;
    y = 84;
    new GuiControl("Border1") {
      useownprofile = true;
      profile.border = 0;
      profile.opaque = true;
      profile.fillColor = {
        163, 194, 212, 120
      };
      width = 367;
      height = 238;
      x = 0;
      y = 0;
    }
    new GuiButtonCtrl("addrowsys_Button1") {
      profile = GuiBlueButtonProfile;
      height = 24;
      text = "+";
      width = 24;
      x = 335;
      y = 3;
      hint = "Add flag";
    }
    new GuiButtonCtrl("addrowsys_Button3") {
      profile = GuiBlueButtonProfile;
      height = 24;
      text = "?";
      width = 24;
      x = 285;
      y = 3;
      hint = "help";
    }
    new GuiButtonCtrl("addrowsys_Button4") {
      profile = GuiBlueButtonProfile;
      height = 24;
      text = "^";
      width = 24;
      x = 310;
      y = 3;
      hint = "Update";
    }
    new GuiScrollCtrl("addrowsys_TextList1_Scroll") {
      profile = GuiBlueScrollProfile;
      hscrollbar = "alwaysOff";
      vscrollbar = "dynamic";
      width = 354;
      x = 6;
      y = 32;
      new GuiTextListCtrl("addrowsys_TextList1") {
        profile = GuiBlueTextListProfile;
        height = 34;
        horizsizing = "width";
        sortcolumn = 167550464;
        width = 350;
      }
    }
    new GuiTextCtrl("addrowsys_Text1") {
      profile = GuiBlueTextProfile;
      height = 20;
      text = "Server Flag Adder.";
      width = 305;
      x = 9;
      y = 6;
    }
  }
}
//------------------Button Actions--------------------
 
function addrowsys_Button4.onAction() {
  getflags();
}
 
function Extent_Button1.onAction() {
  addflags();
}
 
function addrowsys_Button3.onAction() {
  say2("You can add rows#bto the GUI by pressing#bthe + button.#bYou can update the flag#bscreen by pressing the ^ button.");
}
//------------------functions-----------------------
 
function GetFlags() {
  addrowsys_TextList1.clearrows();
  for (temp.flag: serverr.getdynamicvarnames()) {
    addrowsys_TextList1.addrow(temp.count, temp.flag, temp.value = serverr.(@temp.flag));
    temp.count++;
  }
}
 
function AddFlags() {
  triggerserver("gui", this.name, "addflags", Extent_TextEdit1.text, Extent_TextEdit2.text);
  getflags();
}
 
function OpenGui() {
  creategui();
  addflags();
}
//----------------------Other---------------------------
 
function onPlayerChats() {
  if (player.chat == "/flagadder") {
    OpenGui(); //Opens the GUI.
  }
}
  • 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
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185