SRL Archive - Discussions and Debates

LOL! My parents are paranoid.


R0b0t1

2007-09-07 21:08:11

Yes… Yes… I know. I'm paranoid too.


But any way, I was discussing one of my programming ideas, and eventually I mentioned I wanted to post it here to test speed…

And Then…

My dad starts saying its a very good idea and not to post it, fearing someone would steal it. Not like it would happen here, but I still don't know why he said it. I personally don't think it was that awesome even.


So, anyway, I really just wanted to know the odds that someone might steal it (Lol?… Paranoia.) or claim it as there property and high of with it.

I don't want to go attaching a BSD license to it, though. Sounds a bit high strung :rolleyes:.

You might be able to talk me into telling you what it is :p.

Tim0suprem0

2007-09-07 21:42:15

Oh just tell us…. You know you want to :p or you wouldn't have posted this. Come onnnnn..

Dan Cardin

2007-09-07 21:43:38

well u posted it so wouldnt u have creative license or whatever. as long as u have some way of proving u came up with it first i dont think it can be taken(maybe:p)

EDIT:Plus now i really want to know:)

elementalelf

2007-09-07 21:59:07

from what i see on this forum, it most likely wont get leaked.
look what happened to born2code for even joking about leaking a script :)

i think you will be alright.

Harry

2007-09-07 22:23:02

Tell meh what is does, and i will decide ;)

R0b0t1

2007-09-07 22:32:36

Well, more specifically, if you must, I created this thread for asking questions as well as answering them.

Among them, as I stated above, and a question which none of you will know, is how secure a BSD license is (Really, my "Idea" is not that important, but I find it would be usefull to know).

Please, don't get over excited (But don't completely loose hope!). I don't even know if it IS a good idea. It is just a new way of saving/storing script settings or information.

PS.: I posted here first, because this is the only community I trust, if you will.

Bobarkinator

2007-09-08 00:14:32

I don't think someone would steal your idea.

R0b0t1

2007-09-08 11:28:01

Yes, your right. I'll edit this post later. I gotta go :p.

Bourdou!

2007-09-08 14:50:36

Especially in membs. WHAT IS THE IDEA!?

Tim0suprem0

2007-09-08 15:46:59

From: r0b0t1
Yes, your right. I'll edit this post later. I gotta go :p.



Cliffhanger! It better be super awesome or else…! I dunno, but I hope it's exciting :p

R0b0t1

2007-09-08 17:03:22

ARGHness!

Fine, here it is, as I trust its "safe".

One day while looking at the SCAR manual, I saw FastGetPixel and FastSetPixel.

Later, I realized you could use these to store data in a bitmap as "colors" you would just add or change the color of a pixel on a bitmap, and then you could read it. After thinking a while, I realized I could store (limited) floating point numbers also, using HSL, and also booleans by storing values 1 and 0 (I created InToBool and BoolToInt).

THEN, I also realized you could save the bitmap, and keep script settings if you had to terminate (EX. The loads if it stopped unexpectedly), or script settings. You can also start off with a 1 * 1 bitmap, as it just makes the bitmap bigger if you add pixels…


program New;
//{.Include SRL/SRL.scar}

function IntToBool(TheInt: Integer): Boolean;
begin;
If (TheInt = 0) Then
Result:= False;
else
Result:= True;
end;

function BoolToInt(TheBool: Boolean): Integer;
begin;
If not (TheBool) Then
Result:= False;
else
Result:= True;
end;

{ function SetIntBMP ]
[ ]
[ Desc. : Returns True if it had to split the integer in half to ]
[ store it. In which case, you must specify if it has been ]
[ split on retrieval }

function SetIntBMP(BitMSet, Valu, X, Y: Integer): Boolean;
begin;
If not (Valu > 16777215) Then
begin;
FastSetPixel(BitMSet, X, Y, Valu);
Result:= False;
end else
begin;
FastSetPixel(BitMSet, X, Y, Round(Valu - Round(Valu/2)));
Result:= True;
end;
end;

