Jump to content


jerimo's Content

There have been 73 items by jerimo (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#229314 I dont know what to do [v.1.7.10]

Posted by jerimo on 07 August 2015 - 09:26 PM in Ask a Pro

Happened to me as well on our server at some point, excaping to menu fixed it for me I believe.
Best of luck!



#228270 Fair Game War

Posted by jerimo on 30 July 2015 - 02:24 AM in Ask a Pro

Controlling the turtle remotely is technically remotely I'd think
But true, without turtles no way in hell



#228142 Crafting pure certus quartz with a turtle

Posted by jerimo on 29 July 2015 - 06:59 AM in Ask a Pro

I'll stay in hypothetical here but it should be quite clear.

When you begin your program you launch a timer using is.syartTimer which will push an event into the stack after the determined amount of time, you then start checking for the timer event you created. If you receive that before any turtle_inventory events you know that there has been no additional items added to the turtle
Edit: just to be clear, if you receive a inventory event first you can use is.cancelTimer to stop it then starts new one and start looking for inventory events again



#228141 Need help with a turtle program.

Posted by jerimo on 29 July 2015 - 06:53 AM in Ask a Pro

Don't see the error either, but you may want to look into using elseif in your code, as its more widely supported as tuenway to chain of checking the same variable for a different result



#228140 Fair Game War

Posted by jerimo on 29 July 2015 - 06:51 AM in Ask a Pro

View PostKingofGamesYami, on 29 July 2015 - 12:22 AM, said:

-Hijacker Other Computer (remote)
*CC computers (by default) do not interact with other computers, unless additional code is added to them. This means you have to modify the computers' files at some point to gain access.
Actually it would be possible, you get a turtle to place a disk drive beadie the computer you wish to "hack" put a drive into it, and make a startup file with whatever code you want to be run



#227581 Shell.run help

Posted by jerimo on 25 July 2015 - 11:31 PM in Ask a Pro

Let's see if I get this right, you have a password lock that runs automatically on a computer, and you want to use a disk with a startup file to replace the original lock with your file instead?
Logic seems okay, assuming the door lock program does not use is.pullEventRaw which would stop you from ever running your malicious disk.
So what is it doing or not doing that you need help with?



#227580 Auto Updater

Posted by jerimo on 25 July 2015 - 11:24 PM in Ask a Pro

I believe it had been already mentioned in passing in your API thread, but rather than try to put your a uff on pastebin and then make an installer it was suggested that you simply have the installer on pastebin install the installer you already use. The complaint was not that the API itself was nice t in pastebin, but rather that it was complex to install, compared to pastebin run code



#227503 Turtle Tweaks

Posted by jerimo on 25 July 2015 - 07:09 AM in Suggestions

View PostHPWebcamAble, on 18 July 2015 - 11:32 PM, said:

-- snip --
The difference would be small, yes but there would be a difference which would start showing if you had a hundred turtles all trying to do this as quickly as they can



#227498 Executing a string as a Command

Posted by jerimo on 25 July 2015 - 06:27 AM in Ask a Pro

View PostBomb Bloke, on 25 July 2015 - 02:39 AM, said:

View Postjerimo, on 24 July 2015 - 09:42 PM, said:

True, but as dragon pointed out its easier that way,

I wouldn't say it's "easier" - and I wouldn't say Dragon said that, either.

I mean, yeah, the code ends up shorter on the turtle's side, but as a result you need to send a lot more data over rednet to get the job done. Would you rather you just sent a "go forward" command and the turtle went forward, or would you rather that you had to send a "go forward" command, check on the result, send another command to make the turtle dig / attack if the movement failed, send another "go forward" command, etc, etc, etc...?

It's "easier" to handle such things locally, on the turtle itself. Granted, having both options (which is what Dragon is suggesting) is better again, but if I were going to choose between the two methods, I'd do the same as MKlegoman357.
Why not just have a proper turtle API loaded up instead and use that? I've rarely if ever keptnthe standard turtle API I always end up replacing it as my needs and base hardware developed such as GPS and the such, which would render the if once again much more complex for no reason



#227453 Executing a string as a Command

Posted by jerimo on 24 July 2015 - 09:42 PM in Ask a Pro

View PostMKlegoman357, on 23 July 2015 - 05:17 PM, said:

View Postjerimo, on 23 July 2015 - 03:29 PM, said:

If the only commands you use are the turtle API calls, you could pass your input into it this way
turtle[input]()
Which would run any turtle cmand you sent it, without the need for expansive if statements

My example code does pretty much the same thing, except rather than calling functions of the turtle API directly, letting you create your own commands and functions.
True, but as dragon pointed out its easier that way, and another perk is that if say the turtle API gets updated and gets new functions, the program still works with zero change, as you dint need to add an if statement into it.
If you wanted to add.more APIs you could also do
Function run(APIName, funcName)
if _G[APIName][funcName] then
_G[APIName][funcName]()
End
End
Which would allow you to use any function in any loaded API



#227271 Executing a string as a Command

Posted by jerimo on 23 July 2015 - 03:29 PM in Ask a Pro

View PostMKlegoman357, on 23 July 2015 - 07:30 AM, said:

View PostHPWebcamAble, on 23 July 2015 - 06:26 AM, said:

Err, wouldn't you only need one? Just open every channel and wait for a message?

The maximum number of channels you can open on a single modem is 128, so you'd need a bunch of computers and modems to sniff all 65535 channels.
If the only commands you use are the turtle API calls, you could pass your input into it this way
turtle[input]()
Which would run any turtle cmand you sent it, without the need for expansive if statements



#227265 Improved Turtle API

Posted by jerimo on 23 July 2015 - 03:04 PM in APIs and Utilities

View Post_zircon_, on 23 July 2015 - 03:01 PM, said:

Those of you who have downloaded it from PokeAcer's link, you will not be able to stay updated because PokeAcer will have to keep updating the Pastebin file, which, might not happen :)/>
Those of you who have downloaded it using my method (the downloader), will always have the latest version and it will stay updated.
You could also simply add an autoupdater so whichever method you use to obtain it the first time you stay up to date



#226904 Help with sending a table over rednet

Posted by jerimo on 21 July 2015 - 09:57 PM in Ask a Pro

View PostMKlegoman357, on 21 July 2015 - 04:53 PM, said:

View Postjerimo, on 21 July 2015 - 04:16 PM, said:

Couldn't you string dumo the function and string load in the other side though?

So anyone could string.dump() a virus to your computer? Sure! Also, you won't be able to save upvalues and bytecode might get corrupted after sending.
True, but was wondering for curiosity more than security



#226830 More coroutine questions

Posted by jerimo on 21 July 2015 - 04:24 PM in Ask a Pro

Generally speaking programs will only run for fractions of a second, then yield, which mean they are letting other computers work. When their turn comes, the coroutine manager will basically give it the event it was waiting for so it can run for a fraction of a second once again.
This doesn't mean it will always run, it means that it will only run when it gets what it asked for.
The way this system works also means that if you let a single computer go in for say a whole second, then all other computers are unable to do anything for that whole second either, which is why it is highly desirable for programs to yield when not in critical need of processing time



#226823 Help with sending a table over rednet

Posted by jerimo on 21 July 2015 - 04:16 PM in Ask a Pro

Couldn't you string dumo the function and string load in the other side though?

Edit: no idea what happened from here on out, sorry bout that



#226817 Downloading Remote Files using HTTP

Posted by jerimo on 21 July 2015 - 03:59 PM in Ask a Pro

If your browser doesnt anage to download it I highly doubt CC ever will while that holds true



#226816 How do I check for text at a specific position.

Posted by jerimo on 21 July 2015 - 03:52 PM in Ask a Pro

Rather than trying to make a collision map from from text in scren why not first begn by making a collision map itself?

Say we use a table, as tht makes it incredibly easy, and the movement is locked onto the grid due to technical limitations.

Within that table, we'll create more tables to set up the full map, this part I will leave to you, but keep in mind that a character will indicate a wall,leave undefined those you wish to be traversable.

Now the player will begin somewhere, and you can move them around that map much more easily, and simply check if a text character exists in the location where the player is wishing to go, if not then the player may move there.

Once that is done, you may move on to rendering the map itself, but before I go on there are a few things which you can work on, and you only asked about the collision map itself so I'll let you begin on that and attempt this part, if you need more help ask away



#226303 Turtle Tweaks (API)

Posted by jerimo on 19 July 2015 - 12:00 AM in Turtle Programs

View PostHPWebcamAble, on 18 July 2015 - 11:30 PM, said:


The API doesn't change the function of the default functions,
so it won't break existing scripts! (Yes I know that's awkward wording)
"The API doesn't change the behavior of the default functions", might be a good alternative?

