Improve Anti-KS

This section is created for developers and non-developers who think that he/she has a good (and realistic) idea that might contribute to the OpenKore community.

Moderator: Moderators

Message
Author
Scarya
Moderators
Moderators
Posts: 136
Joined: 26 May 2008, 12:25
Noob?: No

Improve Anti-KS

#1 Post by Scarya »

The Anti-KS system should be improved.
Sometimes if you teled and a monster is chasing a player but doesn't hit, kore can't recognize this as ksing (or am I missing something?). This will be useful for all range chars.

But how to solve the problem? Maybe analysis of player and monster movement like comparing move vectors.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots.
So far, the universe is winning.

Richard Cook

Wiki

Scarya
Moderators
Moderators
Posts: 136
Joined: 26 May 2008, 12:25
Noob?: No

Re: Improve Anti-KS

#2 Post by Scarya »

I thought a lot about this and my conclusion is the analysis of some vectors.
So first we should have the vector: monster->player [MP] (it''s the distance between monster and player)
Now we look at the moving direction of the monster we like to attack and compare it with MP.

So this can't be enough. We can calculate the angle between those vectors.
Image

If a (alpha) is lower than 60° the monster is probably chasing the player.

I hope somebody else can contribute on this.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe trying to produce bigger and better idiots.
So far, the universe is winning.

Richard Cook

Wiki

kali
OpenKore Monk
OpenKore Monk
Posts: 457
Joined: 04 Apr 2008, 10:10

Re: Improve Anti-KS

#3 Post by kali »

Remember that this equation will be recomputed more than a hundred times per second everytime there is a monster around. You might need a simplified version that would fuzz around the value (preferably using just modulus division and/or integers) and providing a good enough estimate.

Otherwise we'd be wasting a lot of cycles just to compute a relatively trivial detail.

Also, are we talking about a specific moment in time? I don't think even a human can judge if another player is chasing a monster as soon as he warps to that place. Perhaps we should just have a second of delay to "observe" their interaction and decide after that. I believe the current algo is: if player is moving towards the monster, that monster is tainted and should not be attacked.
Got your topic trashed by a mod?

Trashing topics is one click, and moving a topic to its proper forum is a lot harder. You expend the least effort in deciding where to post, mods expend the least effort by trashing.

Have a nice day.

markjames
Human
Human
Posts: 24
Joined: 16 Jun 2011, 04:48
Noob?: Yes

Re: Improve Anti-KS

#4 Post by markjames »

I have been facing the problem in player and monster movement like comparing move vectors?
PLZ, somebody tell me about this in detail as who can i improve?

erss
Noob
Noob
Posts: 6
Joined: 30 Jun 2009, 10:04
Noob?: Yes

Re: Improve Anti-KS

#5 Post by erss »

Well, there is also the problem where a mage is casting against a monster for the first time, and openkore ks it. Maybe it could somehow be solved if the bot waits a little before attacking a monster if such monster is in front of a fire wall, ice wall, etc to make sure such monster is not the one being attacked by the mage/wizard.

Post Reply