[GH-ISSUE #184] Spam clicking a tree fast enough will D/C everyone. #8435

Closed
opened 2026-06-01 12:20:34 +00:00 by Dark98 · 15 comments
Owner

Originally created by @JetF0x on GitHub (Nov 15, 2019).
Original GitHub issue: https://github.com/2006-Scape/2006Scape/issues/184

Originally created by @JetF0x on GitHub (Nov 15, 2019). Original GitHub issue: https://github.com/2006-Scape/2006Scape/issues/184
Author
Owner

@mrextremez commented on GitHub (Nov 15, 2019):

Add a simple timer when clicking the tree to prevent this

<!-- gh-comment-id:554234200 --> @mrextremez commented on GitHub (Nov 15, 2019): Add a simple timer when clicking the tree to prevent this
Author
Owner

@Gptaqbc commented on GitHub (Nov 15, 2019):

Players can still abuse it.

<!-- gh-comment-id:554324340 --> @Gptaqbc commented on GitHub (Nov 15, 2019): Players can still abuse it.
Author
Owner

@Gptaqbc commented on GitHub (Nov 15, 2019):

Most likely an out of bound shitty error. @dginovker can you provide any error message about this?

<!-- gh-comment-id:554395333 --> @Gptaqbc commented on GitHub (Nov 15, 2019): Most likely an out of bound shitty error. @dginovker can you provide any error message about this?
Author
Owner

@dginovker commented on GitHub (Nov 15, 2019):

Leveling up an acc for oak trees right now. On normal trees, you get this message though, just no logs or EXP:

image

<!-- gh-comment-id:554423178 --> @dginovker commented on GitHub (Nov 15, 2019): Leveling up an acc for oak trees right now. On normal trees, you get this message though, just no logs or EXP: ![image](https://user-images.githubusercontent.com/32943174/68957742-a998ac80-0798-11ea-9b76-1f60e13d95a2.png)
Author
Owner

@Gptaqbc commented on GitHub (Nov 15, 2019):

mmmm I've had this message on my localhost too when cutting logs.

<!-- gh-comment-id:554423930 --> @Gptaqbc commented on GitHub (Nov 15, 2019): mmmm I've had this message on my localhost too when cutting logs.
Author
Owner

@Gptaqbc commented on GitHub (Nov 15, 2019):

Is this happening when cutting a tree that gets cut by another account before you can finish cutting it on the first account?

<!-- gh-comment-id:554424294 --> @Gptaqbc commented on GitHub (Nov 15, 2019): Is this happening when cutting a tree that gets cut by another account before you can finish cutting it on the first account?
Author
Owner

@dginovker commented on GitHub (Nov 15, 2019):

Nope I'm only one in area.

<!-- gh-comment-id:554424630 --> @dginovker commented on GitHub (Nov 15, 2019): Nope I'm only one in area.
Author
Owner

@Gptaqbc commented on GitHub (Nov 15, 2019):

Is it clicking the tree more than once then?

<!-- gh-comment-id:554425184 --> @Gptaqbc commented on GitHub (Nov 15, 2019): Is it clicking the tree more than once then?
Author
Owner

@dginovker commented on GitHub (Nov 15, 2019):

Yup, spam clicking it. You should be able to reproduce locally

<!-- gh-comment-id:554425499 --> @dginovker commented on GitHub (Nov 15, 2019): Yup, spam clicking it. You should be able to reproduce locally
Author
Owner

@Gptaqbc commented on GitHub (Nov 15, 2019):

It seems like it's sending actions to do when it doesnt have to. Maybe it's sending a packet to cut the tree but it just got cutted.

<!-- gh-comment-id:554426064 --> @Gptaqbc commented on GitHub (Nov 15, 2019): It seems like it's sending actions to do when it doesnt have to. Maybe it's sending a packet to cut the tree but it just got cutted.
Author
Owner

@Gptaqbc commented on GitHub (Nov 17, 2019):

When clicking a tree, before doing an action, check if the action is already what the player is doing. Don't send packet or something if the action is already been done. This would resolve the packet spam issue I think.

<!-- gh-comment-id:554799732 --> @Gptaqbc commented on GitHub (Nov 17, 2019): When clicking a tree, before doing an action, check if the action is already what the player is doing. Don't send packet or something if the action is already been done. This would resolve the packet spam issue I think.
Author
Owner

@Gptaqbc commented on GitHub (Nov 17, 2019):

Launching this:

CycleEventHandler.getSingleton().addEvent("WoodcuttingEvent".hashCode(), player, new CycleEvent() {

only when it's not already what the player is doing.

<!-- gh-comment-id:554799904 --> @Gptaqbc commented on GitHub (Nov 17, 2019): Launching this: >CycleEventHandler.getSingleton().addEvent("WoodcuttingEvent".hashCode(), player, new CycleEvent() { only when it's not already what the player is doing.
Author
Owner

@dginovker commented on GitHub (Nov 17, 2019):

I actually added that code in my last PR, @Gptaqbc . It fixes the spam clicking oaks gives infinite logs bug, it may have actually also solved this. The reason we hash "WoodcuttingEvent", is so when it goes into the EventHandler it removes any previous instance of this.

If this is what your idea of fixing it was, it may already work and this issue is ready to close. Don't get confused thinking that code was already there and this issue was still reported with it O_O

<!-- gh-comment-id:554800182 --> @dginovker commented on GitHub (Nov 17, 2019): I actually added that code in my last PR, @Gptaqbc . It fixes the spam clicking oaks gives infinite logs bug, it may have actually also solved this. The reason we hash "WoodcuttingEvent", is so when it goes into the EventHandler it removes any previous instance of this. If this is what your idea of fixing it was, it may already work and this issue is ready to close. Don't get confused thinking that code was already there and this issue was still reported with it O_O
Author
Owner

@Gptaqbc commented on GitHub (Nov 17, 2019):

Yeah I know but it didnt solve this I just tried. Server crashes at 3000ish clicks. I saw when this code was pushed :P

<!-- gh-comment-id:554800541 --> @Gptaqbc commented on GitHub (Nov 17, 2019): Yeah I know but it didnt solve this I just tried. Server crashes at 3000ish clicks. I saw when this code was pushed :P
Author
Owner

@Gptaqbc commented on GitHub (Dec 7, 2019):

The 300ms restriction that was added earlier last week shoulkd have fixed this issue. I tried to replicate and I was unable to.

<!-- gh-comment-id:562803436 --> @Gptaqbc commented on GitHub (Dec 7, 2019): The 300ms restriction that was added earlier last week shoulkd have fixed this issue. I tried to replicate and I was unable to.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: 2006-Scape/2006Scape#8435