Jump to content




Is it possible

peripheral wireless api

14 replies to this topic

#1 SomeGuy

  • Members
  • 5 posts

Posted 22 February 2015 - 08:16 PM

Just wondering real quick if it would be possible to create a player NAME detecting program where within the radius of say a peripheral sensor, it logs any name that isn't on a list of people. In other words, for identifying intruders can we log the all the names of player who arn't on a current member list or whatever. I also know computercraft has itegration with other mods so ill add a couple i know we have on the server.

-IC2
-PnuematiCraft
-BuildCraft

if it is possible, but it requires some other mod than ComputerCraft or the ones listed, feel free to let me know about that as well. Thanks for any and all input.

#2 Zareks

  • Members
  • 8 posts

Posted 22 February 2015 - 10:24 PM

https://github.com/a...i/Player-Sensor
from peripherals++ seems like it may ve a step in that direction... i am at work atm so i can't play witg it and get a code up for you right now, but i figured i would give you a starting point. I could probably get a code up and running by the end of tomorrow (i open tomorrow, so it'd be after work).

#3 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 22 February 2015 - 10:54 PM

IC2 and BuildCraft won't help you with this, PnuematiCraft might. If I remember, you can do stuff with the security station.

#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 23 February 2015 - 12:40 AM

If you have OpenCCSensors, OpenPeripheral, or one of the other sensor-adding mods, quite do-able.

#5 Yanniclord

  • Members
  • 39 posts

Posted 23 February 2015 - 03:16 AM

Here, me and my friend (mostly my friend, but i helped fixed some of the problems he had XD) wrote this some time ago, its outdated, but if you can fix the wrong arguments (the mod updated so the arguments dont work anymore), your much as welcome to use it. I did also add a comment line on how to add more players, and also it will display those names to a large Monitor, so monitor is required unless you want not (wich i guess you want since it should warn you i guess). Here: http://pastebin.com/thz3EeSx

#6 SomeGuy

  • Members
  • 5 posts

Posted 23 February 2015 - 05:33 AM

View PostBomb Bloke, on 23 February 2015 - 12:40 AM, said:

If you have OpenCCSensors, OpenPeripheral, or one of the other sensor-adding mods, quite do-able.

I believe I have both of them. I saw some things about about a proximity sensor where people were making doors that would automatically open for them and only them within when they were within range. My idea/questions to go off of that would be:

1. - How do I get the names of everyone within range(regardless of who they are)
(Now I know the system does grab everyones name who is in range somehow, otherwise the check to see if it is the right person wouldn't be able to happen in all, i just don't know how list to all of them and output them into a file.)

2. - How do I make the range of that sensor larger as the largest I've seen people doing is around 10 blocks or so. (the base i am trying to make a system for is close to 50x200 (Can i make a bunch of different systems that send info to one main computer if the range cant get large enough?))




Thanks for all the comments so far. Appreciate all the help.

Edited by SomeGuy, 23 February 2015 - 06:28 AM.


#7 SomeGuy

  • Members
  • 5 posts

Posted 23 February 2015 - 06:31 AM

View PostYanniclord, on 23 February 2015 - 03:16 AM, said:

Here, me and my friend (mostly my friend, but i helped fixed some of the problems he had XD) wrote this some time ago, its outdated, but if you can fix the wrong arguments (the mod updated so the arguments dont work anymore), your much as welcome to use it. I did also add a comment line on how to add more players, and also it will display those names to a large Monitor, so monitor is required unless you want not (wich i guess you want since it should warn you i guess). Here: http://pastebin.com/thz3EeSx

That Code looks exactly like what I need, I'm not sure if i understand all of it yet, but that's my problem ill deal with on my own time.
For the range part tho, how would I extend the range to something like 50 or 200 blocks?
If I can't (as I have no idea what the sensor range actually is), would I be able to make multiple computers with sensors acting like nodes that relay info back to a single computer for displaying intruders?

