+ Reply to Thread
Results 1 to 4 of 4

  Click here to go to the first staff post in this thread.   Thread: Change the Time

  1. #1
    Join Date
    Jan 2008
    Location
    Kynox's sister's bedroom
    Posts
    810
    Thanks
    1
    Thanked 5 Times in 4 Posts
    Rep Power
    80

    Change the Time

    Code:
    .data:0093ECF0                 dd offset aGetgametime  ; "GetGameTime"
    .data:0093ECF4                 dd offset sub_692DA0
    Code:
    .text:00692DA0 sub_692DA0      proc near               ; DATA XREF: .data:0093ECF4o
    .text:00692DA0
    .text:00692DA0 var_C           = qword ptr -0Ch
    .text:00692DA0 arg_0           = dword ptr  8
    .text:00692DA0
    .text:00692DA0                 push    ebp
    .text:00692DA1                 mov     ebp, esp
    .text:00692DA3                 fild    dword_C6FD34
    .text:00692DA9                 push    esi
    .text:00692DAA                 mov     esi, [ebp+arg_0]
    .text:00692DAD                 sub     esp, 8
    .text:00692DB0                 fstp    [esp+0Ch+var_C]
    .text:00692DB3                 push    esi             ; int
    .text:00692DB4                 call    sub_8215B0
    .text:00692DB9                 fild    dword_C6FD30
    .text:00692DBF                 add     esp, 4
    .text:00692DC2                 fstp    [esp+0Ch+var_C]
    .text:00692DC5                 push    esi             ; int
    .text:00692DC6                 call    sub_8215B0
    .text:00692DCB                 add     esp, 0Ch
    .text:00692DCE                 mov     eax, 2
    .text:00692DD3                 pop     esi
    .text:00692DD4                 pop     ebp
    .text:00692DD5                 retn
    .text:00692DD5 sub_692DA0      endp
    .text:00692DD5
    Hours are stored at 'C6FD34', minutes are stored at 'C6FD30'.

    You can change it to pretty much anything you want, there are no checks to make sure that its a 'valid' time. Kinda pointless, just thought it was funny. :p


  2. #2
    Join Date
    Jan 2004
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    82
    Cool, here comes my weather mod rofl

  3. #3
    Join Date
    Dec 2005
    Posts
    1,295
    Thanks
    1
    Thanked 11 Times in 3 Posts
    Rep Power
    101
    Quote Originally Posted by V0gelz View Post
    Cool, here comes my weather mod rofl
    It's only changing the time displayed in this message, not the "real-virtual time" ( color of the sky, position of the sun / moon ).

    To find out how you can change the "real-virtual time" you can have a look at my base, it's done in an extra cpp file.

  4. #4
    Join Date
    Jan 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    3.0.3.9183", "diffrenceB2_TimeMin", "0x012dad10" ;Time Minutes
    3.0.3.9183", "diffrenceB2_TimeHour", "0x012dad14" ;Time Minutes
    3.0.3.9183", "diffrenceB2_TimeSpeed", "0x012DAD3C";Time Speed

    there are 1 more, can't remeber where but it makes the minute and hour adjustments apply instantly.
    You can also do it like WoWMachinima tool does it.


    Code:
    Func Action_Time()
    	If String($commandinput[$commandinput[0]]) = "time" Then
    		_report(_MemoryRead(($memoryTimeMin + 0x4), $DllInformation, 'int') & ":" & _MemoryRead($memoryTimeMin, $DllInformation, 'int'))
    		ConsoleWrite($memoryTimeMin)
    	Elseif String($commandinput[$commandinput[0]]) = "?" Then
    		_report("This value indicates the current time, use format: 'Hour:Minute' with : as seperator")
    		_report("Takes a few seconds before change is affected")
    
    	Else
    		$commandinputB = StringSplit($commandinput[2], ":")
    		_MemoryWrite(($memoryTimeMin + 0x4), $DllInformation, ($commandinputB[1]), 'int')
    		_MemoryWrite($memoryTimeMin, $DllInformation, ($commandinputB[2]), 'int')
    		_MemoryWrite($memoryTimeMin + 0x30, $DllInformation, 1, 'float') ;this part speeds up time to make the change happen instantly
    		_MemoryWrite($memoryTimeMin, $DllInformation, ($commandinputB[2]), 'int') ;this makes the minute that just passed by go back to the desired value.
    		_report("Time set to " & $commandinput[2])
    		
    	EndIf
    	Return
    EndFunc   ;==>Action_Time
    aka Malu05

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. I think it is time for your outlook to Change
    By streetmedic in forum Off Topic
    Replies: 65
    Last Post: 12-31-2009, 10:16 AM
  2. System Time
    By EJ12N in forum Beginner
    Replies: 7
    Last Post: 01-21-2005, 09:02 PM
  3. The time
    By SniperDevil in forum Public Admin forum
    Replies: 7
    Last Post: 01-20-2005, 12:48 PM
  4. Its time to change your homepages!
    By Jordon in forum Off Topic
    Replies: 11
    Last Post: 01-10-2005, 06:00 PM
  5. First Time OGL
    By CoCa CoLa in forum Gold Source/HL1 Engine
    Replies: 8
    Last Post: 12-28-2003, 07:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts