This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Deathknight0897's profile picture

Player profile detector pherphiral

Started by Deathknight0897, 05 July 2012 - 05:08 AM
Deathknight0897 #1
Posted 05 July 2012 - 07:08 AM
ok so simple enough a peripheral that will detect a player and there username the uses of this are untold just to list a few

List
could act as i bio metric scanner for doors
auto sign in to Pc's
personalized welcome messages
and so much more im not even tipping the ice berg


Oh forgot to say would also love it if the peripheral worked on tekkit
Edited on 05 July 2012 - 09:30 AM
Pinkishu #2
Posted 05 July 2012 - 10:33 AM
I don't like this though

It should detect something unique to each player - just nothing specific
As in it may generate a random ID for each player and associate it with them or something
Deathknight0897 #3
Posted 05 July 2012 - 11:01 AM
that's what im saying it simply detects an id or username the list is what it could be user for
Pinkishu #4
Posted 05 July 2012 - 11:11 AM
that's what im saying it simply detects an id or username the list is what it could be user for

And I'm saying it should detect a random hash value thats unique to each player rather than a username
Deathknight0897 #5
Posted 05 July 2012 - 11:19 AM
problem is with a random hash value is how would it decide who is 1 who is 2 i guess you could just would be easier to code if it was there name otherwise you would have to keep finding out what there hash was
Cloudy #6
Posted 05 July 2012 - 11:22 AM
Well no, the idea would be that the hash will be the same for a player no matter what - but it wouldn't actually be the players name.
Deathknight0897 #7
Posted 05 July 2012 - 11:26 AM
i know it wont be the players name ok let me explain myself lets say in this example i was creating a database for a bunch of door lock i don't want to have to keep referencing what someones hash is if it was there username it would be easier to remember for example

in hash form you would have to find out all the people,s ids who are allowed in and keep having to look up what there id was
41
140
486

username form
Deathknight0897
Cloudy
pinkishu

as you can see when writing the code it will be much easier to refer to there username
Pinkishu #8
Posted 05 July 2012 - 12:05 PM
i know it wont be the players name ok let me explain myself lets say in this example i was creating a database for a bunch of door lock i don't want to have to keep referencing what someones hash is if it was there username it would be easier to remember for example

in hash form you would have to find out all the people,s ids who are allowed in and keep having to look up what there id was
41
140
486

username form
Deathknight0897
Cloudy
pinkishu

as you can see when writing the code it will be much easier to refer to there username

my username shouldn't be able to be found out though - in RL i have to fill out a form and put my name too
also you just make a table
IDs[41] = Deathknight0897

etc
Deathknight0897 #9
Posted 05 July 2012 - 12:21 PM
true yeah alright i concede i give you this one maybe the perphiral should auto generate that for you in a txt file
Pinkishu #10
Posted 05 July 2012 - 12:23 PM
Well no, it shouldn't, it should just spit a code back and associating that is up to you
Deathknight0897 #11
Posted 05 July 2012 - 12:25 PM
ok so answer me this in a server of 100 people lets say how can you quickly reference who is who
Cloudy #12
Posted 05 July 2012 - 12:31 PM
You detect them once, then store that value for later use.
Deathknight0897 #13
Posted 05 July 2012 - 12:37 PM
also in regards to the perphiral returning a hash code would be much longer for example my way much more efficient and easy
ps: i highly doubt the code below would work but it gives an example of how easy code would be with users not hash

if ("Deathknight0897")
print("Hello Deathknight0897")
print("Access Aproved Have A Nice Day") -- Change this if you wish to have a custom congratulations
sleep(4)
rs.setOutput(side,true)
sleep(opentime)
rs.setOutput(side,false)
os.reboot()
elseif
if "Cloudy"
print("Hello Cloudy")
print("Access Aproved Have A Nice Day") -- Change this if you wish to have a custom congratulations
sleep(4)
rs.setOutput(side,true)
sleep(opentime)
rs.setOutput(side,false)
os.reboot()
else
print("Access Denied Please Try Again") -- Change this if you wish to have a custom fail message
print("Or")
print("If you are not an Authorized personel please leave now")
sleep(7)
os.reboot()
Pinkishu #14
Posted 05 July 2012 - 12:40 PM
Having turtles with infinite inventory would be much easier too :P/>/>


