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

Private Messaging Program [EXTREMELY LIGHTWHEIGHT] [MISC PERIPHERALS]

Started by kd8lvt, 06 April 2014 - 05:35 PM
kd8lvt #1
Posted 06 April 2014 - 07:35 PM
Wireless Private Messaging System

Features:
  • Allows for instant (depending on server lag) messaging between two players, using theMisc Peripherals "Smart Helmet" and "Smallnet Sender"! Open Peripherals Terminal Glasses & Terminal Glasses Bridge!
  • Extremely Lightwheight - Could be typed in without need of pastebin - only a few lines of code! Never mind the title, got really beefy - can someone change that?
  • Allows for easy chatting between players, who don't want to spam the chat!
  • Easy to view messages!
  • Clearing functionality!
Downsides:
  • Requires one armor slot when chatting (the helmet slot).
  • Will be easily replaced by the 1.6 (As in OS version) version's Chat program, implemented in just "vanilla" Computer Craft. I just wanted to make it for funzies.
  • Shows only one line (So far)
Bugs:
  • None so far! :)/> Please tell me if you find one!
DOWNLOADS:
Don't worry, no Ad-fly or anything here! I personally find those sites rather annoying :P/> (No offense)
  • Version 0.0.3: Directly to pastebin OR, if http is enabled, pastebin get 8iYBmYvs % - COMPLETE: 0.5% Don't forget to link the Terminal Glasses BRidge to your player!
PREVIOUS VERSIONS:
Spoiler

Version 0.0.1: I forgot the pastebin link :P/>
Version 0.0.2: Directly to pastebin OR if http is enabled, pastebin get 4HTmVMGp startup % - COMPLETE: 0.2% Don't forget to link your Smallnet Sender to your player :)/>

CHANGELOG:
  • Rewrote the entire program, so it works with OP Terminal Glasses now :)/>
Giant Thanks To:
  • dan200, for making this whole program, forum, and community possible! Also, for making several TOTALLY AWESOME mods! Awesome job!
  • OpenMods Team for making this program practical, along with making several AMAZING mods! Amazing work guys!
  • (And this one sounds stuupid, but seriously) My dad, for getting me involved in coding, especially batch, at which point I got HOOKED and I have loved LUA, HTML, batch, and Java ever since!
  • Oh, and Mojang, always have to thank them :)/>
Edited on 20 April 2014 - 05:18 PM
CometWolf #2
Posted 06 April 2014 - 10:18 PM
I've never used the smarthelmet, it's use seemed so limited compared to the openP glasses. Though miscP isn't compatible with mc 1.6 though, is it?

NOT compatible for 1.7, only 1.6!
No kidding, there's no comptuercraft for 1.7 :P/>

Dont forget to change the peripheral's side (the very first line) to whatever side the SmallNet Sender is on!
Why not detect this automatically?

When you hold down CTRL+T, it sends "Terminated" to the other player, I can't avoid it without changing like, 90% of the code :P/> (Found by kd8lvt)
Editing 90% of your code would take all of what… 2 minutes?

  elseif text ~= "Terminated" then
		sn.send("smartHelmet",text)
1lann #3
Posted 07 April 2014 - 04:42 PM
When you hold down CTRL+T, it sends "Terminated" to the other player, I can't avoid it without changing like, 90% of the code :P/> (Found by kd8lvt)
Editing 90% of your code would take all of what… 2 minutes?

  elseif text ~= "Terminated" then
		sn.send("smartHelmet",text)
Or more reliably:

elseif status then
(Since the first argument that pcall returns tells whether the function errored or not)
CometWolf #4
Posted 07 April 2014 - 05:12 PM
Well technically if you want to do this reliably you would ditch pcall all together and override pullEvent instead, but yeah not much thought was used on my suggestion obviously :P/>
kd8lvt #5
Posted 07 April 2014 - 05:47 PM
Yea, sorry guys, I forgot that CC hasn't been updated for 1.7 :P/> its for 1.6 still, I just derped XD Fixing that in OP now :)/>
——————————————————————————————————————–

Also being added to the OP:
  • A "% - Completed" at the end of the download
  • A changelog (once a new version comes out)
  • Free cookies (JUST KIDDING)
——————————————————————————————————————–
MORE IMPORTANTLY:
I am working on version 0.0.2, but I am having some trouble, as I'm working on dynamically selecting the side. Who knew RichardG was so derpy on the way he made the SmallNet Sender's name? Anyways, it may take a couple of days, it may come out in a few hours. We'll see Finished v.0.0.2 :D/>
——————————————————————————————————————–
- kd8lvt :)/>

[EDIT] Version 0.02 is UP! YAY! Don't forget to download it! :D/>

[Edit2] Oh yea, also, I'm working on learning the OP Terminal Glasses, but it will make the program a gigantic mess in the first couple of updates after I start working on it, but I will keep the Misc Peripherals version up, but have dev versions uploading too. (For example, 0.0.2_dev_1) I will also be making much less updates for the next few days, as I look at other people's programs for help, but if anyone has a good tutorial, please point me to it :D/>
Edited on 09 April 2014 - 07:52 PM
kd8lvt #6
Posted 20 April 2014 - 07:20 PM
Added v. 0.0.3 to the OP, sorry it took so long, got busy with other projects for school, etc.
Look at the changelog for information on what happened!
theoriginalbit #7
Posted 21 April 2014 - 01:44 AM
Extremely Lightwheight - Could be typed in without need of pastebin - only a few lines of code!
Never mind the title, got really beefy - can someone change that?
yes, you. haha. Click edit and then 'use full editor'
realgogogoluke #8
Posted 21 April 2014 - 11:57 PM
Can you make one for the PDAs?