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.
Tried the newest version, still doesn't let me assign variable in the "init" event, also it gives me an IndexOutOfRange exception. or idk.
Dunno what am I doing wrong though.
private async void EECoin()
{
Random Coin = new Random();
var roomData = new uint[2, initM.GetInt(12), initM.GetInt(13)];
var chunks = InitParse.Parse(initM);
foreach (var chunk in chunks)
{
foreach (var pos in chunk.Locations)
{
roomData[chunk.Layer, pos.X, pos.Y] = chunk.Type;
}
}
world = roomData;
while (conn.Connected == true)
{
if (world != null)
{
await Task.Delay(5);
int CoinX = Coin.Next(1, SizeX - 1);
int CoinY = Coin.Next(1, SizeY - 1);
try
{
if (world[2, CoinX, CoinY] == 0)
{
await Task.Delay(100);
conn.Send(worldkey, 0, CoinX, CoinY, 100);
await Task.Delay(2000);
conn.Send(worldkey, 0, CoinX, CoinY, 0);
}
}
catch (IndexOutOfRangeException err)
{
MessageBox.Show(err.ToString(), "Error");
}
}
}
}
someone guide me to the light that i do not see
shh i have returned
Offline
while (conn.Connected == true)
You can just use
while (conn.Connected)
-
if (world[2, CoinX, CoinY] == 0)
You're supposed to replace "2" with the layer; in this case, "0".
Offline
Do you mean this:
while (conn.Connected)
Mhmm.
Apologies, fixed.
[Edit] I would like to add that it seems madiik fixed his bot and forgot to say thanks :p
Offline
No, I haven't fixed the bot yet. The solution didn't seem to work.
shh i have returned
Offline
No, I haven't fixed the bot yet. The solution didn't seem to work.
//at your variables thingy add:
//uint[,,] world;
private async void EECoin()
{
Random Coin = new Random();
var roomData = new uint[2, initM.GetInt(12), initM.GetInt(13)];
world = new uint[2m, initM.GetInt(12), initM.GetInt(13)];
var chunks = InitParse.Parse(initM);
foreach (var chunk in chunks)
{
foreach (var pos in chunk.Locations)
{
roomData[chunk.Layer, pos.X, pos.Y] = chunk.Type;
world[chunk.Layer, pos.X, pos.Y] = chunk.Type;
}
}
//world = roomData; //no don't use this. Just make one equal to roomData instead of defining it to roomData var wich is private.
while (conn.Connected == true)
{
if (world != null)
{
await Task.Delay(5);
int CoinX = Coin.Next(1, SizeX - 1);
int CoinY = Coin.Next(1, SizeY - 1);
try
{
if (world[2, CoinX, CoinY] == 0)
{
await Task.Delay(100);
conn.Send(worldkey, 0, CoinX, CoinY, 100);
await Task.Delay(2000);
conn.Send(worldkey, 0, CoinX, CoinY, 0);
}
}
catch (IndexOutOfRangeException err)
{
MessageBox.Show(err.ToString(), "Error");
}
}
}
}
Well if this ain't working blame yourself. This try was what i did to my bot and it's working 100% fine.
Offline
912468 wrote:Do you mean this:
while (conn.Connected)
Mhmm.
Apologies, fixed.[Edit] I would like to add that it seems madiik fixed his bot and forgot to say thanks
Your changes don't change anything actually...
Offline
while (conn.Connected == true)
You can just use
while (conn.Connected)
-
if (world[2, CoinX, CoinY] == 0)
You're supposed to replace "2" with the layer; in this case, "0".
2 is decorative layer. He is doing it right.
Offline
DarkDragon4900 wrote:while (conn.Connected == true)
You can just use
while (conn.Connected)
-
if (world[2, CoinX, CoinY] == 0)
You're supposed to replace "2" with the layer; in this case, "0".
2 is decorative layer. He is doing it right.
Since when does decorations have their own layer?
Offline
DarkDragon4900 wrote:912468 wrote:Do you mean this:
while (conn.Connected)
Mhmm.
Apologies, fixed.[Edit] I would like to add that it seems madiik fixed his bot and forgot to say thanks
Your changes don't change anything actually...
Yes, they do, they save him a few lines of coding in total.
Well, tidying your code up and making it neater does change it though.
You don't wanna be looking at a bunch of mess.
--
2 is decorative layer. He is doing it right.
There is no such thing as a decorative layer.
Decorative blocks are placed on layer 0.
Using layer 2 is what's causing the IndexOutOfRange exception since he defined it to "2" ([2, wWidth, ..]) which makes the only possible layers be 0 & 1.
Besides, coins belong to the action blocks category.
--
Well if this ain't working blame yourself. This try was what i did to my bot and it's working 100% fine.
You didn't really change anything tbh.
He already had a
var roomData = new uint[2, initM.GetInt(12), initM.GetInt(13)];
Offline
marcoantonimsantos wrote:DarkDragon4900 wrote:912468 wrote:Do you mean this:
while (conn.Connected)
Mhmm.
Apologies, fixed.[Edit] I would like to add that it seems madiik fixed his bot and forgot to say thanks
Your changes don't change anything actually...
Yes, they do, they save him a few lines of coding in total.
Well, tidying your code up and making it neater does change it though.
You don't wanna be looking at a bunch of mess.--
marcoantonimsantos wrote:2 is decorative layer. He is doing it right.
There is no such thing as a decorative layer.
Decorative blocks are placed on layer 0.
Using layer 2 is what's causing the IndexOutOfRange exception since he defined it to "2" ([2, wWidth, ..]) which makes the only possible layers be 0 & 1.
Besides, coins belong to the action blocks category.--
marcoantonimsantos wrote:Well if this ain't working blame yourself. This try was what i did to my bot and it's working 100% fine.
You didn't really change anything tbh.
He already had avar roomData = new uint[2, initM.GetInt(12), initM.GetInt(13)];
He did, but it's a var inside init, so it would be private and only work for init, wich is causing his problems.
Offline
I'm still having the issue. Your arguing hasn't helped anything.
2, or 0? Nothing. Still the same bug.
shh i have returned
Offline
Please keep this on-topic. The code being discussed is not the example code, and if you are having issues with your code please create new topics. Kthxbai
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
There seems to be a lot of hassle with using the 'best' deserialiser in EE. You'd think after having created CupCake and BotBits, this would be perfect.
Oh, wait...
And having all extra block parameters in an object array is about as useful as downloading RAM. Ever heard of structs?
I'm tempted to write a public deserialiser myself, just to end this monopoly of unhelpful libraries.
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
Yes, please.
Offline
And having all extra block parameters in an object array is about as useful as downloading RAM. Ever heard of structs?
Structs have specific lengths, you can't have something as flexible as this put into a struct. This has a clear purpose: to be a serializer that never breaks. The "best" part in the title is kinda a silly name (hence why I put it in parentheses), there will probably not be a perfect serializer because every serializer has its own pros and cons. You shouldn't take that name too seriously
If you want to have your blocks saved in structs, you could use BotBits (I don't know any other public framework that uses structs, feel free to show me another one that uses structs)
There are more bot makers creating bots using other frameworks than BotBits/CupCake. What monopoly are you talking about? lol
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
Does this tool have the functionality to read whats on the sign? Or do you have to re-place all signs?
shh i have returned
Offline
Does this tool have the functionality to read whats on the sign? Or do you have to re-place all signs?
blockargs[1]
To be able to read blockargs, read part 3 of this guide:
http://forums.everybodyedits.com/viewtopic.php?id=27068
Offline
Update:
- A bug regarding "reset" messages has been fixed.
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
ayy processor
realize that your updates have broken your own world deserializer
not best
bad
;(
shh i have returned
Offline
ayy processor
realize that your updates have broken your own world deserializernot best
bad
;(
no, the newest update broke it.
Here's a tip: replace 12 and 13 with 15 and 16. All old values have now 3 ids more.
Yeah, they added description and some other values.
Offline
madiik wrote:ayy processor
realize that your updates have broken your own world deserializernot best
bad
;(no, the newest update broke it.
Here's a tip: replace 12 and 13 with 15 and 16. All old values have now 3 ids more.Yeah, they added description and some other values.
Oi, thanks!
Offline
there's no minimap
only init message
init message create minimap
k?
shh i have returned
Offline
init message create minimap
I do not want to join the world in order to create a minimap; I'd like to query the Worlds table in the BigDB database to get the last-saved world data. Using this program, or something else that Processor has made, is this possible?
Offline
[ Started around 1732553579.7232 - Generated in 0.174 seconds, 12 queries executed - Memory usage: 1.78 MiB (Peak: 2.06 MiB) ]