Thread: Death Clock
View Single Post
  #1  
Old 06-10-2007, 05:11 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Death Clock

Just load it into a weapon named whatever you want and add it to the your player. Sorry I have to double post this script since it is too many characters

PHP Code:
// Created by Mr. Omega
// Help from DustyPorViva : Thanks :D

// Found a website with something like this, so I tried to
// replicate it. Forum PM me for the site since I'm not
// allowed to post it. Anyways, this is what I made out a
// boredom and many hours of coffee o_O.

//#CLIENTSIDE
function onCreated() DeathClock();
DeathWindow();

function 
DeathClock() {
  new 
GuiButtonCtrl"Death_Button") {
    
profile  "GuiBlueButtonProfile";
    
position = { 0screenheight-16};
    
extent   = { 6416};
    
text     "Death Clock";
  };
}

function 
Death_Button.onAction()
Death_Window.visible = !Death_Window.visible;


function 
DeathWindow() {
  new 
GuiWindowCtrl("Death_Window") {
    
profile           "GuiBlueTransWindowProfile";
    
profile.fontColor = { 255255255};
    
extent            = { 40096};
    
position          = { screenwidth/3screenheight/3};
    
text              "Death Clock";
    
fontSize          14;
    
useownprofile     true;
    
canClose          true;
    
canMove           true;
    
canResize         false;
    
canMinimize       true;
    
canMaximize       false;
    
visble            false;

    new 
GuiTextCtrl("Day_of_Birth") {
      
profile  "GuiBlueTextProfile";
      
position = { 925};
      
text     "Day of Birth:";
    };

    new 
GuiTextEditCtrl("Day_of_Birth_Text") {
      
profile  "GuiBlueTextEditProfile";
      
position = { 7825};
      
extent   = { 3220};
      
text     1;
    };

    new 
GuiTextCtrl("Month_of_Birth") {
      
profile  "GuiBlueTextProfile";
      
position = { 947};
      
text     "Month of Birth:";
    };

    new 
GuiPopUpMenuCtrl("Month_of_Birth_Choice") {
      
profile       "GuiBluePopUpMenuProfile";
      
scrollprofile "GuiBlueScrollProfile";
      
position      = { 7847};
      
extent        = { 7020};
      
canMove       false;
      
canResize     false;
      
canMaximize   false;
      
canClose      true;
      
useownprofile true;
      
canMinimize   false;
      
tile          true;
      
visible       true;

      
clearrows();
      
addRow1"January");
      
addRow2"February");
      
addRow3"March");
      
addRow4"April");
      
addRow5"May");
      
addRow6"June");
      
addRow7"July");
      
addRow8"August");
      
addRow9"September");
      
addRow10"October");
      
addRow11"November");
      
addRow12"December");
      
setSelectedRow(0);
    };

    new 
GuiTextCtrl("Year_of_Birth") {
      
profile  "GuiBlueTextProfile";
      
position = { 969};
      
profile.fontsize  14;
      
text     "Birth Year:";
    };

    new 
GuiTextEditCtrl("Year_of_Birth_Text") {
      
profile  "GuiBlueTextEditProfile";
      
position = { 7869};
      
extent   = { 3220};
      
text     1970;
    };

    new 
GuiTextCtrl("Gender") {
      
profile  "GuiBlueTextProfile";
      
position = { 15025};
      
text     "Sex :";
    };

    new 
GuiPopUpMenuCtrl("Gender_Choice") {
      
profile       "GuiBluePopUpMenuProfile";
      
scrollprofile "GuiBlueScrollProfile";
      
position      = { 18025};
      
extent        = { 7020};
      
canMove       false;
      
canResize     false;
      
canMaximize   false;
      
canClose      true;
      
useownprofile true;
      
canMinimize   false;
      
tile          true;
      
visible       true;

      
clearrows();
      
addRow0"Male");
      
addRow1"Female");
      
addRow2"Unknown");
      
setSelectedRow(0);

    };

    new 
GuiTextCtrl("BMI") {
      
profile  "GuiBlueTextProfile";
      
position = { 15047};
      
text     "BMI*:";
    };

    new 
GuiPopUpMenuCtrl("BMI_Choice") {
      
profile       "GuiBluePopUpMenuProfile";
      
scrollprofile "GuiBlueScrollProfile";
      
position      = { 18047};
      
extent        = { 7020};
      
canMove       false;
      
canResize     false;
      
canMaximize   false;
      
canClose      true;
      
useownprofile true;
      
canMinimize   false;
      
tile          true;
      
visible       true;

      
clearrows();
      
addRow0"<25");
      
addRow1"25-29");
      
addRow2"30-34");
      
addRow3"35-39");
      
addRow4"40-44");
      
addRow3">=45");
      
setSelectedRow(0);
    };

    new 
GuiTextCtrl("Smoking") {
      
profile  "GuiBlueTextProfile";
      
position = { 15069};
      
text     "Smoking Status:";
    };

    new 
GuiPopUpMenuCtrl("Smoking_Choice") {
      
profile       "GuiBluePopUpMenuProfile";
      
scrollprofile "GuiBlueScrollProfile";
      
position      = { 22769};
      
extent        = { 7020};
      
canMove       false;
      
canResize     false;
      
canMaximize   false;
      
canClose      true;
      
useownprofile true;
      
canMinimize   false;
      
tile          true;
      
visible       true;

      
clearrows();
      
addRow0"Non-Smoker");
      
