Page 4 of 4 FirstFirst ... 234
Results 76 to 95 of 95

Thread: grats' stats dev and variable requests

  1. #76
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by goodgamescript View Post
    Thanks hopefully i didn't miss styling anything =D

    And if you need to test any css/javascript code check out http://codepen.io/pen/
    I just use http://jsfiddle.net/ kinda same thing ;p
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  2. #77
    Join Date
    Apr 2015
    Location
    FireFox
    Posts
    528
    Mentioned
    10 Post(s)
    Quoted
    227 Post(s)

    Default

    @grats; Cheers for adding in Logs(fletched), already stacking up the numbers.
    @goodgamescript; That new css layout is really smooth, very pleasurable to the eyes.
    Scripting with ogLib

  3. #78
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by srlMW View Post
    @grats; Cheers for adding in Logs(fletched), already stacking up the numbers.
    @goodgamescript; That new css layout is really smooth, very pleasurable to the eyes.
    yep! nice

    added this page as well
    http://stats.grats.pw/styles.php

    anyone can do w/e kinda styles they want
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  4. #79
    Join Date
    Apr 2015
    Location
    FireFox
    Posts
    528
    Mentioned
    10 Post(s)
    Quoted
    227 Post(s)

    Default

    @grats; May you please add Bones(buried), I have a little side project I've done and just want to set it up with tracking. Cheers
    Scripting with ogLib

  5. #80
    Join Date
    Mar 2014
    Posts
    195
    Mentioned
    4 Post(s)
    Quoted
    92 Post(s)

    Default

    Same as before but just added the word stats at the top left.
    http://stats.grats.pw?csscookie=%40f...r%3Apointer%7D

    a8833e90c5.jpg
    Last edited by goodgamescript; 06-23-2015 at 03:55 AM.

  6. #81
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by srlMW View Post
    @grats; May you please add Bones(buried), I have a little side project I've done and just want to set it up with tracking. Cheers
    yep adding in a few mins

    Quote Originally Posted by goodgamescript View Post
    Same as before but just added the word stats at the top left.
    http://stats.grats.pw?csscookie=%40f...r%3Apointer%7D

    a8833e90c5.jpg
    nice can I get the css I'll add it to the styles page
    so far I got your theme and JJs
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  7. #82
    Join Date
    Mar 2014
    Posts
    195
    Mentioned
    4 Post(s)
    Quoted
    92 Post(s)

    Default

    Quote Originally Posted by grats View Post
    yep adding in a few mins



    nice can I get the css I'll add it to the styles page
    so far I got your theme and JJs
    lol purely css
    css

    @font-face {
    font-family: 'break';
    src: url('http://matts-web-dev.github.io/fonts/B/BreakItDown.otf');
    src: url('http://matts-web-dev.github.io/fonts/B/BreakItDown.woff') format('woff'), url('http://matts-web-dev.github.io/fonts/B/BreakItDown.otf') format('opentype'), url('http://matts-web-dev.github.io/fonts/B/BreakItDown.svg') format('svg');
    }

    body {
    background: #222 url("http://i.imgur.com/F4sGMFp.png") repeat-x scroll 50% 0px;
    color: #999;
    }

    #navbar,
    #foot {
    background-color: black;
    background-image: url(http://i.imgur.com/i37yHtY.png);
    }

    a:link,
    a:visited {
    color: #3D9FD0;
    }

    .alldata th,
    .alldata td,
    .alldata tr {
    border: 1px solid #777;
    padding: 0.2em 0.2em 0.2em 0.5em;
    text-align: center;
    }

    .c3 svg {
    fill: #999;
    }

    .c3-tooltip td {
    font-size: 13px;
    padding: 3px 6px;
    border-left: 1px dotted #999;
    background: #222 url("http://i.imgur.com/F4sGMFp.png") repeat-x scroll 50% 0px;
    color: #999;
    }

    #tooltip tr {
    border: 1px solid #999;
    display: table-row;
    background: #222 url("http://i.imgur.com/F4sGMFp.png") repeat-x scroll 50% 0px;
    color: #999;
    }

    #tooltip th {
    background: #222 url("http://i.imgur.com/F4sGMFp.png") repeat-x scroll 50% 0px;
    font-size: 14px;
    color: #FFF;
    }

    #graph_info {
    text-align: center;
    }

    #visualisation {
    font-family: "Ubuntu";
    font-size: 13px;
    -moz-user-select: none;
    fill: #999;
    }

    .c3-tooltip th {
    display: none;
    }

    #stoggle,
    .scripts_toggle a:link {
    text-decoration: underline;
    color: #d03d9f;
    font-size: 1.2em;
    }

    .scripts_manage input {
    border: medium none;
    font-size: 1.1em;
    margin-bottom: 0.2em;
    background: #444;
    color: #999;
    }

    #navbar::before {
    position: absolute;
    top: 0;
    left: 15px;
    font-family: 'break';
    content: 'STATS';
    text-align: left;
    font-size: 24px;
    padding-top: 15px;
    color: #999;
    fill: #999;
    -webkit-transition: all .4s ease;
    transition: all .4s ease;
    }

    #navbar:hover::before {
    color: #3D9FD0;
    fill: #3D9FD0;
    cursor: pointer;
    }


    if anyone wants me to make a theme like the metro theme on this website just let me know
    Last edited by goodgamescript; 06-23-2015 at 09:24 PM.

  8. #83
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by goodgamescript View Post
    lol purely css
    css

    @font-face {
    font-family: 'break';
    src: url('http://matts-web-dev.github.io/fonts/B/BreakItDown.otf');
    src: url('http://matts-web-dev.github.io/fonts/B/BreakItDown.woff') format('woff'), url('http://matts-web-dev.github.io/fonts/B/BreakItDown.otf') format('opentype'), url('http://matts-web-dev.github.io/fonts/B/BreakItDown.svg') format('svg');
    }

    body {
    background: #222 url("http://i.imgur.com/F4sGMFp.png") repeat-x scroll 50% 0px;
    color: #999;
    }

    #navbar,
    #foot {
    background-color: black;
    background-image: url(http://i.imgur.com/i37yHtY.png);
    }

    a:link,
    a:visited {
    color: #3D9FD0;
    }

    .alldata th,
    .alldata td,
    .alldata tr {
    border: 1px solid #777;
    padding: 0.2em 0.2em 0.2em 0.5em;
    text-align: center;
    }

    .c3 svg {
    fill: #999;
    }

    .c3-tooltip td {
    font-size: 13px;
    padding: 3px 6px;
    border-left: 1px dotted #999;
    background: #222 url("http://i.imgur.com/F4sGMFp.png") repeat-x scroll 50% 0px;
    color: #999;
    }

    #tooltip tr {
    border: 1px solid #999;
    display: table-row;
    background: #222 url("http://i.imgur.com/F4sGMFp.png") repeat-x scroll 50% 0px;
    color: #999;
    }

    #tooltip th {
    background: #222 url("http://i.imgur.com/F4sGMFp.png") repeat-x scroll 50% 0px;
    font-size: 14px;
    color: #FFF;
    }

    #graph_info {
    text-align: center;
    }

    #visualisation {
    font-family: "Ubuntu";
    font-size: 13px;
    -moz-user-select: none;
    fill: #999;
    }

    .c3-tooltip th {
    display: none;
    }

    #stoggle,
    .scripts_toggle a:link {
    text-decoration: underline;
    color: #d03d9f;
    font-size: 1.2em;
    }

    .scripts_manage input {
    border: medium none;
    font-size: 1.1em;
    margin-bottom: 0.2em;
    background: #444;
    color: #999;
    }

    #navbar::before {
    position: absolute;
    top: 0;
    left: 15px;
    font-family: 'break';
    content: 'STATS';
    text-align: left;
    font-size: 24px;
    padding-top: 15px;
    color: #999;
    fill: #999;
    -webkit-transition: all .4s ease;
    transition: all .4s ease;
    }

    #navbar:hover::before {
    color: #3D9FD0;
    fill: #3D9FD0;
    cursor: pointer;
    }


    if anyone wants me to make a theme like the metro theme on this website just let me know
    according to google all you need is woff2, woff, ttf cuz everything else is ignored.. safari & some crapple products use ttf
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  9. #84
    Join Date
    Mar 2014
    Posts
    195
    Mentioned
    4 Post(s)
    Quoted
    92 Post(s)

    Default

    oh oh its been a min since i messed with fonts lol , took the original code from a couple year old project =s

    and how do you put an image in your signature? it seems to be disabled for me =/
    Last edited by goodgamescript; 06-24-2015 at 05:00 AM.

  10. #85
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by goodgamescript View Post
    oh oh its been a min since i messed with fonts lol , took the original code from a couple year old project =s

    and how do you put an image in your signature? it seems to be disabled for me =/
    yea I saw JR members as well having the problem, I guess it's members only now or something, but it's exactly how you'd expect..

    and the fonts thing https://www.google.com/fonts/ they got infos around here but if you user-agent request on everything all you'll ever get is ttfs and woffs lol
    when your style is done I'm gonna grab all the stuff and throw it on my server instead of imgur/github is why I mentioned it. But as it is is fine, I can use that stuff to convert etc
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  11. #86
    Join Date
    Mar 2014
    Posts
    195
    Mentioned
    4 Post(s)
    Quoted
    92 Post(s)

    Default

    Quote Originally Posted by grats View Post
    yea I saw JR members as well having the problem, I guess it's members only now or something, but it's exactly how you'd expect..

    and the fonts thing https://www.google.com/fonts/ they got infos around here but if you user-agent request on everything all you'll ever get is ttfs and woffs lol
    when your style is done I'm gonna grab all the stuff and throw it on my server instead of imgur/github is why I mentioned it. But as it is is fine, I can use that stuff to convert etc
    aww lol i was messing around with the dynamic sigs.
    Last edited by goodgamescript; 06-24-2015 at 06:14 AM.

  12. #87
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by goodgamescript View Post
    aww lol i was messing around with the dynamic sigs.
    Do you actually use my dynamic sig "easy to parse" text? nobody ever has so it's kinda slow, gotta cache all that lol..

    and I assume you just add all of yours together
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  13. #88
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    Quote Originally Posted by goodgamescript View Post
    aww lol i was messing around with the dynamic sigs.
    Ah, my eyes!

  14. #89
    Join Date
    Mar 2014
    Posts
    195
    Mentioned
    4 Post(s)
    Quoted
    92 Post(s)

    Default

    Quote Originally Posted by P1nky View Post
    Ah, my eyes!
    i don't generally mess with graphics lol i dont have an eye for it

    Quote Originally Posted by grats View Post
    Do you actually use my dynamic sig "easy to parse" text? nobody ever has so it's kinda slow, gotta cache all that lol..

    and I assume you just add all of yours together
    And yep i just added all the items made together, i got the commit time from my user page, And i just used your existing code on the second post and modified it with a different font and shadow. My knowledge of php is very limited

  15. #90
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by goodgamescript View Post
    i don't generally mess with graphics lol i dont have an eye for it



    And yep i just added all the items made together, i got the commit time from my user page, And i just used your existing code on the second post and modified it with a different font and shadow. My knowledge of php is very limited
    ah I see
    I mean you can grab your scripts stuff here:
    http://stats.grats.pw/cg.php

    for example:
    http://stats.grats.pw/misc/sig.php?s=32

    Herblore Master_._204_._Potions_._3654_._Herbs_._3052
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  16. #91
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    Quote Originally Posted by goodgamescript View Post
    i don't generally mess with graphics lol i dont have an eye for it



    And yep i just added all the items made together, i got the commit time from my user page, And i just used your existing code on the second post and modified it with a different font and shadow. My knowledge of php is very limited
    Lol, I am just kidding. But def you should consider changing the font or the pattern background to make it easier to read and friendly to look at

  17. #92
    Join Date
    Jan 2014
    Posts
    51
    Mentioned
    5 Post(s)
    Quoted
    24 Post(s)

    Default

    Could you add Karambwan (Cooked) Anglerfish (Cooked) Chicken (Cooked), Rainbow Fish (Cooked), and Dark Crab (Cooked)

  18. #93
    Join Date
    Jan 2014
    Posts
    51
    Mentioned
    5 Post(s)
    Quoted
    24 Post(s)

    Default

    I also rewrote the Stats Include to be object oriented

    Simba Code:
    { Credit to Flight
    To use first register at http://stats.grats.pw/reg.php
    Then create a folder in the Simba main directory called Stats.
    In the Stats folder create a file called Info.txt.
    Take the stats_id and password and put them in the file with this formatting:
    [General]
    Stats_ID=(Insert Stats_ID here)
    Stats_Pass=(Insert Stats_Pass here)
    }


    Const
      StatsPath = AppPath + 'Stats\';
      StatsFile = 'Info.txt';
      StatsAbsolutePath = StatsPath + StatsFile;

    type TStat = record
      Name: string;
      Value: Integer;
    end;

    type TStatsUser = record
      ID: string;
      Password: string;
      ScriptID: string;
      Timer: Integer;
    end;

    type TStats = record
      User: TStatsUser;
      Stats: Array of TStat;
    end;

    procedure TStats.Setup(ScriptID : string);
    var
      ID, Password, StatsFilepath: String;
    begin
      if (not DirectoryExists(StatsPath)) then
      begin
        ForceDirectories(StatsPath);
        WriteINI('General', 'Stats_ID', '', StatsAbsolutePath);
        writeINI('General', 'Stats_Pass', '', StatsAbsolutePath);
      end;

      ID := ReadINI('General', 'Stats_ID', StatsAbsolutePath);
      Password := ReadINI('General', 'Stats_Pass', StatsAbsolutePath);

      if ID = '' then
      begin
        case MessageBox('No Stats ID found, would you like to register?', 'Stats', 1) of
          1: OpenWebPage('http://stats.grats.pw/reg.php');
        end;
      end;

      Self.User := [ID, Password, ScriptID, GetSystemTime()];
    end;

    procedure TStats.InitializeVariable(Name: string; Value: Integer);
    var
      Size: Integer;
    begin
      Size := Length(Self.Stats);
      SetArrayLength(Self.Stats, Size + 1);
      Self.Stats[Size].Name := LowerCase(Name);
      Self.Stats[Size].Value := Value;
    end;

    procedure TStats.SetVariable(Name: string; Value: Integer);
    var
      Stat: Integer;
    begin
      Name := LowerCase(Name);
        for Stat := 0 to High(Self.Stats) do
        begin
          if (Name = Self.Stats[Stat].Name) then
          begin
            Self.Stats[Stat].Value := Value;
            Exit;
          end;
        end;
      InitializeVariable(Name, Value);
    end;

    procedure TStats.IncreaseVariable(Name: string; Value: Integer);
    var
      Stat: Integer;
    begin
      Name := LowerCase(Name);
      for Stat := 0 to High(Self.Stats) do
      begin
        if (Name = Self.Stats[Stat].Name) then
          begin
            Self.Stats[Stat].Value := Self.Stats[Stat].Value + Value;
            Exit;
          end;
      end;
      InitializeVariable(Name, Value);
    end;

    function TStats.Commit: Boolean;
    var
      Response: string;
      Client, Stat, WorkedTime, ExtraTime: Integer;
    begin
      ExtraTime := GetSystemTime() - User.Timer;
      WorkedTime := ExtraTime div 60000;

      if WorkedTime < 5 then Exit;
      ExtraTime := ExtraTime - (WorkedTime * 60000);

      Self.User.Timer := GetSystemTime - ExtraTime;

      Client := InitializeHTTPClient(False);
      ClearPostData(Client);

      if (Self.User.ID = '') then
      begin
        Self.User.ID := '5';
        Self.User.Password := 'anon1337';
      end;

      AddPostVariable(Client, 'user_id', Self.User.ID);
      AddPostVariable(Client, 'password', Self.User.Password);
      AddPostVariable(Client, 'script_id', Self.User.ScriptID);
      AddPostVariable(Client, 'timeamount', toStr(WorkedTime));

       for Stat := 0 to High(Self.Stats) do
        begin
          if (Self.Stats[Stat].Value > 0) then
            AddPostVariable(Client, Self.Stats[Stat].Name, toStr(Min(Self.Stats[Stat].Value, 30000))); //Capped at 30000
        end;

      Response := PostHTTPPageEx(Client, 'http://stats.grats.pw/POST.php');
      FreeHTTPClient(Client);

      case StrToIntDef(ExtractFromStr(Response, Numbers), -1) of
        42: Result := True;
        9001: WriteLn('Stats: Invalid user ID/Password.');
        1337: WriteLn('Stats: Invalid Script ID.');
        255, 496: WriteLn('Stats: Committing too fast; shame on you!');
        else
          WriteLn('Stats: No Return Code');
      end;

      if Result then
      begin
          for Stat := 0 to High(Self.Stats) do
          begin
              if (Self.Stats[Stat].Value > 0) then
                Self.Stats[Stat].Value := 0; //Clear for next commit
          end;
      end;
    end;

    Example Usage
    Simba Code:
    var
      MyStats: TStats;

    begin
      MyStats.Setup('scriptID');
      MyStats.InitializeVariable('var', 'value');
      MyStats.SetVariable('var', 'value');
      MyStats.IncreaseVariable('var', 'value');
      MyStats.Commit;
    end

  19. #94
    Join Date
    Jan 2014
    Posts
    51
    Mentioned
    5 Post(s)
    Quoted
    24 Post(s)

    Default

    Can you add a bunch of farming vars, I'd be fine with just Snapdragons and Watermelon (Harvested)

  20. #95
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by Mj View Post
    Could you add Karambwan (Cooked) Anglerfish (Cooked) Chicken (Cooked), Rainbow Fish (Cooked), and Dark Crab (Cooked)
    Quote Originally Posted by Mj View Post
    Can you add a bunch of farming vars, I'd be fine with just Snapdragons and Watermelon (Harvested)
    I'm only a year late, maybe I should wait 3 weeks so it's to the day.. but if you need those added still I can add them haha.
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

Page 4 of 4 FirstFirst ... 234

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •