Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

ATastyPeanut

Members
  • Content Count

    15
  • Joined

  • Last visited

About ATastyPeanut

  • Rank
    Junior Member

Contact Methods

  • Minecraft
    A_Tasty_Peanut

Recent Profile Visitors

2056 profile views
  1. Thank you for catching this mistake, all the TPSBaseRaw filenames have been updated. I have also been able to test on a new server, the data from those tests have helped identify additional intricacies with TPS estimation. Updates to the estimator and a new high-resolution display will be coming soon.
  2. I'm unsure of its accuracy. Unfortunately, I have not had access to enough servers to do the accuracy tests under various load conditions. The testing method used was TNT detonation; A large sum of TNT (>50k) was detonated, this caused a slow down to 1-2 TPS, from the servers nominal 20 TPS, which the monitor did correctly estimate. The huge slow down from TNT proved the code worked, but was unable to provide more controlled scenarios. Additional tests are needed for a consistent load where the server runs at 5-10, 10-15, and 15-20 TPS. If you know of any servers that may work, I would
  3. If you're on a server you can still just copy and paste the code over. Use the insert key or middle mouse button to paste the code into the window.
  4. I'm going to assume you meant to say that you're trying to split a string, not that you're trying to spit a string. Then my next question is how do you want to split it? Will the split be in the same location all the time? Will there only be one split with two output strings or are you trying to split the string into multiple parts? Like do you want to split the string into a bunch of individual words? Then what do you want to do with the strings? Maybe load each word into a table? Please be clearer with what you are trying to do/accomplish.
  5. HI, so I've made two programs aimed at measuring server ticks per second (TPS). One is as monitor based program and the other is designed to display on a T2 hologram. The Github address are https://github.com/ATastyPeanut/OpenComputers-Minecraft-Lua/tree/master/Ticks-Second-Tools the TPSBaseRaw can also be accessed from Pastebin at http://pastebin.com/t73SikXu Below is the standalone measure its name is OC-TPS-Check.lua The bars change color based on what the estimated TPS is, a TPS of 10 and below is red, 10 and up is and increasing Hue. Below is the Hologram based
  6. Hi, for a basic timer you can use this: local com = require "component" local rs = com.redstone while true do rs.setOutput(1,0) os.sleep(360) rs.setOutput(1,15) os.sleep(30) end However, you should check to see if you can use an adapter with the thermalilies as a way to pull weather they are ready for more lava or not, thus eliminating the need for a timer. To check whether it's a valid component type "components" to get a list of connected components (after you place an adapter next to it). Then you can use this Pastebin program I wrote to check its API, http://pastebin.com/xVKqv7GE i
  7. Hey can you please include the snippet of code that caused the error since I'm not sure my computer format your file correctly.
  8. Hi vitamin_c, I actually wrote a program to do just that. I'm not sure if it will fit your needs exactly but it can provide a good jumping off point for what you need to do. http://pastebin.com/HFXnDqRs is the Pastebin link. Best of luck.
  9. Hi, what's nice is that robot.forward, etc return a value. Learn more about the function returns on this wiki page http://ocdoc.cil.li/api:robot So all we need to do is check its return value as being true or nil. When it's nil, then it returns a reason why it's failed. In the code below I included two possible reasons it could have failed, and you can add what you want it to do yourself. Hope it helps you, also try having it either be on pastebin/github or just written in the post details so that we don't need to download sketchy internet files. Wish I knew how to put the code in the spoil
  10. well you assigned the component to the correct thing to start then you reassigned it to the sides api. Try this instead, also put the code into the code quotes. there is a button for it that looks like this <> it makes code stand out like code. local component = require "component" local sides = require "sides" local color = require "color" --for fun lets use a variable for the Redstone card too local redstone = component.redstone --oh and you need to use setBundledOutput from the tier 2 card redstone.setBundledOutput(sides.back, color.lightGrey, 16) print("Event Initiali
  11. Hey Neo, I'm sorry if I don't understand your problem or what you're trying to do. But from what you wrote it seems like you would like to be able to call a function and have all the chat boxes say the word you passed. Something like this should work though, right? local com = require "component" local function speak(phrase, distance, name) for address, componentType in com.list("chat_box") do com.invoke(address,"setName", name) com.invoke(address,"say", phrase, distance) end end speak("say my name", 10, "Jimmy")
  12. So I wrote a proof of concept code that does successfully write characters to stand for the series of 4 base4 numbers and also successfully reads the file back. http://pastebin.com/SKAkEM8w Sorry if I was supposed to put the code in a spoilers tag, I couldn't figure out how to. local fs = require "filesystem" local string = require "string" local testDensity = {} local j = 0 for i=0,255 do testDensity[i] = math.floor(math.random()*3) end local number1 = 0 local number2 = 0 local number3 = 0 local number4 = 0 --convert a passed number to base 4 local function convToFour(num) num
  13. Turns out your right, it's indeed a bug with the modpack I'm using. After trying the same code you suggested earlier but in a different pack it worked exactly as one would expect it to, revealing a bunch of nonsense characters when edited in OC. Since saving binary data seems to not be an option I'm going to instead be using the string.byte() and string.char() functions. My plan is to write(string.char(#)) where the # is value i get using string.byte() on a value from 0-255. This decimal value I determine by doing a conversion from base 4 to base 10. Essentially writing the same binary
  14. First off thank you for the reply, the string.char() function is much cleaner than what I had before. Unfortunately, the file is still blank when I open it to see if it saved correctly. As for the Lua version, I am using 5.3. Does the write() function only accept strings so that when it gets a non-string value it errors out and doesn't write anything? I also tried using io.write(d) after setting the io.output(file), but the file is still empty. Would never have guessed writing binary data would be this difficult :/ thanks for the help. Would have figured I could just write a bunc
  15. Hello OC community, I am hoping I can get help with a project where I'm saving geolyzer data. The issue is how to make the data files small enough. My current method is to write the single digit density values 0, 1, 2, 3 into string form so that it's a string of 255 numbers. Then using the debug card's deflate function on it for final writing to the file. However, that's wasting a bunch of space since its saving the characters as 8bit values when I only need 2bit. The new way I wish to use involves saving binary data. But not the standard 8bit files but a shorter 2bit data. As in
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.