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.
I got this, X1,X2,Y1,Y2
Everything is set,
but it goes offset!
for (int x = FillXCor; x < FillX2Cor; x++)//((worldWidth-FillYCor)+(FillXCor-FillYCor)); x++)
{
if (!con.Connected)
{
break;
}
//if (x <= FillX2Cor)
//{
for (int y = FillY2Cor; y < FillYCor; y++)
{
if (!con.Connected)
{
break;
}
if (idof > 500 && idof < 1000)
con.Send(worldKey, new object[] { 1, x, y, idof });
else
con.Send(worldKey, new object[] { 0, x, y, idof });
Thread.Sleep(Convert.ToInt32(fdelay.Value));
}
//}
//else
//{
// break;
//}
Thread.Sleep(Convert.ToInt32(fdelay.Value));
}
Offline
Make numericUpDowns, or something similar.
"init":
{
numericUpDown2.Value = worldw;
numericUpDown4.Value = worldh;
numericUpDown2.Maximum = worldw;
numericUpDown4.Maximum = worldh;
//this sets their value to worldwidth/height
}
//1=Startx 2=Stopx 3=Starty 4=Stopy 5=BlockID
for (int xpos = (int)numericUpDown1.Value; xpos <= (int)numericUpDown2.Value; xpos++)
{
for (int ypos = (int)numericUpDown3.Value; ypos <= (int)numericUpDown4.Value; ypos++)
{
conn.Send(roomkey, layer, xpos, ypos, (int)numericUpDown5.Value);
Thread.Sleep(15);
}
}
Yes there are probably better ways to do this but I just like this way.
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
Make numericUpDowns, or something similar.
"init": { numericUpDown2.Value = worldw; numericUpDown4.Value = worldh; numericUpDown2.Maximum = worldw; numericUpDown4.Maximum = worldh; //this sets their value to worldwidth/height } //1=Startx 2=Stopx 3=Starty 4=Stopy 5=BlockID for (int xpos = (int)numericUpDown1.Value; xpos <= (int)numericUpDown2.Value; xpos++) { for (int ypos = (int)numericUpDown3.Value; ypos <= (int)numericUpDown4.Value; ypos++) { conn.Send(roomkey, layer, xpos, ypos, (int)numericUpDown5.Value); Thread.Sleep(15); } }
Yes there are probably better ways to do this but I just like this way.
nop doesnt work at all
plus
Im using custom coordinates with block placement. Why use numeric up down???
Offline
this should only work if the second x-Coord is greater than the first one, so if the first X-coord = 199, and the second is 12 it will not work
if you can read this....good for you
Offline
Im using custom coordinates with block placement. Why use numeric up down???
You can set them to whatever you like, as long as 1st is less than 2nd and 3rd is less than 4th
Numeric up down so you can change to whatever.
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
well numeric up down is useless in my opinion, means you gotta find the locations frist then set em in the bot, i used 2 blocks to fill in between.
if you can read this....good for you
Offline
this should only work if the second x-Coord is greater than the first one, so if the first X-coord = 199, and the second is 12 it will not work
Yeah I verified it.
I added the 'if' exception, IF x less than first, x = second & second = first
it's faster now
But I don't see any blocks
Offline
also why do you check if its connected inside the forloop? and 2 times.
if you can read this....good for you
Offline
Here, I saw the need for some good fill code so I made this:
int x1, // Enter your first X coordinate
y1, // Enter your first Y coordinate
x2, // Enter your second X coordinate
y2; // Enter your second Y coordinate
int diffX = x2 - x1, // Get the difference of the two X coordinates
diffY = y2 - y1; // Get the difference of the two Y coordinates
for (int a = 0; a <= Math.Abs(diffX); a++) // Loops for each X coordinate that needs to be sent
{
for (int b = 0; b <= Math.Abs(diffY); b++) // Loops for each Y coordinate that needs to be sent
{
int x = (diffX >= 0) ? x1 + a : x1 - a, // Checks whether the diffX is positive, negative, or 0, and adjusts accordingly
y = (diffY >= 0) ? y1 + b : y1 - b; // Checks whether the diffY is positive, negative, or 0, and adjusts accordingly
con.Send(worldKey, 0, x, y, 9); // Send the block at the X, Y coordinate
}
}
I've tested it with many combinations of integers, and it works regardless of the sign. x2 can be larger or smaller than x1 or the difference can be 0, making a straight line. And of course, the same goes for y1 and y2.
Feel free to use and adapt this code for your purposes, and ask any questions about the code if you need it.
Remember not to over-complicate simple stuff such as filling!
Offline
Also, you're going to want to change your condition to check if "idof" is >= 500 because I'm pretty sure 500 is also a BG block. Just something I noticed
Offline
Also, you're going to want to change your condition to check if "idof" is >= 500 because I'm pretty sure 500 is also a BG block. Just something I noticed
yeah just noticed that
Here, I saw the need for some good fill code so I made this:
int x1, // Enter your first X coordinate y1, // Enter your first Y coordinate x2, // Enter your second X coordinate y2; // Enter your second Y coordinate int diffX = x2 - x1, // Get the difference of the two X coordinates diffY = y2 - y1; // Get the difference of the two Y coordinates for (int a = 0; a <= Math.Abs(diffX); a++) // Loops for each X coordinate that needs to be sent { for (int b = 0; b <= Math.Abs(diffY); b++) // Loops for each Y coordinate that needs to be sent { int x = (diffX >= 0) ? x1 + a : x1 - a, // Checks whether the diffX is positive, negative, or 0, and adjusts accordingly y = (diffY >= 0) ? y1 + b : y1 - b; // Checks whether the diffY is positive, negative, or 0, and adjusts accordingly con.Send(worldKey, 0, x, y, 9); // Send the block at the X, Y coordinate } }
I've tested it with many combinations of integers, and it works regardless of the sign. x2 can be larger or smaller than x1 or the difference can be 0, making a straight line. And of course, the same goes for y1 and y2.
Feel free to use and adapt this code for your purposes, and ask any questions about the code if you need it.
Remember not to over-complicate simple stuff such as filling!
omg thx u so much this has been questioning me for weeks
Offline
[ Started around 1732476373.1693 - Generated in 0.078 seconds, 14 queries executed - Memory usage: 1.54 MiB (Peak: 1.71 MiB) ]