Print Page | Close Window

Auto BackUp Maps

Printed From: Mirage Source
Category: Tutorials
Forum Name: Temporary Archive (Read Only)
Forum Discription: Temporary 3.0.3 archive tutorials, will be deleted when converted.
URL: http://ms.shannaracorp.com/backup-forums/forum_posts.asp?TID=171
Printed Date: 20 December 2006 at 5:52pm
Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com


Topic: Auto BackUp Maps
Posted By: Sync
Subject: Auto BackUp Maps
Date Posted: 11 February 2006 at 3:15pm
Name: Back Up Maps
By: Dark Dragon
Reason: Some SOB 'hacked' my game and F'd all the maps

All server side

1. Make a folder in your server called "backup_maps" without the ""
2. Search for "Sub SaveMap(ByVal MapNum As Long)" with without the ""
3. Under that sub add


Sub BackupMap(ByVal MapNum As Long)
Dim FileName As String
Dim f As Long

    FileName = App.Path & "\backup_maps\map" & MapNum & ".dat"
        
    f = FreeFile
    Open FileName For Binary As #f
        Put #f, , Map(MapNum)
    Close #f
End Sub

Sub BackupMaps()
Dim FileName As String
Dim i As Long
Dim f As Long

    For i = 1 To MAX_MAPS
        Call BackupMap(i)
    Next i
End Sub


4. Find "Call SaveMap(MapNum)" w/o the ""
5. under that add

       Call BackupMap(MapNum)

6. now in Sub DestroyServer, under
Call SaveAllOnlinePlayers


add
    Call SetStatus("Backing Up all Maps...")
    Call BackupMaps


there.... it should work now, atlest it does for me and it saves map on submit and all maps on shutdown

--edit--
i just realized this would do nothing if  hacker attacked because it would make a copy of the messed files, anyone want to help?

i had an idea, have a backup_maps/&&DATEBACKEDUP&&/map0.dat

would that work?



Print Page | Close Window

Bulletin Board Software by Web Wiz Forums version 8.01 - http://www.webwizforums.com
Copyright ©2001-2006 Web Wiz Guide - http://www.webwizguide.info