function SetFloatBMP(BitMSet, X, Y: Integer; Valu: Extended): Boolean;
Var
S, L, sValu ssValu: Extended;
begin;
If not (Valu > 16777215) Then
begin;
sValu:= Valu - Round(Valu);
ssValu:= sValu - (sValu / 2);
FastSetPixel(BitMSet, X, Y, HSLToColor(Valu, ssValu, ssValu));
Result:= False;
end else
begin;
sValu:= Valu - Round(Valu);
ssValu:= sValu - (sValu / 2);
FastSetPixel(BitMSet, X, Y, HSLToColor(Valu/2, ssValu, 0.0));
Result:= True;
end;
end;

function SetBoolBMP(BitMSet, X, Y: Integer; Valu: Boolean): Boolean;
begin;
Result:= Valu;
FastSetPixel(BitMSet, X, Y, BoolToInt(Valu));
end;

function ReadIntBMP(BitMSet, X, Y: Integer, Halved: Boolean): Integer;
begin;
If (Halved) Then
Result:= FastGetPixel(BitMSet, X, Y) * 2;
else
Result:= FastGetPixel(BitMSet, X, Y);
end;

function ReadFloatBMP(BitMSet, X, Y: Integer; Halved: Boolean): Extended;
Var H, S, L, sValu: Extended;
begin;
If (Halved) Then
begin;
ColorToHSL(FastGetPixel(BitMSet, X, Y), H, S, L);
Result:= H+S+L*2;
end else
begin;
ColorToHSL(FastGetPixel(BitMSet, X, Y), H, S, L);
Result:= H+S+L;
end;
end;

function ReadBoolBMP(BitMSet, X, Y: Integer): Boolean;
begin;
Result:= IntToBool(FastGetPixel(BitMSet, X, Y));
end;

begin;
end.

{
<OWNER> = User under the alias of R0b0t1
<ORGANIZATION> = R0b0t1
<YEAR> = 2007

Copyright (c) <YEAR>, <OWNER>

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of the <ORGANIZATION> nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

* You may not use this software for personal gain and/or bussiness
purposes without specific prior written permision.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. }

