Time between attacks (5165)

09/02/2010 17:29 shini221#1
How do i change time between attacks on 5165? Finally i give up i can`t find that. In my server i can hit a mob every few secs or use fb/ss hercules any kind of skill. 1 at few secs 3 4 5... that piss me off

For those who`ll say get another source... I can`t i worked on this alot is very stable but can`t find that:D

Anyone??Pleaseee:handsdown:
09/02/2010 17:50 dowhatuwant#2
u need to make a check for when send the attack.
and when u can send again.
u could do it with a timer.
09/02/2010 19:53 pro4never#3
..... actually no.

For incoming attacks (to check vs speedhacking/botting etc)

You can either A: read the incoming timestamp (not the greatest option, proxy can bypass) or you can do a datetime for lastattack and check that vs current datetime to see if it's been long enough.

As for what you actually seem to be asking, your server should have some sort of timer or SOMETHING controling what your current target is.

Eg:

if(GC.MyChar.AttackInfo != null)
//code

This will have an attack speed value that's used for how often the attack is triggered (client only needs to send the attack packet once and the server will keep returning the attack packets as long as the client does not move/attack something else/mob dies)

You then need to remove this timer/attack info when the monster dies/moves/client does an action, etc.

You can use a simple int for the timer itself. Also take into account what the client state is. If you are using cyclone you need to / 3 it. SOA could be minor boost as well as other statuses as well.
09/03/2010 10:10 dowhatuwant#4
with timer i meant the datetime.