08-03-2007, 11:57 PM
Not sure it will help that much. I made something similar for my buff spells. In:
This will eliminate the possible timers you have, for example:
At the top add:
Then at the bottom add:
That will replace the tmrSpawnMapItems. But it wont make much difference. Could you give an example of a sub that you mean can be done this way? I know you mean a check if something is changed, thats just a matter of adding to the Rec.
Code:
Sub GameAI()
At the top add:
Code:
Dim XTickCount as Long, XFirst as Byte
Code:
If XFirst = 0 Then
XTickCount = GetTickCount
XFirst = 1
End if
' Make sure we reset the timer for door closing
If GetTickCount > XTickCount + 1000 Then
Call CheckSpawnMapItems
XFirst = 0
End If