Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Timers


Doom_real
 Share

Recommended Posts

I watched some tutorials but those are with timers on a form that can be enabled or not.I don't know how can i use that in Modcombat.
Im interested in that GetTickCount Robin just mentioned.Can you give me an example on how to use it or an tutorial that lean you how to use it please?
Link to comment
Share on other sites

Ok.I tried to make an code with GetTickCount.Like this:
```
                Case SPELL_TYPE_BUFF
                c = 1
                    If targetType = TARGET_TYPE_PLAYER Then
                        Do While c < 4
                            If Vital > 0 Then
                              If Tick > msg Then
                                SendActionMsg GetPlayerMap(index), "haha", Red, 1, (GetPlayerX(index) * 32), (GetPlayerY(index) * 32)
                                c = c + 1
                                msg = GetTickCount + 5000
                              End If

                            End If
                        Loop
                    Else

                                PlayerMsg index, "Invalid target.", BrightRed

                    End If
```
I initialized all variables c,Tick and msg As Long.When i tried to see if i get the Action message every 5 secs for 4 times my server crash.It give me a don't sent error.Probably from an infinite loop or something.
Can you please tell me whats wrong in this timer? :embarrassed:
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...