Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedhack #21

Closed
peonso opened this issue Aug 21, 2014 · 12 comments
Closed

Speedhack #21

peonso opened this issue Aug 21, 2014 · 12 comments
Labels
Projects
Milestone

Comments

@peonso
Copy link
Collaborator

peonso commented Aug 21, 2014

While moving with keyboard, you keep right clicking on map to move in the same direction (never stop pressing key arrows), your character like speed hack while doing it. It's like a map click speed hack where people use the ground when they walk.

Better described here http://otland.net/threads/speed-hacking.7418/

@Ezzz-dev Ezzz-dev added bug and removed bug labels Aug 23, 2014
@peonso
Copy link
Collaborator Author

peonso commented Sep 19, 2014

If someone ever got interested in this.

"you have to add a condition delay when player starts to autowalk,
mostly in game.cpp when player tries to use item that's far away
add a condition delay in there"

@babymannen
Copy link

Effective way to prevent this is:

in Game::PlayerUseItem(...)

Under:

Thing* thing = internalGetThing(player, pos, stackPos, spriteId, STACKPOS_USEITEM);

add:

player->lastStepCost = 3;

@tarantonio
Copy link
Contributor

This is client related, not server related, AFAIK

@gesior
Copy link

gesior commented Jul 28, 2015

This is because when you map click server take control over your character [click just once, don't have to click it more, when you click more, you can think that you run faster, because of 'character animation lag' in client, but speed is same) .

It's not 'hacking' anything. It just run with 'character' speed - ignore ping, keyboard delay, Windows input delay.. everything. There is no way to run with keyboard as fast as you can with map click.

EDIT:
.. and there is no way to slow it down. Reduce speed by X % when you run by map click? Stupid..

@Pietia10
Copy link

Gesior , not exactly on Cipsoft Tibia it's not the case you run at same speed when you map click and when you walk with keyboard it doesn't make any difference at all so there is a way to address this .
babymannen fix fixes this problem but is generating three new ones which are presented here: opentibia/server#52

@peonso peonso added bug and removed enhancement labels Jul 25, 2016
@peonso peonso modified the milestone: Version 0.0.3 Jul 25, 2016
@Anastaciaa
Copy link

Anastaciaa commented Aug 2, 2016

This issue is more like client side and this is fixed in OTC

@gesior
Copy link

gesior commented Aug 2, 2016

Anyone checked what packets and with what time between them server receive when you 'speed hack'? Is there any other situation when we get this kind of packets (hotkey spam or something)?
If we can't fix it, maybe we can detect that 'bad behavior' and punish (lastStep = 3) players that use this cheat?
On my medium level war server I detected somehow speed hackers and paralyze them for using this cheat, but I don't remember how it worked.. it was 5 years ago.

OTS got some schedule of actions (like make next step, onThink events and many others) and as we know 'delayed events' is not a good way to run things when miliseconds matter [checkout otservlist.org server start countdown, refresh site after minute.. JS setTimeout lost somehow few seconds! wtf?].

Maybe normal character, when you run by arrows or map click is not running full speed? Maybe it lose 5-10 ms per step? Stop movement for 5 ms, so you can't see that, but after some distance, you will see that you should run there in 1.54 sec and it takes 1.65.

If it's true, solution would be some event that trigger every milisecond and check if player can move (got queued steps).

@peonso
Copy link
Collaborator Author

peonso commented Sep 30, 2016

Made some tests today, opened another client and saw the character moving in the other screen. It doesn't seem to speedhack at all, the character moves smoothly, making this bug probably just a visual glitch in client.

@peonso
Copy link
Collaborator Author

peonso commented Oct 13, 2016

Confirming speedhack, Youtube video:

Youtube Speedhack test video.

function onStepIn(cid, item, pos)
    local STORAGE_SPEEDHACK = 53412
    local walk_time = 200
    if getPlayerStorageValue(cid, STORAGE_SPEEDHACK) > 1 then
        walk_time = getPlayerStorageValue(cid, STORAGE_SPEEDHACK)
    end
    setPlayerStorageValue(cid, STORAGE_SPEEDHACK, os.clock()) 
    walk_time = os.clock() - walk_time
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, walk_time)

    return true
end

@peonso peonso modified the milestones: Version 1.0, Version 0.0.3 Oct 31, 2016
@peonso peonso removed this from the Version 1.0 milestone Jul 1, 2017
@tarantonio
Copy link
Contributor

tarantonio commented Aug 16, 2017

Maybe a look at this tip can solve the bug?
https://otland.net/threads/fixed-right-click-speed-hack-fix-othire.253595/

@peonso
Copy link
Collaborator Author

peonso commented Aug 17, 2017

@tarantonio gonna test later. Saving this, REALLY DON'T WANNA RISK TO LOSE THIS ANYHOW.

Add this to your playerUseItem

if(player->eventWalk!=0){
player->lastStepCost=2;
}

@peonso
Copy link
Collaborator Author

peonso commented Aug 27, 2017

@tarantonio
worked, kinda busy with my server, I'm making issues and comments, when I got time gonna do proper commits.

@peonso peonso added this to the Version 1.0 milestone Sep 3, 2017
@peonso peonso added this to To Do in OTHire 1.0 Sep 3, 2017
@peonso peonso closed this as completed in c8f25d8 Sep 3, 2017
@peonso peonso moved this from To Do to Done in OTHire 1.0 Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

7 participants