addRow1"Smoker");
      
setSelectedRow(0);
    };

    new 
GuiButtonCtrl("BMI_Button") {
      
profile  "GuiBlueButtonProfile";
      
position = { 25025};
      
extent   = { 6420};
      
text     "Get BMI";
    };

    new 
GuiButtonCtrl("About_Button") {
      
profile  "GuiBlueButtonProfile";
      
position = { 31825};
      
extent   = { 7520};
      
text     "About";
    };

    new 
GuiButtonCtrl("Death_Date_Button") {
      
profile  "GuiBlueButtonProfile";
      
position = { 30069};
      
extent   = { 9320};
      
text     "Get Death Date!";
    };

    new 
GuiTextCtrl("CreatedBy") {
      
profile           "GuiTextProfile";
      
profile.fontsize  16;
      
position          = { 25345};
      
extent            = { 25632};
      
profile.fontColor = { 000};
      
text              "Created By: Mr. Omega";
      
useownprofile true;
    };

    new 
GuiTextCtrl("DD") {
      
profile  "GuiBlueTextProfile";
      
position = { 11525};
      
text     "DD";
    };

    new 
GuiTextCtrl("YY") {
      
profile  "GuiBlueTextProfile";
      
position = { 11269};
      
text     "YYYY";
    };
  };
}

function 
Death_Date_Button.onAction() {
  if (
Month_of_Birth_Choice.text != "Pick One!" &&
      
Gender_Choice.text != "Pick One!" &&
      
BMI_Choice.text != "Pick One!" &&
      
Smoking_Choice.text != "Pick One!" &&
      
Day_of_Birth_Text.text in |131| &&
      
Year_of_Birth_Text.text in |19002100|)
    
ResultsWindow();

  else
    
DataError();
}

function 
DataError() {
  new 
GuiWindowCtrl("Data_Error_Window") {
    
profile           "GuiBlueTransWindowProfile";
    
profile.fontColor = { 255255255};
    
extent            = { 20032};
    
position          = { screenwidth/2.25screenheight/3+80};
    
text              "!!! ERROR !!!";
    
fontSize          14;
    
useownprofile     true;
    
canClose          true;
    
canMove           false;
    
canResize         false;
    
canMinimize       false;
    
canMaximize       false;
    
destroyOnHide     true;
    
visble            false;

    new 
GuiTextCtrl("Data_Error_Text") {
      
profile  "GuiBlueTextProfile";
      
position = { 1225};
      
text     "Sorry, Not Enough Data or Bad Data!!";
    };
  };
}

function 
ResultsWindow() {
  if (
Month_of_Birth_Choice.text == "January")
    
thiso.month "April";
  if (
Month_of_Birth_Choice.text == "February")
    
thiso.month "August";
  if (
Month_of_Birth_Choice.text == "March")
    
thiso.month "January";
  if (
Month_of_Birth_Choice.text == "April")
    
thiso.month "December";
  if (
Month_of_Birth_Choice.text == "May")
    
thiso.month "July";
  if (
Month_of_Birth_Choice.text == "June")
    
thiso.month "September";
  if (
Month_of_Birth_Choice.text == "July")
    
thiso.month "June";
  if (
Month_of_Birth_Choice.text == "August")
    
thiso.month "November";
  if (
Month_of_Birth_Choice.text == "September")
    
thiso.month "February";
  if (
Month_of_Birth_Choice.text == "October")
    
thiso.month "May";
  if (
Month_of_Birth_Choice.text == "November")
    
thiso.month "March";
  if (
Month_of_Birth_Choice.text == "December")
    
thiso.month "October";

  if (
Gender_Choice.text == "Male")
    
this.sex 74;
  if (
Gender_Choice.text == "Female")
    
this.sex 79;
  if (
Gender_Choice.text == "Unknown")
    
this.sex 75;

  if (
BMI_Choice.text == "<25")
    
this.BMI 2;
  if (
BMI_Choice.text == "25-29")
    
this.BMI 3;
  if (
BMI_Choice.text == "30-34")
    
this.BMI 4;
  if (
BMI_Choice.text == "35-39")
    
this.BMI 5;
  if (
BMI_Choice.text == "40-44")
    
this.BMI 7;
  if (
BMI_Choice.text == ">=45")
    
this.BMI 9;

  if (
Smoking_Choice.text == "Non-Smoker")
    
this.smoke 1;
  if (
Smoking_Choice.text == "Smoker")
    
this.smoke 3;

  if (
Day_of_Birth_Text.text in |14|)
    
thiso.day = {"Sunday"28};
  if (
Day_of_Birth_Text.text in |59|)
    
thiso.day = {"Monday"2};
  if (
Day_of_Birth_Text.text in |1014|)
    
thiso.day = {"Tuesday"26};
  if (
Day_of_Birth_Text.text in |1519|)
    
thiso.day = {"Wednesday"5};
  if (
Day_of_Birth_Text.text in |2024|)
    
thiso.day = {"Thursday"9};
  if (
Day_of_Birth_Text.text in |2529|)
    
thiso.day = {"Friday"11};
  if (
Day_of_Birth_Text.text in |3031|)
    
thiso.day = {"Saturday"21};

  
this.year Year_of_Birth_Text.getText();
  
thiso.d1 = (this.year this.sex) - (this.BMI*this.smoke); 
__________________
Deep into the Darkness peering...
Reply With Quote