Advertisement
Guest User

Untitled

a guest
May 4th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.91 KB | None | 0 0
  1. #Region " List Configurations "
  2. Public Sub PopulateLists()
  3. 'Populate the login list
  4. Login_List.Add("login_ip: " & lin_LOGIN_IP.Text)
  5. Login_List.Add("login_port: " & lin_LOGIN_PORT.Text)
  6. If _Bindset.Checked = True Then Login_List.Add("bind_ip: " & lin_bindset.Text)
  7. If lin_timestamp_check.Checked = True Then Login_List.Add("timestamp_format: " & lin_timestamp.Text)
  8. Login_List.Add("allowed_reg: " & lin_accreg1.Text)
  9. Login_List.Add("time_allowed: " & lin_accreg2.Text)
  10. Login_List.Add("min_level_to_connect: " & lin_GMconnect.Value.ToString)
  11. Login_List.Add("admin_state: " & lin_remadmin.Checked.ToString)
  12. Login_List.Add("admin_pass: " & lin_LADMIN_p.Text)
  13. Login_List.Add("admin_allowed_host: " & lin_LADMIN_i.Text)
  14. Login_List.Add("check_client_version: " & lin_client_ch.Checked.ToString)
  15. Login_List.Add("client_version_to_connect: " & lin_client.Text)
  16. Login_List.Add("account.engine: " & lin_accteng.SelectedItem.ToString)
  17.  
  18. Login_List.Add("account.sql.db_hostname: " & lin_SQLIP.Text)
  19. Login_List.Add("account.sql.db_port: " & lin_SQLPT.Text)
  20. Login_List.Add("account.sql.db_username: " & lin_SQLU.Text)
  21. Login_List.Add("account.sql.db_password: " & lin_SQLP.Text)
  22. Login_List.Add("account.sql.db_database: " & lin_SQLD.Text)
  23. Login_List.Add("console: " & lin_console.Checked.ToString)
  24.  
  25. Dim IG As Boolean = False
  26. If lin_IG_MF.Checked = True Then
  27. IG = False
  28. Else
  29. IG = True
  30. End If
  31.  
  32. Login_List.Add("new_account: " & IG.ToString)
  33. Login_List.Add("log_login: " & lin_loginlog.Checked.ToString)
  34. '0-5
  35. '0 is + 1
  36. '1 is + 2
  37. '2 is + 4
  38. '3 is + 8
  39. '4 is + 16
  40. '5 is + 32
  41. Dim x As Integer = 0
  42.  
  43. If lin_disp.GetItemChecked(0) = True Then x += 1
  44. If lin_disp.GetItemChecked(1) = True Then x += 2
  45. If lin_disp.GetItemChecked(2) = True Then x += 4
  46. If lin_disp.GetItemChecked(3) = True Then x += 8
  47. If lin_disp.GetItemChecked(4) = True Then x += 16
  48. If lin_disp.GetItemChecked(5) = True Then x += 32
  49.  
  50. Login_List.Add("min_level_to_connect: " & x)
  51. x = 0
  52. 'Dim y As Integer = Login_List.Count - 1
  53. programLog("Items in login list:")
  54. For Each item As String In Login_List
  55. programLog(item)
  56. Next
  57.  
  58. programLog("Populating Log_List...")
  59. If log_it1.GetItemChecked(0) = True Then x += 2
  60. If log_it1.GetItemChecked(12) = True Then x += 4
  61. If log_it1.GetItemChecked(1) = True Then x += 8
  62. If log_it1.GetItemChecked(2) = True Then x += 16
  63. If log_it1.GetItemChecked(3) = True Then x += 32
  64. If log_it1.GetItemChecked(4) = True Then x += 64
  65. If log_it1.GetItemChecked(5) = True Then x += 128
  66. If log_it1.GetItemChecked(6) = True Then x += 256
  67. If log_it1.GetItemChecked(7) = True Then x += 512
  68. If log_it1.GetItemChecked(8) = True Then x += 1024
  69. If log_it1.GetItemChecked(9) = True Then x += 2048
  70. If log_it1.GetItemChecked(10) = True Then x += 4096
  71. If log_it1.GetItemChecked(11) = True Then x += 8192
  72. If x = 16382 Then x = 1
  73.  
  74. log_List.Add("enable_logs: " & x)
  75. log_List.Add("sql_logs: " & log_SQL.Checked.ToString)
  76.  
  77. 'Logging Filter
  78. 'Reset x
  79. x = 0
  80. 'Start the long GetItemChecked() crap
  81. If log_it2.GetItemChecked(0) = True Then x += 2
  82. If log_it2.GetItemChecked(1) = True Then x += 4
  83. If log_it2.GetItemChecked(2) = True Then x += 8
  84. If log_it2.GetItemChecked(3) = True Then x += 16
  85. If log_it2.GetItemChecked(4) = True Then x += 32
  86. If log_it2.GetItemChecked(5) = True Then x += 64
  87. If log_it2.GetItemChecked(6) = True Then x += 128
  88. If log_it2.GetItemChecked(7) = True Then x += 256
  89. If log_it2.GetItemChecked(8) = True Then x += 512
  90. If log_it2.GetItemChecked(9) = True Then x += 1024
  91. If log_it2.GetItemChecked(10) = True Then x += 2048
  92. 'Do a check
  93.  
  94. If x = 4094 Then x = 1
  95.  
  96. log_List.Add("log_filter: " & x)
  97. log_List.Add("refine_items_log: " & log_refine.Value.ToString)
  98. log_List.Add("rare_items_log: 100")
  99. log_List.Add("price_items_log: 1000")
  100. log_List.Add("amount_items_log: 100")
  101. log_List.Add("log_branch: " & log_db.Checked.ToString)
  102. log_List.Add("log_zeny: " & log_z.Value.ToString)
  103. log_List.Add("log_mvpdrop: " & log_mvp.Checked.ToString)
  104. log_List.Add("log_gm: " & log_cmd.Value.ToString)
  105. log_List.Add("log_npc: 0")
  106.  
  107. 'Oh boy, more logging shit! Log chat filters...
  108. 'reset x again
  109. x = 0
  110. If log_chatlog.GetItemChecked(0) = True Then x += 2
  111. If log_chatlog.GetItemChecked(1) = True Then x += 4
  112. If log_chatlog.GetItemChecked(2) = True Then x += 8
  113. If log_chatlog.GetItemChecked(3) = True Then x += 16
  114. If log_chatlog.GetItemChecked(4) = True Then x += 32
  115. If log_chatlog.GetItemChecked(5) = True Then x += 64
  116. If x = 126 Then x = 1
  117. log_List.Add("log_chat: " & x)
  118. log_List.Add("log_branch_db: branchlog")
  119. log_List.Add("log_pick_db: picklog")
  120. log_List.Add("log_zeny_db: zenylog")
  121. log_List.Add("log_mvpdrop_db: mvplog")
  122. log_List.Add("log_gm_db: atcommandlog")
  123. log_List.Add("log_npc_db: npclog")
  124. log_List.Add("log_chat_db: chatlog")
  125. log_List.Add("log_branch_file: log/branchlog.log")
  126. log_List.Add("log_pick_file: log/picklog.log")
  127. log_List.Add("log_zeny_file: log/zenylog.log")
  128. log_List.Add("log_mvpdrop_file: log_mvplog.log")
  129. log_List.Add("log_gm_file: log/atcommandlog.log")
  130. log_List.Add("log_npc_file: log/npclog.log")
  131. log_List.Add("log_chat_file: log/chatlog.log")
  132.  
  133. programLog("Finished, log_list contains:")
  134. For Each item As String In log_List
  135. programLog(item)
  136. Next
  137. x = 0
  138.  
  139. programLog("Populationg Char_list..")
  140. char_List.Add("userid:" & chr_COMM_U.Text)
  141. char_List.Add("password:" & chr_COMM_P.Text)
  142. char_List.Add("wisp_server_name: " & chr_SVNAME.Text)
  143. char_List.Add("login_ip: " & chr_LOGIN_IP.Text)
  144. char_List.Add("login_port: " & chr_LOGIN_PORT.Text)
  145. If _Bindset.Checked = True Then char_List.Add("bind_ip: " & chr_bindset.Text)
  146.  
  147. char_List.Add("char_ip: " & chr_CHAR_IP.Text)
  148. char_List.Add("char_port: " & chr_CHAR_PORT.Text)
  149. If chr_timestamp_ch.Checked = True Then char_List.Add("timestamp_format: " & chr_timestamp.Text)
  150. char_List.Add("stdout_with_ansisequence: no")
  151.  
  152. 'We have more console crap, so gotta do the adding up shit.
  153.  
  154. If chr_disp.GetItemChecked(0) = True Then x += 1
  155. If chr_disp.GetItemChecked(1) = True Then x += 2
  156. If chr_disp.GetItemChecked(2) = True Then x += 4
  157. If chr_disp.GetItemChecked(3) = True Then x += 8
  158. If chr_disp.GetItemChecked(4) = True Then x += 16
  159. If chr_disp.GetItemChecked(5) = True Then x += 32
  160.  
  161. char_List.Add("console_silent: " & x)
  162. char_List.Add("console: " & chr_console.Checked)
  163. char_List.Add("char_maintenance: " & chr_servtpe.SelectedIndex.ToString)
  164. char_List.Add("char_new: " & chr_cre.Checked)
  165. char_List.Add("char_new_display: " & chr_new.Checked)
  166. char_List.Add("max_connect_user: " & chr_usrmx.Value.ToString)
  167. char_List.Add("gm_allow_level: " & chr_GMBP.Value.ToString)
  168. char_List.Add("autosave_time: " & chr_AS.Value.ToString)
  169. char_List.Add("save_log: " & chr_logsav.Checked)
  170.  
  171. char_List.Add("char_txt: save/athena.txt")
  172. char_List.Add("friends_txt: save/friends.txt")
  173.  
  174. char_List.Add("start_point: " & chr_startmap.Text & "," & chr_startX.Value & "," & chr_startY.Value)
  175. char_List.Add("start_weapon: " & chr_start_w.Text)
  176. char_List.Add("start_armor: " & chr_start_a.Text)
  177. char_List.Add("start_zeny: " & chr_start_z.Text)
  178.  
  179. char_List.Add("fame_list_alchemist: " & chr_fame.Value)
  180. char_List.Add("fame_list_blacksmith: " & chr_fame.Value)
  181. char_List.Add("fame_list_taekwon: " & chr_fame.Value)
  182.  
  183. char_List.Add("guild_exp_rate: " & chr_gexp.Value)
  184. char_List.Add("unknown_char_name: " & chr_unnamed.Text)
  185.  
  186. char_List.Add("log_char: " & chr_chrlog.Checked)
  187. char_List.Add("char_log_filename: log/char.log")
  188. char_List.Add("name_ignoring_case: " & chr_ignore.Checked)
  189.  
  190. char_List.Add("char_name_option: " & chr_lim_t.SelectedIndex.ToString)
  191. char_List.Add("char_name_letters: " & chr_lim_chr.Text)
  192.  
  193. char_List.Add("char_rename: " & chr_en_rename.Checked)
  194. char_List.Add("chars_per_account: " & chr_limit.Value.ToString)
  195. char_List.Add("char_del_level: " & chr_ndel.Value.ToString)
  196. char_List.Add("db_path: db")
  197.  
  198. char_List.Add("online_txt_filename: online.txt")
  199. char_List.Add("online_html_filename: online.html")
  200. char_List.Add("online_sorting_option: 0")
  201. char_List.Add("online_display_option: 1")
  202. char_List.Add("online_gm_display_min_level: 20")
  203. char_List.Add("online_refresh_html: 20")
  204.  
  205. x = 0
  206. programLog("Char_list populated, printing contents..")
  207. For Each item As String In char_List
  208. programLog(item)
  209. Next
  210.  
  211. programLog("Populating map_list")
  212.  
  213. 'Ok, let's get the maps done...sonofabitch.
  214. Map_list.Add("userid: " & chr_COMM_U.Text)
  215. Map_list.Add("passwd: " & chr_COMM_P.Text)
  216.  
  217. Map_list.Add("char_ip: " & map_chr_IP.Text)
  218. Map_list.Add("char_port: " & map_chr_PORT.Text)
  219. If _Bindset.Checked = True Then Map_list.Add("bind_ip: " & map_BIND.Text)
  220. Map_list.Add("map_port: " & map_PORT.Text)
  221.  
  222. If map_tstamp_c.Checked = True Then Map_list.Add("timestamp_format: " & map_tstamp.Text)
  223.  
  224. Map_list.Add("stdout_with_ansisequence: no")
  225.  
  226. If map_disp.GetItemChecked(0) = True Then x += 1
  227. If map_disp.GetItemChecked(1) = True Then x += 2
  228. If map_disp.GetItemChecked(2) = True Then x += 4
  229. If map_disp.GetItemChecked(3) = True Then x += 8
  230. If map_disp.GetItemChecked(4) = True Then x += 16
  231. If map_disp.GetItemChecked(5) = True Then x += 32
  232. Map_list.Add("console_silent: " & x)
  233. x = 0
  234.  
  235. Map_list.Add("map_cache_file: db/map_cache.dat")
  236. Map_list.Add("db_path: db")
  237. Map_list.Add("enable_spy: no")
  238. Map_list.Add("console: " & map_console.Checked)
  239. Map_list.Add("use_grf: " & map_grf.Checked)
  240.  
  241. Map_list.Add("autosave_time: " & map_autosave.Text)
  242. Map_list.Add("minsave_time: 100")
  243.  
  244.  
  245. If map_savebox.GetItemChecked(0) = True Then x += 1
  246. If map_savebox.GetItemChecked(1) = True Then x += 2
  247. If map_savebox.GetItemChecked(2) = True Then x += 4
  248. If map_savebox.GetItemChecked(3) = True Then x += 8
  249. If map_savebox.GetItemChecked(4) = True Then x += 16
  250. If map_savebox.GetItemChecked(5) = True Then x += 32
  251. If map_savebox.GetItemChecked(6) = True Then x += 64
  252.  
  253. Map_list.Add("save_settings: " & x)
  254. Map_list.Add("motd_txt: conf/motd.txt")
  255. Map_list.Add("help_txt: conf/help.txt")
  256. Map_list.Add("help2_txt: conf/help2.txt")
  257. Map_list.Add("charhelp_txt: conf/charhelp.txt")
  258.  
  259. 'Finally, a loop to get all the listbox values.
  260.  
  261. For Each item As String In map_lister.Items
  262. Map_list.Add("map: " & item)
  263. Next
  264. x = 0
  265. programLog("Finished map_list, printing contents")
  266. For Each item As String In Map_list
  267. programLog(item)
  268. Next
  269. 'We're idle, all finished.
  270.  
  271.  
  272. End Sub
  273. #End Region
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement