Official Everybody Edits Forums

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.

#1 2015-05-02 20:22:53, last edited by madiik (2015-05-02 20:25:09)

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Actually collecting a coin.

http://forums.everybodyedits.com/viewtopic.php?id=27280 did not answer my question.

Tried something like this too...

                                System.Threading.Thread.Sleep(5);
                                conn.Send("m", x*16, y*16, 0, 0, 0, 0, 0, 0, 0, false);
                                System.Threading.Thread.Sleep(5);
                                conn.Send("c", LocalPlayer.YellowCoinsCollected, LocalPlayer.BlueCoinsCollected, x, y);
//some code here bla bla bla
               case "c":
                    {
                        if (LocalPlayer.UserID == m.GetInt(0))
                        {
                                MessageBox.Show(m.GetInt(1).ToString() + " ------ " + m.GetInt(2).ToString());
                                if (m.GetInt(1) > LocalPlayer.YellowCoinsCollected)
                                    LocalPlayer.YellowCoinsCollected++;
                                if (m.GetInt(2) > LocalPlayer.BlueCoinsCollected)
                                    LocalPlayer.BlueCoinsCollected++;
                        }
                    }
                    break;

ah, edit:

When I tried messagebox testing, it just returned 0 ----- 0, even though the "c" was fired.


shh i have returned

Offline

#2 2015-05-02 20:42:48

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: Actually collecting a coin.

I think you need to check where the coin is with an init parser.

Offline

#3 2015-05-02 20:46:05

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: Actually collecting a coin.

But I do. It just doesn't seem to count as a NEW coin? Is there something related with sending an another message?


shh i have returned

Offline

#4 2015-05-02 22:10:38

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: Actually collecting a coin.

helps?


shh i have returned

Offline

#5 2015-05-02 22:59:22

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: Actually collecting a coin.

Why would you need it to collect coins?

Offline

#6 2015-05-02 23:43:41

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: Actually collecting a coin.

My bot actually refuses to collect coins all together.
Not when making him pass over coins, not by sending the coin event manually.

He registers others getting coins just fine though.

Maybe it has to do that the bot is never in motion? (I know afk players also tend to make stuff like keys act strange)

Offline

#7 2015-05-03 03:25:27

goeyfun
Member
From: Mighty Japan
Joined: 2015-02-18
Posts: 667

Re: Actually collecting a coin.

DarkDragon4900 wrote:

Why would you need it to collect coins?

lelel super useful //forums.everybodyedits.com/img/smilies/tongue


Ug3JzgO.png

Offline

#8 2015-05-03 07:39:35

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: Actually collecting a coin.

Ayy, I think i figured something out.

                    var data = World.Blocks[0, x, y];
                    if (conn != null && data != null && (data.Item1 == 100 || data.Item1 == 101))
                        await Task.Delay(800);
                        conn.Send("m", x * 16, y * 16, 0, 0, 0, 0, 0, 0, 0, false);
                        await Task.Delay(5);
                        if (data.Item1 == 100)
                            conn.Send("c", LocalPlayer.YellowCoinsCollected++, LocalPlayer.BlueCoinsCollected, x, y);
                        else
                            conn.Send("c", LocalPlayer.YellowCoinsCollected, LocalPlayer.BlueCoinsCollected++, x, y);

it seems you must add the amount of coins needed by yourself
so like, just add + 1 to your coin thingy
but there is still a problem
when picking up coins, the 1st coin (yellow/blue) is still 0, not 1.


shh i have returned

Offline

#9 2015-05-03 09:07:52

Xfrogman43
Member
From: need to find a new home
Joined: 2015-02-15
Posts: 4,174

Re: Actually collecting a coin.

conn.Send("m", x*16, y*16, 0, 0, 0, 0, 0, 0, 0, false);

To

conn.Send("m", x/16, y/16, 0, 0, 0, 0, 0, 0, 0, false);

?


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

#10 2015-05-03 21:07:51

madiik
Member
From: floor above Yuuta
Joined: 2015-02-26
Posts: 514

Re: Actually collecting a coin.

Ugh, frogman, no.

My x and y are by blocks, but if you are dependant on player position, then yes. divide with 16, but convert to int first, else the results will be different.


shh i have returned

Offline

#11 2015-05-03 22:51:21

Xfrogman43
Member
From: need to find a new home
Joined: 2015-02-15
Posts: 4,174

Re: Actually collecting a coin.

madiik wrote:

Ugh, frogman, no.

My x and y are by blocks, but if you are dependant on player position, then yes. divide with 16, but convert to int first, else the results will be different.

Sorry, I just thought moving was /16, not *.


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

Xfrogman431430689881501087

Board footer

Powered by FluxBB

[ Started around 1732797004.6393 - Generated in 0.171 seconds, 12 queries executed - Memory usage: 1.48 MiB (Peak: 1.63 MiB) ]