I just use http://jsfiddle.net/ kinda same thing ;p
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.
@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
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.
@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
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.
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.
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.
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.
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.
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.
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.
Could you add Karambwan (Cooked) Anglerfish (Cooked) Chicken (Cooked), Rainbow Fish (Cooked), and Dark Crab (Cooked)
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
Can you add a bunch of farming vars, I'd be fine with just Snapdragons and Watermelon (Harvested)
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)