Mascimo
15 posts
|
http://www.kongregate.com/games/Mascimo/precision-click
I had it with a highscore board, but I had to delete it because I found out that you could hack it with the tab key.
The game has several frames with the stop(); action on them. I tried using the following code:
onEnterFrame = function () {
if (Key.isDown(“<tab>”)) {
gotoAndStop(3);
}
};
But apparently, it made the stop() action invalid, and the frame goes right away, doesn’t stop.
Any ideas?
|
|
|
Mascimo
15 posts
|
And, sorry, it is AS 2.0.
|
|
|
skyboy
1230 posts
|
_root.tabEnabled = false;
|
|
|
Mascimo
15 posts
|
|
|
|
skyboy
1230 posts
|
uhh… the alt key doesn’t do anything unless you program an action for when it’s pressed?
|
|
|
kinglynx
342 posts
|
dnt use go to and stop if you have stop actions on frames… either take the stop actions away or change it to gotoand play
|
|
|
skyboy
1230 posts
|
stop + stop = stop, stop + play = stop; i don’t see an issue, unless there’s a play(); below the stop();
|
|
|
kinglynx
342 posts
|
|
|
|
Mascimo
15 posts
|
|
|
|
Nabb
987 posts
|
If don’t want anything complicated, you can’t stop that :P
|
|
|
Mascimo
15 posts
|
Stop what?
What are you guys talking about?
|
|
|
Pimgd
725 posts
|
If you don`t want complicated code, then it’s gonna be hard to stop them.
|
|
|
Mascimo
15 posts
|
That sucks.
skyboy said;
uhh… the alt key doesn’t do anything unless you program an action for when it’s pressed?
I couldn’t program an action for alt because I haven’t find it’s keycode in any list. Isn’t the alt key reserved to the compiler, for security matters?
|
|
|
Pimgd
725 posts
|
I don`t know. There ought to be a keycode chart somewhere. Found it. 18 is the keycode. I believe.
|
|
|
Cervello
76 posts
|
A good catch-all anti-cheat method for a mouse game like that would be to test to see how far the mouse moved from its last position.
I coded up an an example that catches all mouse movements of more than 50 pixels. Tested and works like a charm – get the working .fla here. (You may want to raise/lower the threshold, since it may have false positives for really fast movements – but then again, who would flick the mouse around that fast in a precision game?)
This way, it doesn’t matter if they use right click, alt, move outside the screen, or do whatever other mouse movement cheat – if the mouse moves too fast or too far, this’ll catch it. Oh, and you can let players use the right click menu and stuff or accidentally hit alt without fear of mouse jumping.
Oh, and for future reference, you can find all the key codes here (there’s a table at the bottom)
|
|
|
Mascimo
15 posts
|
Thanks everyone.
I used the alt keycode, though Cervello’s Idea is the best. Check out the game now, I revised it, and please check the credits ;)
|