iddb = loadIDDB()
userid = getUserID()
print("Hello " .. iddb[userid])

Even a hash code makes stuff much easier - maybe even too easy though i guess it would be equivalent to a fingerprint or retina scan or so
Deathknight0897 #15
Posted 05 July 2012 - 12:41 PM
You detect them once, then store that value for later use.
but surly it would be more simple to know the hash value through a table or some sort of query as in large servers my point is take the colour api that works through hash because red is the same no matter what server your on now if lets say on my server i was 1 and my friend was 6 how would i find out he was 6 using hash surely to simplify things you want to use gamer tags
Deathknight0897 #16
Posted 05 July 2012 - 12:43 PM
ok your example works brilliantly for hello now a security program hello intruder welcome in :P/>/>

Having turtles with infinite inventory would be much easier too :)/>/>


iddb = loadIDDB()
userid = getUserID()
print("Hello " .. iddb[userid])

Even a hash code makes stuff much easier - maybe even too easy though i guess it would be equivalent to a fingerprint or retina scan or so
Pinkishu #17
Posted 05 July 2012 - 12:43 PM
You detect them once, then store that value for later use.
but surly it would be more simple to know the hash value through a table or some sort of query as in large servers my point is take the colour api that works through hash because red is the same no matter what server your on now if lets say on my server i was 1 and my friend was 6 how would i find out he was 6 using hash surely to simplify things you want to use gamer tags

So you just make a registration thingy and have them input thier "gamer tag" name and store their ID on both servers then…

ok your example works brilliantly for hello now a security program hello intruder welcome in :P/>/>

Having turtles with infinite inventory would be much easier too :)/>/>


iddb = loadIDDB()
userid = getUserID()
print("Hello " .. iddb[userid])

Even a hash code makes stuff much easier - maybe even too easy though i guess it would be equivalent to a fingerprint or retina scan or so

oh well yeah i thought people should be able to append the rest but here it goes

iddb = loadIDDB()
userid = getUserID()
print("Hello " .. iddb[userid].name)
if iddb[userid].allowed then
  rs.setOutput("left",true) sleep(2) rs.setOutput("left",false)
end
Deathknight0897 #18
Posted 05 July 2012 - 12:46 PM
now there you have made a presumption that you know the id my point is how do you find out the id of the user

i see were your going with it and you are right hash is a better system im merely trying to assatain the best id detection system ie how you know who is who
Pinkishu #19
Posted 05 July 2012 - 12:48 PM
now there you have made a presumption that you know the id my point is how do you find out the id of the user

i put them infront of a PC where they register an account and then i set their allowed state to true?
You know like the whole internet does it :P/>/>
Cloudy #20
Posted 05 July 2012 - 12:48 PM
Are you trolling? Because I posted a few posts up.

You detect them once, then store that value for later use.

Edit: Ninja'd
Deathknight0897 #21
Posted 05 July 2012 - 12:54 PM
Are you trolling? Because I posted a few posts up.

You detect them once, then store that value for later use.

Edit: Ninja'd
no sorry xD was a little confused by what you meant by that could you go into more detail or give examples i am very new to programming my day job as it were is graphical art
Deathknight0897 #22
Posted 05 July 2012 - 01:01 PM
anyways enough about the specifics of how this willl work it will work however the person who makes it decides i just hope its good and runs on tekkit and allows me to do what i was planning and that is bio metric door locks and personalized welcome events and music players
xxangel17xx #23
Posted 17 July 2012 - 02:11 PM
i like that idea of using usernames it is so much easier and convenient
what would you rather do

if = ("xxangel17xx") <—–i like this there is less time wasted trying to look in a list of players for there id number as you dont need to reference any file/list just type the username
or
if = ("20") <—–this would be too much you would have to keep a list of usernames &amp; id's
then look at then any time you want to add them to said lock