#8 Yanniclord

  • Members
  • 39 posts

Posted 23 February 2015 - 07:56 PM

View PostSomeGuy, on 23 February 2015 - 06:31 AM, said:

View PostYanniclord, on 23 February 2015 - 03:16 AM, said:

Here, me and my friend (mostly my friend, but i helped fixed some of the problems he had XD) wrote this some time ago, its outdated, but if you can fix the wrong arguments (the mod updated so the arguments dont work anymore), your much as welcome to use it. I did also add a comment line on how to add more players, and also it will display those names to a large Monitor, so monitor is required unless you want not (wich i guess you want since it should warn you i guess). Here: http://pastebin.com/thz3EeSx

That Code looks exactly like what I need, I'm not sure if i understand all of it yet, but that's my problem ill deal with on my own time.
For the range part tho, how would I extend the range to something like 50 or 200 blocks?
If I can't (as I have no idea what the sensor range actually is), would I be able to make multiple computers with sensors acting like nodes that relay info back to a single computer for displaying intruders?

You cannot extend the range, so i recommend you to hookup multiple sensors with Cables and Modems.

#9 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 23 February 2015 - 09:40 PM

Depends on the sensor you're using. Some have config files.

#10 Yanniclord

  • Members
  • 39 posts

Posted 24 February 2015 - 03:44 AM

View PostSomeGuy, on 23 February 2015 - 06:31 AM, said:

View PostYanniclord, on 23 February 2015 - 03:16 AM, said:

Here, me and my friend (mostly my friend, but i helped fixed some of the problems he had XD) wrote this some time ago, its outdated, but if you can fix the wrong arguments (the mod updated so the arguments dont work anymore), your much as welcome to use it. I did also add a comment line on how to add more players, and also it will display those names to a large Monitor, so monitor is required unless you want not (wich i guess you want since it should warn you i guess). Here: http://pastebin.com/thz3EeSx

That Code looks exactly like what I need, I'm not sure if i understand all of it yet, but that's my problem ill deal with on my own time.
For the range part tho, how would I extend the range to something like 50 or 200 blocks?
If I can't (as I have no idea what the sensor range actually is), would I be able to make multiple computers with sensors acting like nodes that relay info back to a single computer for displaying intruders?

Actually i can try to fix the code for myself, would help me to by learning more about this. I report back if i got this updated and fixed.

#11 Zareks

  • Members
  • 8 posts

Posted 24 February 2015 - 05:38 AM

Hmmm... now i am ultra interested... might tinker around a bit in open periphs and see if you might could set up a wireless grid with sensors/routers attachted to blanket an area

#12 SomeGuy

  • Members
  • 5 posts

Posted 24 February 2015 - 06:50 AM

View PostBomb Bloke, on 23 February 2015 - 09:40 PM, said:

Depends on the sensor you're using. Some have config files.

That's what I was figuring, but I am not an admin of the server I'm playing on and have no way to check.

View PostZareks, on 24 February 2015 - 05:38 AM, said:

Hmmm... now i am ultra interested... might tinker around a bit in open periphs and see if you might could set up a wireless grid with sensors/routers attachted to blanket an area

I'm sure if I had to, just making a wireless computer have a function that sends info to a certain computer wouldnt be too hard. might be a bit lame to find the needed number of computers for the blanket tho haha

#13 Zareks

  • Members
  • 8 posts

Posted 24 February 2015 - 12:01 PM

I wonder if i could hack up a turtle swarm to build the net automagically

Edited by Zareks, 24 February 2015 - 12:02 PM.


#14 SomeGuy

  • Members
  • 5 posts

Posted 24 February 2015 - 03:59 PM

how awesome would it be to have a bunch of soldier turtles goto the position of the intruder and kill him haha.

#15 Zareks

  • Members
  • 8 posts

Posted 24 February 2015 - 06:25 PM

I dunno if my coding skills can get me to that level, but i think that would be possible.... hmmmm....





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users