Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
Topic closed
I'm trying to add a feature to my bot that allows the press of a button to replace 414 with blocks from my 'int[] diggables;'. I'm listing my blocks in a list (go figure.) the lists name is blockL (from Jaba's tutorial). I'm also using InitParse.
I figured things out.
Offline
The beauty of bots is that there is no set path to take. You could read up on all the tutorials, but at that point you're not learning anything or creating anything of value. You've simply copying someone else's creation, but through a painstakingly long process.
But lo and behold, you've come to an idea! This is monumental. Truly. Now, you're deciding that you want to "regenerate" dug blocks.
There are so many possible solutions, it's astounding. But which one? You didn't specify, so I'm taking the liberty to treat this as guidance rather than spoonfeeding code.
Some ideas:
Portal snake. Go hunt people down and re fill the world at the same time!
Random fill: Just randomly attack those dug blocks. They'll all get filled up at some point.
Targeted fill: bury people alive!
Anti-targeted fill: start replacing blocks where people aren't digging so it doesn't affect gameplay
Time-lapse fill: start replacing blocks from teh oldest dig to the newest!
Least-traveled fill: Don't block thke passages people often take, instead fill up those branching caverns no one uses anymore!
Flood fill: Simply treat EE like Paint.
Spaz fill: Starting at some central point, start rapidly filling in random adjacent points unpredictably.
Here's a list of ideas. Most aren't serious. But you're given the option to take this question and turn it into something creative!
Now, I'm not saying you should be more specific in your mooching of code. Rather, I hope that you can take your ideas and learn with them.
If you ask someone else for the code, you're not particularly learning and your bot won't be original. (Well, the flood fill won't.)
#blazeyourowntrailm8
Offline
-snip-
I know how I want to do it, I'm just not sure how i'm going to do it.
I want to search the list for blocks with the ID of 414 and replace them, I've never tried this before and I'm having trouble figuring it out.
PS: Thanks for the ideas, I just can't do much with it just yet.
Offline
The code I'm currently uses place 3 blocks then returns an error.
foreach (block item in blockL)
{
if (item.bid == 414)
{
if (item.y < 25)
{
}
else
{
con.Send(worldkey, 0, item.x, item.y, 9);
Thread.Sleep(27);
}
}
}
Sorry for double-post.
Offline
Use a for loop, check if the block at index i has ID 414 and if true, then change it to whatever. That simple
Or am I missing something? Please correct me if I am.
Offline
The code I'm currently uses place 3 blocks then returns an error.
-snip-
Sorry for double-post.
Could be that since you are placing a block during the loop, it changes the value of the list, causing the foreach to crash. I would use a for loop instead of a foreach.
Offline
returns an error.
If you give us a vague reason you will get a vague answer. You need to provide the actual error.
Player Since 2011. I used to make bots and stuff.
Offline
returns an error.
If you give us a vague reason you will get a vague answer. You need to provide the actual error.
Apologies. The error tells me it was Unhandled by user code. There wasn't a really specific error. It just said that.
EDIT: http://prntscr.com/8ai2gk <--- This, actually.
Offline
Closed on request by OP.
I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.
Offline
Pages: 1
Topic closed
[ Started around 1732778685.4755 - Generated in 0.057 seconds, 13 queries executed - Memory usage: 1.52 MiB (Peak: 1.69 MiB) ]