Other than that seems nice and to the point



#226289 Turtle Tweaks

Posted by jerimo on 18 July 2015 - 10:46 PM in Suggestions

I would think the main reason it was implemented implementer his way is because it's much faster this way.

Let's compare;
The current way you call the function it does its thing and its done.
The way you are proposing you call a function, which then needs to compare strings, followed by assigning a few more variables to determine which block needs to be checked based on the strong and finally do its thing.

If the turtles and computers did not have to share a single thread it would not matter but due to the way that the system is made any acceleration is good

On a server I played in we had over three hundred computers running at all times, around fifty of those being turtles that were not assigned to a farm, such as the wither boss farm



#226106 Help with the Modem API

Posted by jerimo on 17 July 2015 - 06:22 PM in Ask a Pro

Line 25 you are declaring a function inside a while loop, meaning that it will be declared every time that loop runs, if it runs at all never attempted such a thing personally
Also you are locking/unlocking the door if there is a player event, without checking anything then pulling a new event and seeing if its a modem event, without checking the distance at all.

Not your exact problem but imagine what would happen if you had a modem message followed by a player message. Your code would take the modem message see its not a player event and take the player event see its not a modem message and discard it.
To solve this simply change your if in line 51 to an elseif



#226105 Creating Bridge Program

Posted by jerimo on 17 July 2015 - 06:11 PM in Ask a Pro

