home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / AGSBF10.ZIP / BF_STRUC.AGS < prev    next >
Text File  |  1994-12-27  |  7KB  |  186 lines

  1. ; AEGiS CoRP Battle Field - Data file structure
  2. ; -----------------------------------------------------------------------------
  3. ;
  4. ; This file format may be freely used by anybody.
  5. ; Anybody may put new topics ([...]) provided that it doesn't disturb
  6. ; any other program that share those files
  7. ;
  8. ; This file structure is a good way to share datas on different users
  9. ; especially because the algorythm for the filename creation provide a pretty
  10. ; good way to make one file for one user without computing a CRC (available
  11. ; only to PPLC 3.0)
  12. ;
  13. VINCENT NEGRIER         ; User Name
  14. 132                     ; Credits left
  15. [iS_HaTiNG]             ; Block Header [iS_HaTiNG]
  16. oLiVieR LaNGLoiS        ;       \ List of hated 
  17. BiSouNouRS NuaGe        ;       / users
  18. [eND]                   ; End of block [is_hating]
  19. [iS_HaTeD_BY]           ; Block Header [iS_HaTeD_BY]
  20. FRaNCiS GaSTeLLu        ;       Liste of user that hate this one
  21. [eND]                   ; End of block [iS_HaTeD_BY]
  22. [MeSSaGeS_WaiTiNG]      ; Block Header [MeSSaGeS_WaiTiNG]
  23. [BeGiN_MeSSaGe]         ;       Block Header [BeGiN_MeSSaGe]
  24. AGS BaTTLe FieLD        ;               Sender's name
  25. 0                       ;               Anonymous ? (0 = No, 1 = Yes)
  26. YouR BRiBe TRy WiTH     ;               Message - Line 1
  27. FRANCIS GASTELLU        ;               2
  28. WaS SuCCeSSFuL !        ;               3
  29.                         ;               4 All messages must be 16 lines long
  30.                         ;               5 All lines must be 22 chars long max!
  31. LeT'S HoPe THaT THe GuY ;               6
  32. WiLL NoT oNLY TaKE      ;               7
  33. THe CReDiTZ !           ;               8
  34.                         ;               9 
  35.                         ;               10
  36.                         ;               11
  37.                         ;               12
  38.                         ;               13
  39.                         ;               14
  40.                         ;               15
  41.                         ;               16
  42. [eND_MeSSaGe]           ;       End of block [BeGiN_MeSSaGe]
  43. [eND]                   ; End of block [MeSSaGeS_WaiTiNG]
  44. [BRiBe_GiFT]            ; Block Header [BRiBe_GiFT]
  45. [BeGiN_BRiBe_GiFT]      ;       Block Header [BeGiN_BRiBe_GiFT]
  46. FRaNCiS GaSTeLLu        ;               Sender's name
  47. 0                       ;               Anonymous ? (0 = No, 1 = Yes)
  48. 100                     ;               Number of credits given
  49. Salut !                 ;               Attached message - line 1
  50. ligne 2                 ;               2
  51. 3                       ;               3
  52. 4                       ;               4 All messages must be 11 lines long
  53. 5                       ;               5 All lines must be 22 chars long max!
  54. 6                       ;               6
  55. 7                       ;               7
  56. 8                       ;               8
  57. 9                       ;               9
  58. 10                      ;               10
  59. Ligne 11                ;               11
  60. [eND_BRiBe_GiFT]        ;       End of block [BeGiN_BRiBe_GiFT]
  61. [eND]                   ; End of block [BRiBe_GiFT]
  62. [DeCLaRaTioNS]          ; Block Header [DeCLaRaTIoNS]
  63. [BeGiN_DeCLaRaTioN]     ;       Block Header [BeGiN_DeCLaRaTioNS]
  64. FRaNCiS GaSTeLLu        ;               Sender's name
  65. 0                       ;               Anonymous ? (0 = No, 1 = Yes)
  66. The sysop has a very    ;               Attached message - ligne 1
  67. small dick ! :)         ;               2
  68.                         ;               3
  69.                         ;               4 All messages must be 11 lines long
  70.                         ;               5 All lines must be 22 chars long max!
  71.                         ;               6
  72.                         ;               7
  73.                         ;               8
  74.                         ;               9
  75.                         ;               10
  76.                         ;               11
  77. [eND_DeCLaRaTioN]       ;       End of block [BeGiN_DeCLaRaTioNS]
  78. [eND]                   ; End of block [DeCLaRaTioNS]
  79. [eND_DaTa]              ; End of file
  80. ;                       
  81. ;
  82. ; All topics between brackets (ie : [eND]) are CASE SENSITIVE...
  83. ; There may be an unlimited number of msgs in the blocks [MeSSaGeS_WaiTiNG], 
  84. ; [BRiBe_GiFT] and [DeCLaRaTioN].
  85. ;
  86. ; Blocks may be in random order... All sub-blocks must reside within it's
  87. ; main block ([BeGiN_DeCLaRaTioN] must be between [DeCLaRaTioNS] and [eND])
  88. ;
  89. ; Any block must be UNIQUE! 
  90. ;
  91. ; The filename is built as follow :
  92. ;
  93. ; The name of the user must be uppercase without any trailing or leading
  94. ; space. Take now the 3 firsts letters of this string, and the 4 lasts... 
  95. ; ie :
  96. ;
  97. ; VINCENT NEGRIER -> VINRIER
  98. ;
  99. ; Then add all ascii of each char that make the name and convert in hex...
  100. ; ie :
  101. ;
  102. ; VINCENT NEGRIER -> 1091 -> 443h
  103. ;
  104. ; End the filename with the result... 
  105. ;
  106. ; ie :
  107. ;
  108. ; VINCENT NEGRIER -> VINRIER4.43
  109. ;
  110. ; This algorythm allow to have 2 users that have the same heading and 
  111. ; trailing letters that have 2 different files
  112. ;
  113. ; All those files are in the DATA subdirectory
  114. ;
  115. ; In the AGSBF directory are those files :
  116. ;
  117. ; USER.LST      -> List of all BBS users in MiXeD CaSe
  118. ; TOTAL.DAT     -> # of users in USER.LST
  119. ; REGD.DAT      -> List of all AGSBF users
  120. ; NUSERS.DAT    -> # of users in REGD.DAT
  121. ; WAR.CFG       -> Config file (see AGSBF.DOC)
  122. ; -+-
  123. ; Source code to make a filename with a user name :
  124. ;
  125. ;
  126. ; Variables used :
  127. ;
  128. ; Dest..................................User Name
  129. ; Temp..................................Work variable
  130. ; File..................................Resulting filename
  131. ; A.....................................Work variable
  132. ; B.....................................Work variable
  133. ;
  134. ;
  135. String Dest,Temp,File
  136. Integer b,a,btmp
  137.  
  138. ; Here we add all ascii values into b
  139. b = 0
  140. for a = 1 to len(Dest)
  141.     b = b + Asc(Mid(Dest,a,1))
  142. next
  143.  
  144. ; We change this value into an hex string
  145. Temp = I2s(b,16)
  146.  
  147. ; We replace any unallowed char with "_"
  148. Dest = Replace(Dest, ".", "_")
  149. Dest = Replace(Dest, "*", "_")
  150. Dest = Replace(Dest, "?", "_")
  151. Dest = Replace(Dest, "\", "_")
  152. Dest = Replace(Dest, "/", "_")
  153. Dest = Replace(Dest, ":", "_")
  154. Dest = Replace(Dest, ";", "_")
  155. Dest = Replace(Dest, ",", "_")
  156. Dest = Replace(Dest, "=", "_")
  157. Dest = Replace(Dest, "+", "_")
  158. Dest = Replace(Dest, chr(34), "_")
  159. Dest = Replace(Dest, "[", "_")
  160. Dest = Replace(Dest, "]", "_")
  161. Dest = Replace(Dest, "<", "_")
  162. Dest = Replace(Dest, ">", "_")
  163. for btmp = 0 to 31
  164. Dest = Replace(Dest, chr(btmp), "_")
  165. next
  166.  
  167. ; And we make the filename :)
  168. File = Trim(PPEPATH()+"DATA\"+LEFT(Trim(Dest," "),3)+RIGHT(Trim(Dest," "),4)+left(Temp,1)+"."+Mid(Temp,2,3)," ")
  169. ;
  170. ;
  171. ;
  172. ;
  173. ;
  174. ; If you use PCB 15.2 and PPLC 3.01, you may change this piece of code into a 
  175. ; function... this will make it much more easier to use...
  176. ;
  177. ;
  178. ;
  179. ; Well, I think you have everything you need to start coding some nice addons
  180. ; for the battle field :) I hope this will give some work for people that
  181. ; dunno what to code anymore... :)
  182. ;
  183. ;                                                  _.Lone Runner/AGS'94
  184.