I also started wondering about speed, and realized as long as you had tonnes of variables (Like Wizzup?'s miner) it might be worth it, though its main percs would be savability.

I would be happy if someone who does/use to program for a living would post there ideas. (Wizzup? !).

See? Thats all it is. I don't think its extremely awesome. Sorry for all of the hype :p.

EDIT: Sorry for seeming really smart in my above posts… I was just ranting on a different forum. (You gotta sound smart then!)

Bourdou!

2007-09-08 18:13:15

You talk to your dad about SCAR/SRL? Nice. I think I understand what you are saying, seems like a good idea.

R0b0t1

2007-09-08 19:47:44

Actually, my way is similar to how Adobe stores picture information in .psd files.

When PhotoShop is running, eash pixels has a H, an S, and an L value assigned to it, when you save it, they do some math to make those H, S, and L values into a 32 bit color, and then they assign each pixel that value instead. They reverse the process to open it. One integer, no matter how big, is still smaller than the memory it takes to just say there are three integers.

But remember, Adobe doesnt have ColorToHSL and HSLToColor.


Man, I LOVE lengthy explanations.

rotflmfwao

2007-09-10 18:43:16

t3h pimpness. I actually thought about that a while ago… It would be soooo funny to see someone make like, an actual picture of data xD

R0b0t1

2007-09-10 18:46:21

Thats what it does make, and you could save it and look at it.

Sp0rky

2007-09-10 19:14:16

Hey guys i had this awesome idea!!


program New;
//{.Include SRL/SRL.scar}

function IntToBool(TheInt: Integer): Boolean;
begin;
If (TheInt = 0) Then
Result:= False;
else
Result:= True;
end;

function BoolToInt(TheBool: Boolean): Integer;
begin;
If not (TheBool) Then
Result:= False;
else
Result:= True;
end;

{ function SetIntBMP ]
[ ]
[ Desc. : Returns True if it had to split the integer in half to ]
[ store it. In which case, you must specify if it has been ]
[ split on retrieval }

function SetIntBMP(BitMSet, Valu, X, Y: Integer): Boolean;
begin;
If not (Valu > 16777215) Then
begin;
FastSetPixel(BitMSet, X, Y, Valu);
Result:= False;
end else
begin;
FastSetPixel(BitMSet, X, Y, Round(Valu - Round(Valu/2)));
Result:= True;
end;
end;

function SetFloatBMP(BitMSet, X, Y: Integer; Valu: Extended): Boolean;
Var
S, L, sValu ssValu: Extended;
begin;
If not (Valu > 16777215) Then
begin;
sValu:= Valu - Round(Valu);
ssValu:= sValu - (sValu / 2);
FastSetPixel(BitMSet, X, Y, HSLToColor(Valu, ssValu, ssValu));
Result:= False;
end else
begin;
sValu:= Valu - Round(Valu);
ssValu:= sValu - (sValu / 2);
FastSetPixel(BitMSet, X, Y, HSLToColor(Valu/2, ssValu, 0.0));
Result:= True;
end;
end;

function SetBoolBMP(BitMSet, X, Y: Integer; Valu: Boolean): Boolean;
begin;
Result:= Valu;
FastSetPixel(BitMSet, X, Y, BoolToInt(Valu));
end;

function ReadIntBMP(BitMSet, X, Y: Integer, Halved: Boolean): Integer;
begin;
If (Halved) Then
Result:= FastGetPixel(BitMSet, X, Y) * 2;
else
Result:= FastGetPixel(BitMSet, X, Y);
end;

function ReadFloatBMP(BitMSet, X, Y: Integer; Halved: Boolean): Extended;
Var H, S, L, sValu: Extended;
begin;
If (Halved) Then
begin;
ColorToHSL(FastGetPixel(BitMSet, X, Y), H, S, L);
Result:= H+S+L*2;
end else
begin;
ColorToHSL(FastGetPixel(BitMSet, X, Y), H, S, L);
Result:= H+S+L;
end;
end;

function ReadBoolBMP(BitMSet, X, Y: Integer): Boolean;
begin;
Result:= IntToBool(FastGetPixel(BitMSet, X, Y));
end;

begin;
end.

{
<OWNER> = User under the alias of Sp0rk-eh
<ORGANIZATION> = Sp0rk-eh
<YEAR> = 2007

Copyright (c) <YEAR>, <OWNER>

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of the <ORGANIZATION> nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

* You may not use this software for personal gain and/or bussiness
purposes without specific prior written permision.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. }

What ya think?

lol, nah just kidding.

Sounds awesome, nobody will steal it.

Do it.

Smartzkid

2007-09-10 19:34:10

Snazzy.

I say it's safe here.

A good way to save your script settings, especially if you don't want people messing with them.

Mr. Freeweed

2007-09-12 22:38:11

shiftyeyes

Pyro

2007-09-12 23:49:03

Why not just save a ini file of your progress report vars if your worried about it. Generally speaking a ini file is much much easier then having to save data into a bitmap :p

And why are you worried about anyone stealing it? Rofl. Its only a method of storing data.

Pancakes

2007-09-13 00:17:14

At first i was confused as to the point of this but.. I guess you could use this to create a really snazzy auth system :)

R0b0t1

2007-09-13 18:02:59

Stuff like that was the point Pancakes, I don't want people to get to smart about some stuff. (That really has nothing to do with my bitmap stuff, but I like to keep some stuff… Secret :p?).

Chrisface

2007-09-19 03:01:12

This is quite a good idea. I did something very similar along time back when i was making a world of warcraft bot a while ago using my own verison of scar that i made using java. What i did was that instead of looking into the memory for stats on the game i would make a mod that would encode the details into pixels. For instance. Pixel at 100,100 could have been used to store a health value. Using the red and green values 255,255 multiplied together lets you store ints of up to 65,025. Then using the blue value to do checks that the value was read correctly. I only managed to get my bot partly functional using this because i still couldn't pull quite enough information out of the game but i got darned close. Also, it was undetectable as scar is because it was only colour picking. Your idea is quite good though. The reason i didn't implement it in scar was because it was missing some functionality that i needed and i used javascript as my scripting language instead which i think is beter.

rkroxpunk

2007-09-20 08:11:17

Your dad understood that? :eek: My dad would keep his head in the paper and say, sounds great, now go run along…

R0b0t1

2007-09-20 18:57:42

My dad is a computer engineer :p.

I can barely get out of a conversation with him…

Oh yes, when you shift the bits to the left, it is like taking the integer at memory 0x45AB7F and multiplying by two

Lol?