View PostHPWebcamAble, on 17 July 2015 - 06:01 PM, said:

View PostBowWhalley, on 17 July 2015 - 02:09 PM, said:

Spoiler
Unfortunetly it is still doing the same thing as before.

You still didn't fix everything Bomb suggested.
turtle.detect() will ONLY return 'true' or 'false', if there is, or isn't, a block in front of the turtle.

View Postjerimo, on 17 July 2015 - 05:56 PM, said:

  turtle.forward()//or bomb blokes go forward


Lua comments start with two dashes ( -- )
On the forums, you might want to add a # ( --# )

Also, your ending code tag has the wrong slash, that's why it isn't formatted correctly.
Riiiight! Haven't touched lua in a while, will fix it asap, thanks



#226099 Creating Bridge Program

Posted by jerimo on 17 July 2015 - 05:56 PM in Ask a Pro

Have you ever made a bedrock miner? As in it goes down to bedrock then comes back up? If so this is exactly the same thing but horizontal.

bridgeLength = 0
turtle.forward()
while not turtle.detectDown() do
  turtle.placeDown()
  turtle.forward() --# or bomb blokes go forward
  bridgeLength = bridgeLength + 1
end

turtle.turnRight()
turtle.forward()
turtle.turnRight()

for i=1, bridgeLength do
  turtle.forward()
  turtle.placeDown()
end

Essentially you are making it until you find ground, then turn around and make it the same length to the right of the original one

Obviously there is no inventory management nor refueling, I'll leave that up to you



#225924 Lower Variable number value

Posted by jerimo on 16 July 2015 - 06:19 PM in Ask a Pro

View PostBowWhalley, on 16 July 2015 - 06:04 AM, said:

Thankyou guys, I've taken in your feedback and gotten the program to work :)/>.
Also to your last statement BombBloke, I needed this information to also create the second program for a second turtle that was placing down blocks for the rail to go onto
You may wish to try having your turtle go backwards, that way it can both place the rails and check for a stable floor. When it runs into something you can turn it around to break the blocks until it can move forward again, at which point you make it go backwards and placing rails again.
Alternatively you could also make it go up the hills it could run into



#225923 Help with table switching

Posted by jerimo on 16 July 2015 - 06:11 PM in Ask a Pro

View PostMrPepsi, on 16 July 2015 - 12:23 AM, said:

View PostGrim Reaper, on 15 July 2015 - 11:15 PM, said:

View PostMrPepsi, on 15 July 2015 - 10:33 PM, said:

So like I stated, currently my tables are listed as Row#, Row# etc. increasing by 1 each time, so if my Current Y minus the MinY was 5 I would be selecting to edit the table Row5. and then I would edit the Key based off of the CX - MinX, so if the current X was 12 and the MinX was 1 I would need to edit key slot #11 of table Row5. I'll try what Lyqyd suggested with the clarification of your post. But this post was just to get back to you wanted me to explain/elaborate.

What you've done here makes things more difficult than they need to be. Lyqyd's suggestion makes it easy to index the proper row table, so you can make the updates you want with ease as opposed to writing a long if-else chain to select the proper table.

Alrighty, I'll give it a try, thank you both for the help!
Not saying this is the good way of structuring your program but having run into an occasion where this method was the only way you can use
_G[string name] to get to a table by string name in the global table
Best of luck in your program though



#225753 Get the printed output of a program from within another program

Posted by jerimo on 15 July 2015 - 04:26 PM in Ask a Pro

View PostKnightMiner, on 14 July 2015 - 09:19 PM, said:

View Postjerimo, on 14 July 2015 - 04:23 PM, said:

Alternatively, you could also just send the line of text trying to be written to the screen, and let the controller display it the way it wishes, which would likely be simpler?
Not really, since the idea is to get outputs from a program, and I am not going to rewrite all the default programs so they send their text instead of just writing it.
Assumed your be working with custom programs mainly, but yeah if you are working with the defaults more then it would be harder to do, with your own it would be as simple as overwriting the print/write function to reset.send the input then use the real function, hence the assumption
Best of luck