• Log in or sign up for an account here: https://www.sythe.org/login

[Source] Skull Timer

Blupig

BEEF TOILET

$5 USD Donor
Joined
Nov 23, 2006
Sythe Gold
1,609
Messages
7,145
Age
33
Location
Canada
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
[Source] Skull Timer
You need:
1 Textbox (txtSeconds)
To enable the Timer1, just put a command button in, and it's code would be:
Code:
Private Sub Command1_Click()
Timer1.Enable = True
End Sub

To make the timer count down from 20 minutes, add this in your Form Load()
Code:
Private Sub Form_Load()
txtSeconds.Text = "1200"
End Sub

Code:
Private Sub Timer1_Timer()

If txtSeconds.Text > 0 Then
txtSeconds.Text = txtSeconds.Text - 1
Else
txtSeconds.Text = 59
End If

If txtSeconds.Text = 0 Then
Timer1.Enabled = False
MsgBox "The skull timer has gone through it's cycle.", vbCritical = vbOKOnly, "Skull Timer Source by Blupig"
End If
End Sub


GIVE CREDEETZ >:3
This was originally made by Timk77, but his version didn't work so I modded it.
 
[Source] Skull Timer
It seems like it only counts 59 seconds?
 
[Source] Skull Timer
That would appear to only count 59 seconds. And I believe a skull stays around for 20 minutes. If you want a sample source let me know
 
[Source] Skull Timer
Code:
Private Sub Command1_Click()
    Timer1.Enabled = True
    Timer1.Interval = 1000
    txtSeconds.Text = 1200
End Sub

Private Sub Timer1_Timer()

If txtSeconds.Text > 0 Then
    txtSeconds.Text = txtSeconds.Text - 1
Else
    txtSeconds.Text = 1200
End If

If txtSeconds.Text = 0 Then
    Timer1.Enabled = False
    MsgBox "The skull timer has gone through it's cycle.", vbCritical = vbOKOnly, "Skull Timer Source by Blupig"
End If

End Sub

If you want to learn here's a working one I just whipped up.
 
[Source] Skull Timer
Code:
Private Sub Command1_Click()
Timer1.Enabled = True
Text1.Text = Text1.Text & 60
Text2.Text = Text2.Text & 20
End Sub

Private Sub Timer1_Timer()

If Text1.Text > 0 Then
Text1.Text = Text1.Text - 1
End If

If Text1.Text = 0 Then
    Text1.Text = Text1.Text + 60
    Text2.Text = Text2.Text - 1
    
End If

If Text2.Text = 0 And Text1.Text = 1 Then
    MsgBox "The Skull Timer Has Ended!", vbInformation, "Skull Timer Ended"
    Timer1.Enabled = False
End If
End Sub

My noob source :D

EDIT: Text1 is seconds and text2 is mins
 
[Source] Skull Timer
Wow Sucks, i fixed your source so that when you click command1 it disables command1 so you cant fuck it up when its counting down. This one fully works! :p


Code:
Private Sub command1_Click()
Timer1.Enabled = True
Text1.Text = Text1.Text & 60
Text2.Text = Text2.Text & 20
command1.Enabled = False
End Sub

Private Sub Form_Load()

End Sub

Private Sub Timer1_Timer()

If Text1.Text > 0 Then
Text1.Text = Text1.Text - 1
End If

If Text1.Text = 0 Then
    Text1.Text = Text1.Text + 60
    Text2.Text = Text2.Text - 1
    
End If

If Text2.Text = 0 And Text1.Text = 1 Then
    MsgBox "The Skull Timer Has Ended!", vbInformation, "Skull Timer Ended"
    Timer1.Enabled = False
    command1.Enabled = True
End If
End Sub
 
[Source] Skull Timer
WoW Sucks, put this in the Command1 Sub.
Code:
Timer1.Enabled = True
Text1.Text = 60
Text2.Text = 20
Command1.Enabled = False
See, having the "Text1.Text &" could screw it up, if the user clicks it more than once you could have Text1 saying "20202020202019" or something. Not that it matters if the button is disabled. =P But for future reference. =)
 
[Source] Skull Timer
ooo ill try this, thanks
 
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
[Source] Skull Timer
Actually no, my source code is right - You just need to set the original value of the textbox to 1200 (this timer counts down in seconds). I'll add it to the code.
 
[Source] Skull Timer
Or how about all in one label.

1 Label - Name: lblNoSkull Caption: 20:00
1 Timer - Name: Timer2Skull Interval: 1000

Code:
Private Sub Timer2Skull_Timer()
Dim Mins As Integer, Secs As Integer
Mins = Split(lblNoSkull.Caption, ":")(0)
Secs = Split(lblNoSkull.Caption, ":")(1)
If Secs > 0 Then
    Secs = Secs - 1
Else
    Mins = Mins - 1
    Secs = "59"
End If
Secs = Format(Secs, "0#")
Mins = Format(Mins, "0#")
lblNoSkull.Caption = Mins & ":" & Secs
If lblNoSkull.Caption = "00:00" Then MsgBox "Skull Times Up!!", vbInformation = vbOKOnly, "Skull Over"
End Sub
 
Runescape Gamblingrunescape gambling
Back
Top