Advertisement
Baoulettes

Lineage II Old skool launcher (just a backup unrelease) V2

Oct 17th, 2014
457
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SingleInstance force
  2. #Include %A_ScriptDir%\HttpQueryInfo.ahk
  3.  
  4. ; Application type and code started :
  5. ; 15th October 2014 by Baoulettes aka Joffrey Panisset
  6. ; Unauthorized use is forbidden.
  7. ; Lib used that isn't writen by Me remain to author and Authorization pending.
  8.  
  9. ;This script use "Runfirst" from :
  10. ;
  11. ;http://www.activeplus.com/Products/RunFirst
  12. ;
  13.  
  14. ; Gamemode Game <-> Dev console will be writen in Option.ini. No need to provide it in "L2OSCheckFileList.ini"
  15. ; Options modifier Is there to produce same effect than In game just with few little tweak:
  16. ; Change Fullscreen mode, Play on server or Dev console to discover Items, Map.
  17.  
  18. ; I suggest to Manualy update "L2OSConfig.ini"
  19. ; And put it in the Launcher file check ini.
  20. ; And so it will be better to see both version and that easier to manage.
  21. ; Also "L2OSServer.ini" and "L2OSConfig.ini" is the same files only name change.
  22.  
  23. ; In case of Launcher update it can happen, check Global variables to change Version.
  24. ; AppAuthor is there only as copyright things and it never seen on the application itself.
  25.  
  26. ; The source of code is provided to show I do but it can be used for learning process.
  27. ; A pure copy paste of the code isn't a learning process that is why I comment all part I could to explain how this work and help you later.
  28. ; Running this software as it will be useless for you but it can be modified to work on ANY game system or update system without requiring FTP access.
  29. ; So in case of hack/flaw in the code all your credencial are safe as it require NONE! :)
  30. ; Security first.
  31.  
  32. ; Data Used on compilation change path your path -(can't be variable path !)
  33. ; RunFirst is used only if "AltTabFix" is checked!
  34. FileInstall, D:\Softwares\AutoHotkey\L2 OS Launcher\runfirst.exe, %L2OSDIR%/System/runfirst.exe,1
  35.  
  36.  
  37. ; Global variable set / read from DLL :
  38.  
  39. Appname = Lineage ][ OS Launcher
  40. Appversion = 0.0.0b
  41. AppAuthor = Baoulettes
  42. CurrentStatut = Client Ready to play
  43. IniRead, LogoURL, L2OSLConf.dll, Setup, LogoUrl
  44. IniRead, ServerRoot, L2OSLConf.dll, Setup, ServerRoot
  45. IniRead, ServerFileCheckVersion, L2OSLConf.dll, Setup, ServerFileCheckVersion
  46. IniRead, Changelogsfiles, L2OSLConf.dll, Setup, Changelogsfiles
  47. IniRead, Checkfilelist, L2OSLConf.dll, Setup, Checkfilelist
  48. ; ServerRoot = http://baoulettesgalerie.site11.com
  49. ; ServerFileCheckVersion = http://baoulettesgalerie.site11.com/L2OSServer.ini
  50. ; Changelogsfiles = http://baoulettesgalerie.site11.com/L2OSlastlogs.ini
  51. ; Checkfilelist = http://baoulettesgalerie.site11.com/L2OSCheckFileList.ini
  52.  
  53. ; All "If" there check if the dll is present and correct. else just close the app.
  54. If ServerRoot = ERROR
  55. {
  56.     Msgbox Required dll is missing or conrupted : L2OSLConf.dll, App now fail to load.
  57.     ExitApp
  58. }
  59. If ServerRoot =
  60. {
  61.     Msgbox Required dll is missing or conrupted : L2OSLConf.dll, App now fail to load.
  62.     ExitApp
  63. }
  64. If ServerFileCheckVersion = ERROR
  65. {
  66.     Msgbox Required dll is missing or conrupted : L2OSLConf.dll, App now fail to load.
  67.     ExitApp
  68. }
  69. If ServerFileCheckVersion =
  70. {
  71.     Msgbox Required dll is missing or conrupted : L2OSLConf.dll, App now fail to load.
  72.     ExitApp
  73. }
  74. If Changelogsfiles = ERROR
  75. {
  76.     Msgbox Required dll is missing or conrupted : L2OSLConf.dll, App now fail to load.
  77.     ExitApp
  78. }
  79. If Changelogsfiles =
  80. {
  81.     Msgbox Required dll is missing or conrupted : L2OSLConf.dll, App now fail to load.
  82.     ExitApp
  83. }
  84. If Checkfilelist = ERROR
  85. {
  86.     Msgbox Required dll is missing or conrupted : L2OSLConf.dll, App now fail to load.
  87.     ExitApp
  88. }
  89. If Checkfilelist =
  90. {
  91.     Msgbox Required dll is missing or conrupted : L2OSLConf.dll, App now fail to load.
  92.     ExitApp
  93. }
  94.  
  95. ; Function to force player to select Lineage II Directory if that a first launch or if install conrupted.
  96. IniRead, L2OSDIR, L2OSConfig.ini, GameDirectory, Loc
  97. If L2OSDIR = ERROR
  98. {
  99.         FileSelectFolder, L2OSDIR,, 3, Select Lineage II Folder
  100.         IniWrite, %L2OSDIR%, L2OSConfig.ini, GameDirectory, Loc
  101.         IniRead, L2OSDIR, L2OSConfig.ini, GameDirectory, Loc
  102.         GuiControl,, L2OSdirtext, %L2OSDIR%.
  103.         Loop {
  104.             If L2OSDIR =
  105.             {  
  106.                 FileSelectFolder, L2OSDIR,, 3, Select Lineage II Folder
  107.                 IniWrite, %L2OSDIR%, L2OSConfig.ini, GameDirectory, Loc
  108.                 IniRead, L2OSDIR, L2OSConfig.ini, GameDirectory, Loc
  109.                 GuiControl,, L2OSdirtext, %L2OSDIR%.
  110.             } else {
  111.                 IniRead, L2OSDIR, L2OSConfig.ini, GameDirectory, Loc
  112.                 break
  113.             }
  114.         }
  115. } else {
  116.        IniRead, L2OSDIR, L2OSConfig.ini, GameDirectory, Loc
  117. }
  118. If L2OSDIR =
  119. {
  120.         FileSelectFolder, L2OSDIR,, 3, Select Lineage II Folder
  121.         IniWrite, %L2OSDIR%, L2OSConfig.ini, GameDirectory, Loc
  122.         IniRead, L2OSDIR, L2OSConfig.ini, GameDirectory, Loc
  123.         GuiControl,, L2OSdirtext, %L2OSDIR%.
  124.         Loop {
  125.             If L2OSDIR =
  126.             {  
  127.                 FileSelectFolder, L2OSDIR,, 3, Select Lineage II Folder
  128.                 IniWrite, %L2OSDIR%, L2OSConfig.ini, GameDirectory, Loc
  129.                 IniRead, L2OSDIR, L2OSConfig.ini, GameDirectory, Loc
  130.                 GuiControl,, L2OSdirtext, %L2OSDIR%.
  131.             } else {
  132.                 IniRead, L2OSDIR, L2OSConfig.ini, GameDirectory, Loc
  133.                 break
  134.             }
  135.         }
  136. } else {
  137.        IniRead, L2OSDIR, L2OSConfig.ini, GameDirectory, Loc
  138. }
  139. ; Download require files :
  140. UrlDownloadToFile, %ServerFileCheckVersion%, %L2OSDIR%\L2OSServer.ini
  141. UrlDownloadToFile, %Changelogsfiles%, %L2OSDIR%\L2OSlastlogs.ini
  142. IfNotExist %L2OSDIR%\banner-logo.png
  143. {
  144. UrlDownloadToFile, %LogoUrl%, %L2OSDIR%\banner-logo.png
  145. }
  146. ; Initial read to provide importante information.
  147. IniRead, Serverversion, %L2OSDIR%\L2OSServer.ini, GameVersion, Version
  148.  
  149. ; If initial read failed due to network error or Server error throw an Error message to informe the user.
  150. If Serverversion = ERROR
  151. {
  152.     ; We set a variable that will be used by the Gui to show the user about the error.
  153.     Serverversion = /!\ No Network connection /!\
  154.     MsgBox We cannot check the server required game version.`nBe sure to be connected to internet.`nAlso be sure to run this application in Admin rights and check Firewall/Anti-virus exception.
  155. }
  156. else
  157. {
  158.     ; If all goes fine show the download server required game version.
  159.     Serverversion = %Serverversion%
  160.    
  161.     ; Delete the files used to know server requirement.
  162.     FileDelete, %L2OSDIR%\L2OSServer.ini
  163. }
  164.  
  165. ; Read local game version from files.
  166. IniRead, Gameversion, %L2OSDIR%\L2OSConfig.ini, GameVersion, Version
  167.  
  168. ; If the game show no version throw an error and assume it to be in "1.0.0" and force the player to update.
  169. If Gameversion = ERROR
  170. {
  171.     ; Force game to be in version 1.0.0 and create file version for it.
  172.     IniWrite, 1.0.0, %L2OSDIR%\L2OSConfig.ini, GameVersion, Version
  173.    
  174.     ; Re-read the file to refresh variable.
  175.     IniRead, Gameversion, %L2OSDIR%\L2OSConfig.ini, GameVersion, Version
  176.    
  177.     ; Put variable to show in gui later to the user that he/she have to update!
  178.     CurrentStatut = Client NOT Ready to play, Please check files !
  179.    
  180.     ; Force diable button play (it will be unable if the user update the game.)
  181.     GuiControl, disable, btnPlay
  182. }
  183. else
  184. {
  185.     ; If all goes fine then show in gui the current game version.
  186.     Gameversion = %Gameversion%
  187. }
  188.  
  189. ;File read to get the change logs !
  190. FileRead, L2OSChangelogs, %L2OSDIR%\L2OSlastlogs.ini
  191.  
  192. ; If change log file happen to be missing on server throw an error to informe the user.
  193. If L2OSChangelogs = ERROR
  194. {
  195.     L2OSChangelogs = /!\ No Network connection /!\
  196.     MsgBox We cannot check the server required Change logs.`nBe sure to be connected to internet.`nAlso be sure to run this application in Admin rights and check Firewall/Anti-virus exception.
  197. }
  198. else
  199. {
  200.     ; If all goes fines delete the changelog temporary files and place the text in the placeholder
  201.     L2OSChangelogs = %L2OSChangelogs%
  202.     FileDelete, %L2OSDIR%\L2OSlastlogs.ini
  203. }
  204.  
  205.  
  206.  
  207. ; Gui Creation.
  208. ; Logo placeholder creation
  209. Gui, 1:Add, Picture, x0 y0 w485 h110 , %L2OSDIR%\banner-logo.png
  210.  
  211. ; Game & Server game required version text place holder
  212. Gui, 1:Add, Text, x11 y107 w140 h20 , Game version : %Gameversion%
  213. Gui, 1:Add, Text, x161 y107 w320 h20 , Server Game version : %Serverversion%
  214.  
  215. ; Progress & Launcher status
  216. Gui, 1:Add, Text, vDllFiles x11 y257 w350 h20 , %CurrentStatut%
  217.  
  218. ; Progress Bars creation.
  219. Gui, 1:Add, Progress, x11 y287 w350 h20 , 25
  220. Gui, 1:Add, Progress, x11 y317 w350 h20 , 25
  221.  
  222. ; Buttons Creation
  223. Gui, 1:Add, Button, vbtnPlay gbtnPlay x371 y327 w100 h30 , Play
  224. Gui, 1:Add, Button, vbtnUpdate gcheckfiles x371 y287 w100 h30 , Check Files
  225. Gui, 1:Add, Button, vbtnOptions gbtnoption x371 y247 w100 h30 , Options
  226.  
  227. ; Change Log place holder
  228. Gui, 1:Add, Text, x11 y127 w460 h120 , %L2OSChangelogs%
  229.  
  230. ; Copyright in the button of the launcher %Appname% is a variable see the header.
  231. Gui, 1:Add, Text, x11 y347 w350 h20 , %Appname% - %Appversion%
  232.  
  233. ; Show the current created Gui.
  234. Gui, 1:Show, x203 y214 h379 w485, %Appname% - %Appversion%
  235. Return
  236.  
  237. ; Global action used for the button "checkfiles"
  238. checkfiles:
  239.  
  240. ; Disabling Button play, Option, Check Files
  241. GuiControl, disable, btnPlay
  242. GuiControl, disable, btnOptions
  243. GuiControl, disable, btnUpdate
  244.  
  245. ; Download list of the files to check (see header for url.)
  246. UrlDownloadToFile, %Checkfilelist%, %L2OSDIR%\L2OSCheckFileList.ini
  247.  
  248. ; Loop read the files per line !
  249. Loop, read, %L2OSDIR%\L2OSCheckFileList.ini
  250. {
  251. ; Simple Variable to form the url used later.
  252. url = %ServerRoot%/%A_LoopReadLine%
  253.  
  254. ; Call Function "HttpQueryInfo" with variable url and param 5 (file size)
  255. Version1 :=HttpQueryInfo(url, 5)
  256.  
  257. ; Check local files size.
  258. FileGetSize, Version2, %A_LoopReadLine%
  259.  
  260. ; If local files size is Zero Or negative for it to be 0
  261. If Version2 =
  262. {
  263.  
  264. ; Here is where it for it to be "Zero"
  265. Version2 = 0
  266. }
  267.  
  268. ; check if both files size is the same
  269. If (%Version2%=%Version1%)
  270. {
  271.  
  272. ; If is is the same then download nothing just update the gui to show "Skipping - FILENAME.EXT"
  273. GuiControl,,DllFiles,Skipping - %A_LoopReadLine%
  274. }
  275. Else
  276. {
  277.  
  278. ; Used to form the url used later
  279. url3 = %ServerRoot%/%A_LoopReadLine%
  280.  
  281. ; Download files in "url3" variable and put it in the same folder as the launcher.
  282. UrlDownloadToFile, %url3%, %L2OSDIR%\%A_LoopReadLine%
  283.  
  284. ; Update gui to show "Downloading - FILENAME.EXT"
  285. GuiControl,,DllFiles,Downloading - %A_LoopReadLine%
  286. }
  287. }
  288.  
  289. ; Delete the file download in the begining to check the list of files to be checked.
  290. FileDelete, %L2OSDIR%\L2OSCheckFileList.ini
  291.  
  292. ; Update gui to show "Client Ready to play" (Variable set in header!)
  293. GuiControl,,DllFiles,%CurrentStatut%
  294.  
  295. ; Re-enable buttons !
  296. GuiControl, Enable, btnPlay
  297. GuiControl, Enable, btnOptions
  298. GuiControl, Enable, btnUpdate
  299. Return
  300.  
  301. ; Function used to create gui the same way as we did for main gui but on 2 process (internal process not multiple ".exe")
  302. btnoption:
  303.  
  304. ; Destroy older Gui 2 (in case user had an exploit to bypass windows caption system
  305. Gui, 2:Destroy
  306.  
  307. ; Creating Gui base to allow later use (Needed for Checkbox to make them working between tabs)
  308. ; Simple logic as it :
  309. ; Button creation (Default Cancel and Apply that is present on ALL tabs so it is created before the tabs itself.
  310. ; Then Tab creation and then what the tab need to load and create.
  311.  
  312. Gui, 2:Add, Button, x11 y477 w70 h20 , Default
  313. Gui, 2:Add, Button, gcancelgui2 x91 y477 w70 h20 , Cancel
  314. Gui, 2:Add, Button, gapplygui x171 y477 w70 h20 , Apply
  315. Gui, 2:Add, Tab, x0 y0 w2410 h770 , Video|Audio|Game
  316.  
  317. ; Reading LineageII Options.ini properties in the order it show on the window !
  318.  
  319. ; Get info Tab "Video"
  320. IniRead, StartupFullScreen, %L2OSDIR%/System/Option.ini, Video, StartupFullScreen
  321. IniRead, AltTabFix, %L2OSDIR%/System/Option.ini, Game, AltTabFix
  322. IniRead, Gamma, %L2OSDIR%/System/Option.ini, Video, Gamma
  323. IniRead, TextureDetail, %L2OSDIR%/System/Option.ini, Video, TextureDetail
  324. IniRead, ModelDetail, %L2OSDIR%/System/Option.ini, Video, ModelDetail
  325. IniRead, SkipAnim, %L2OSDIR%/System/Option.ini, Video, SkipAnim
  326. IniRead, PawnShadow, %L2OSDIR%/System/Option.ini, Video, PawnShadow
  327. IniRead, RenderDeco, %L2OSDIR%/System/Option.ini, Video, RenderDeco
  328. IniRead, Terrain, %L2OSDIR%/System/Option.ini, ClippingRange, Terrain
  329. IniRead, Pawn, %L2OSDIR%/System/Option.ini, ClippingRange, Pawn
  330. IniRead, RenderActorLimited, %L2OSDIR%/System/Option.ini, Video, RenderActorLimited
  331. IniRead, IsUseEffect, %L2OSDIR%/System/Option.ini, L2WaterEffect, IsUseEffect
  332. IniRead, AntiAliasing, %L2OSDIR%/System/Option.ini, Video, AntiAliasing
  333. IniRead, Glow, %L2OSDIR%/System/Option.ini, Video, Glow
  334. IniRead, UseTrilinear, %L2OSDIR%/System/Option.ini, Video, UseTrilinear
  335. IniRead, UseColorCursor, %L2OSDIR%/System/Option.ini, Video, UseColorCursor
  336. IniRead, LowDetail, %L2OSDIR%/System/Option.ini, Video, LowDetail
  337.  
  338. ; Get info Tab "Audio"
  339. IniRead, SoundVolume, %L2OSDIR%/System/Option.ini, Audio, SoundVolume
  340. IniRead, MusicVolume, %L2OSDIR%/System/Option.ini, Audio, MusicVolume
  341. IniRead, WavVoiceVolume, %L2OSDIR%/System/Option.ini, Audio, WavVoiceVolume
  342. IniRead, OggVoiceVolume, %L2OSDIR%/System/Option.ini, Audio, OggVoiceVolume
  343.  
  344. ; Get info Tab "Game"
  345. IniRead, TransparencyMode, %L2OSDIR%/System/Option.ini, Game, TransparencyMode
  346. IniRead, GameMode, %L2OSDIR%/System/Option.ini, Game, GameMode
  347. IniRead, MyName, %L2OSDIR%/System/Option.ini, Game, MyName
  348. IniRead, NPCName, %L2OSDIR%/System/Option.ini, Game, NPCName
  349. IniRead, GroupName, %L2OSDIR%/System/Option.ini, Game, GroupName
  350. IniRead, PledgeMemberName, %L2OSDIR%/System/Option.ini, Game, PledgeMemberName
  351. IniRead, PartyMemberName, %L2OSDIR%/System/Option.ini, Game, PartyMemberName
  352. IniRead, OtherPCName, %L2OSDIR%/System/Option.ini, Game, OtherPCName
  353. IniRead, EnterChatting, %L2OSDIR%/System/Option.ini, Game, EnterChatting
  354. IniRead, AutoTrackingPawn, %L2OSDIR%/System/Option.ini, Game, AutoTrackingPawn
  355. IniRead, OldChatting, %L2OSDIR%/System/Option.ini, Game, OldChatting
  356. IniRead, IsNative, %L2OSDIR%/System/Option.ini, Game, IsNative
  357. IniRead, ArrowMode, %L2OSDIR%/System/Option.ini, Game, ArrowMode
  358. IniRead, UseJoystick, %L2OSDIR%/System/Option.ini, Game, UseJoystick
  359. IniRead, ScreenShotQuality, %L2OSDIR%/System/Option.ini, Game, ScreenShotQuality
  360. IniRead, PartyLooting, %L2OSDIR%/System/Option.ini, Game, PartyLooting
  361.  
  362. ;Read L2.ini to know what map DEV-console would need.
  363. IfExist, %L2OSDIR%\system\L2-off.ini
  364. {
  365.     IniRead, LocalMap, %L2OSDIR%/System/L2.ini, URL, LocalMap
  366.     ; Directly Set variable there to do less coding stuff.
  367.     StringTrimRight, LocalMapReC, LocalMap, 4
  368.     LocalMapDD = %LocalMapReC%
  369. }
  370. Else
  371. {
  372.     IniRead, LocalMap, %L2OSDIR%/System/L2-dev.ini, URL, LocalMap
  373.     StringTrimRight, LocalMapReC, LocalMap, 4
  374.     LocalMapDD = %LocalMapReC%
  375. }
  376. ; Convert parsed data to variable compatible.
  377. ; Check if the data StartupFullScreen is true or false and arrange the gui in the proper way.
  378. If StartupFullScreen = False
  379. {
  380. StartupFullScreenDD=True|False||
  381. }
  382. If StartupFullScreen = True
  383. {
  384. StartupFullScreenDD=True||False
  385. }
  386. ; Check if the data AltTabFix is true or false or empty and arrange the gui in the proper way.
  387. If AltTabFix =  
  388. {
  389. AltTabFixDD = True|False||
  390. ; I used this trick to write the properties for next time to make it a bit faster in the check.
  391. IniWrite, False, %L2OSDIR%/System/Option.ini, Game, AltTabFix
  392. }
  393. If AltTabFix =  ERROR
  394. {
  395. AltTabFixDD = True|False||
  396. IniWrite, False, %L2OSDIR%/System/Option.ini, Game, AltTabFix
  397. }
  398. If AltTabFix = False
  399. {
  400. AltTabFixDD = True|False||
  401. }
  402. If AltTabFix = True
  403. {
  404. AltTabFixDD = True||False
  405. }
  406.  
  407. ; Check the data Gamma and arrange the gui in the proper way it can be any of this :
  408. ; Gamma=0.800000|0.900000|1.000000|1.100000|1.200000
  409. ; Game= 1       |2       |3       |4       |5
  410. ; I made a little variable check and rename to make it user-friendly & Lineage like.
  411. If Gamma =
  412. {
  413. GammaDD = 1|2|3||4|5
  414. }
  415. If Gamma = ERROR
  416. {
  417. GammaDD = 1|2|3||4|5
  418. }
  419. If Gamma = 0.800000
  420. {
  421. GammaDD = 1||2|3|4|5
  422. }
  423. If Gamma = 0.900000
  424. {
  425. GammaDD = 1|2||3|4|5
  426. }
  427. If Gamma = 1.000000
  428. {
  429. GammaDD = 1|2|3||4|5
  430. }
  431. If Gamma = 1.100000
  432. {
  433. GammaDD = 1|2|3|4||5
  434. }
  435. If Gamma = 1.200000
  436. {
  437. GammaDD = 1|2|3|4|5||
  438. }
  439.  
  440. ; Check the data TextureDetail and arrange the gui in the proper way.
  441. If TextureDetail = 0
  442. {
  443. TextureDetailDD = 0||1|2
  444. }
  445. If TextureDetail = 1
  446. {
  447. TextureDetailDD = 0|1||2
  448. }
  449. If TextureDetail = 2
  450. {
  451. TextureDetailDD = 0|1|2||
  452. }
  453.  
  454. ; Check the data ModelDetail and arrange the gui in the proper way.
  455. If ModelDetail = 0
  456. {
  457. ModelDetailDD = 0||1
  458. }
  459. If ModelDetail = 1
  460. {
  461. ModelDetailDD = 0|1||
  462. }
  463.  
  464. ; Check the data SkipAnim and arrange the gui in the proper way.
  465. If SkipAnim = 0
  466. {
  467. SkipAnimDD = 0||1
  468. }
  469. If SkipAnim = 1
  470. {
  471. SkipAnimDD = 0|1||
  472. }
  473.  
  474. ; Check the data PawnShadow and arrange the gui in the proper way.
  475. If PawnShadow = false
  476. {
  477. Gui, 2:Tab, 1
  478. Gui, 2:Add, CheckBox, vPawnShadowDD x21 y227 w100 h20 , Shadows
  479. }
  480. If PawnShadow = true
  481. {
  482. Gui, 2:Tab, 1
  483. Gui, 2:Add, CheckBox, Checked vPawnShadowDD x21 y227 w100 h20 , Shadows
  484. }
  485.  
  486. ; Check the data RenderDeco and arrange the gui in the proper way.
  487. If RenderDeco = false
  488. {
  489. Gui, 2:Tab, 1
  490. Gui, 2:Add, CheckBox, vRenderDecoDD x131 y227 w110 h20 , Ground Detail
  491. }
  492. If RenderDeco = true
  493. {
  494. Gui, 2:Tab, 1
  495. Gui, 2:Add, CheckBox, Checked vRenderDecoDD x131 y227 w110 h20 , Ground Detail
  496. }
  497.  
  498. ; Check the data Terrain and arrange the gui in the proper way.
  499. If Terrain = 4.000000
  500. {
  501. TerrainDD = 1||2|3|4|5
  502. }
  503. If Terrain = 5.000000
  504. {
  505. TerrainDD = 1|2||3|4|5
  506. }
  507. If Terrain = 6.000000
  508. {
  509. TerrainDD = 1|2|3||4|5
  510. }
  511. If Terrain = 7.000000
  512. {
  513. TerrainDD = 1|2|3|4||5
  514. }
  515. If Terrain = 8.000000
  516. {
  517. TerrainDD = 1|2|3|4|5||
  518. }
  519.  
  520. ; Check the data Pawn and arrange the gui in the proper way.
  521. If Pawn = 1.000000
  522. {
  523. PawnDD = 1||2|3|4|5
  524. }
  525. If Pawn = 1.500000
  526. {
  527. PawnDD = 1|2||3|4|5
  528. }
  529. If Pawn = 2.000000
  530. {
  531. PawnDD = 1|2|3||4|5
  532. }
  533. If Pawn = 2.500000
  534. {
  535. PawnDD = 1|2|3|4||5
  536. }
  537. If Pawn = 3.000000
  538. {
  539. PawnDD = 1|2|3|4|5||
  540. }
  541.  
  542. ; Check the data RenderActorLimited and arrange the gui in the proper way.
  543. ; Used a little trik to change "6" to "None" to make it more Lineage Like.
  544. If RenderActorLimited = 1
  545. {
  546. RenderActorLimitedDD = 1||2|3|4|5|None
  547. }
  548. If RenderActorLimited = 2
  549. {
  550. RenderActorLimitedDD = 1|2||3|4|5|None
  551. }
  552. If RenderActorLimited = 3
  553. {
  554. RenderActorLimitedDD = 1|2|3||4|5|None
  555. }
  556. If RenderActorLimited = 4
  557. {
  558. RenderActorLimitedDD = 1|2|3|4||5|None
  559. }
  560. If RenderActorLimited = 5
  561. {
  562. RenderActorLimitedDD = 1|2|3|4|5||None
  563. }
  564. If RenderActorLimited = 6
  565. {
  566. RenderActorLimitedDD = 1|2|3|4|5|None||
  567. }
  568.  
  569. ; Check the data IsUseEffect and arrange the gui in the proper way.
  570. If IsUseEffect = False
  571. {
  572. IsUseEffectDD = True|False||
  573. }
  574. If IsUseEffect = True
  575. {
  576. IsUseEffectDD = True||False
  577. }
  578.  
  579. ; Check the data AntiAliasing and arrange the gui in the proper way.
  580. If AntiAliasing = 0
  581. {
  582. AntiAliasingDD = 0||1|2
  583. }
  584. If AntiAliasing = 1
  585. {
  586. AntiAliasingDD = 0|1||2
  587. }
  588. If AntiAliasing = 2
  589. {
  590. AntiAliasingDD = 0|1|2||
  591. }
  592.  
  593. ; Check the data Glow and arrange the gui in the proper way.
  594. If Glow = false
  595. {
  596. Gui, 2:Tab, 1
  597. Gui, 2:Add, CheckBox, vGlowDD x21 y417 w100 h20 , Glow Effect
  598. }
  599. If Glow = true
  600. {
  601. Gui, 2:Tab, 1
  602. Gui, 2:Add, CheckBox, Checked vGlowDD x21 y417 w100 h20 , Glow Effect
  603. }
  604.  
  605. ; Check the data UseTrilinear and arrange the gui in the proper way.
  606. If UseTrilinear = false
  607. {
  608. Gui, 2:Tab, 1
  609. Gui, 2:Add, CheckBox, vUseTrilinearDD x131 y417 w100 h20 , Texture Filter
  610. }
  611. If UseTrilinear = true
  612. {
  613. Gui, 2:Tab, 1
  614. Gui, 2:Add, CheckBox, Checked vUseTrilinearDD x131 y417 w100 h20 , Texture Filter
  615. }
  616.  
  617. ; Check the data UseColorCursor and arrange the gui in the proper way.
  618. If UseColorCursor = false
  619. {
  620. Gui, 2:Tab, 1
  621. Gui, 2:Add, CheckBox, vUseColorCursorDD x21 y447 w100 h20 , Game Cursor
  622. }
  623. If UseColorCursor = true
  624. {
  625. Gui, 2:Tab, 1
  626. Gui, 2:Add, CheckBox, Checked vUseColorCursorDD x21 y447 w100 h20 , Game Cursor
  627. }
  628.  
  629. ; Check the data LowDetail and arrange the gui in the proper way.
  630. If LowDetail = false
  631. {
  632. Gui, 2:Tab, 1
  633. Gui, 2:Add, CheckBox, vLowDetailDD x131 y447 w100 h20 , Low detail
  634. }
  635. If LowDetail = true
  636. {
  637. Gui, 2:Tab, 1
  638. Gui, 2:Add, CheckBox, Checked vLowDetailDD x131 y447 w100 h20 , Low detail
  639. }
  640. ; In case that a first launch !
  641. If LowDetail =
  642. {
  643. Gui, 2:Tab, 1
  644. Gui, 2:Add, CheckBox, vLowDetailDD x131 y447 w100 h20 , Low detail
  645. IniWrite, False, %L2OSDIR%/System/Option.ini, Video, LowDetail
  646. }
  647. If LowDetail = ERROR
  648. {
  649. Gui, 2:Tab, 1
  650. Gui, 2:Add, CheckBox, vLowDetailDD x131 y447 w100 h20 , Low detail
  651. IniWrite, False, %L2OSDIR%/System/Option.ini, Video, LowDetail
  652. }
  653.  
  654. ; Check the data SoundVolume and arrange the gui in the proper way.
  655. ; Used a little trik to change "6" to "Off" to make it more Lineage Like.
  656. If SoundVolume = 0.200000
  657. {
  658. SoundVolumeDD = Off|1||2|3|4|5
  659. }
  660. If SoundVolume = 0.400000
  661. {
  662. SoundVolumeDD = Off|1|2||3|4|5
  663. }
  664. If SoundVolume = 0.600000
  665. {
  666. SoundVolumeDD = Off|1|2|3||4|5
  667. }
  668. If SoundVolume = 0.800000
  669. {
  670. SoundVolumeDD = Off|1|2|3|4||5
  671. }
  672. If SoundVolume = 1.000000
  673. {
  674. SoundVolumeDD = Off|1|2|3|4|5||
  675. }
  676. If SoundVolume = 0.000000
  677. {
  678. SoundVolumeDD = Off||1|2|3|4|5
  679. }
  680.  
  681. ; Check the data MusicVolume and arrange the gui in the proper way.
  682. ; Used a little trik to change "6" to "Off" to make it more Lineage Like.
  683. If MusicVolume = 0.200000
  684. {
  685. MusicVolumeDD = Off|1||2|3|4|5
  686. }
  687. If MusicVolume = 0.400000
  688. {
  689. MusicVolumeDD = Off|1|2||3|4|5
  690. }
  691. If MusicVolume = 0.600000
  692. {
  693. MusicVolumeDD = Off|1|2|3||4|5
  694. }
  695. If MusicVolume = 0.800000
  696. {
  697. MusicVolumeDD = Off|1|2|3|4||5
  698. }
  699. If MusicVolume = 1.000000
  700. {
  701. MusicVolumeDD = Off|1|2|3|4|5||
  702. }
  703. If MusicVolume = 0.000000
  704. {
  705. MusicVolumeDD = Off||1|2|3|4|5
  706. }
  707.  
  708. ; Check the data WavVoiceVolume and arrange the gui in the proper way.
  709. ; Used a little trik to change "6" to "Off" to make it more Lineage Like.
  710. If WavVoiceVolume = 0.200000
  711. {
  712. WavVoiceVolumeDD = Off|1||2|3|4|5
  713. }
  714. If WavVoiceVolume = 0.400000
  715. {
  716. WavVoiceVolumeDD = Off|1|2||3|4|5
  717. }
  718. If WavVoiceVolume = 0.600000
  719. {
  720. WavVoiceVolumeDD = Off|1|2|3||4|5
  721. }
  722. If WavVoiceVolume = 0.800000
  723. {
  724. WavVoiceVolumeDD = Off|1|2|3|4||5
  725. }
  726. If WavVoiceVolume = 1.000000
  727. {
  728. WavVoiceVolumeDD = Off|1|2|3|4|5||
  729. }
  730. If WavVoiceVolume = 0.000000
  731. {
  732. WavVoiceVolumeDD = Off||1|2|3|4|5
  733. }
  734.  
  735. ; Check the data OggVoiceVolume and arrange the gui in the proper way.
  736. ; Used a little trik to change "6" to "Off" to make it more Lineage Like.
  737. If OggVoiceVolume = 0.200000
  738. {
  739. OggVoiceVolumeDD = Off|1||2|3|4|5
  740. }
  741. If OggVoiceVolume = 0.400000
  742. {
  743. OggVoiceVolumeDD = Off|1|2||3|4|5
  744. }
  745. If OggVoiceVolume = 0.600000
  746. {
  747. OggVoiceVolumeDD = Off|1|2|3||4|5
  748. }
  749. If OggVoiceVolume = 0.800000
  750. {
  751. OggVoiceVolumeDD = Off|1|2|3|4||5
  752. }
  753. If OggVoiceVolume = 1.000000
  754. {
  755. OggVoiceVolumeDD = Off|1|2|3|4|5||
  756. }
  757. If OggVoiceVolume = 0.000000
  758. {
  759. OggVoiceVolumeDD = Off||1|2|3|4|5
  760. }
  761.  
  762. ; Check the data TransparencyMode and arrange the gui in the proper way.
  763. If TransparencyMode = false
  764. {
  765. Gui, 2:Tab, 3
  766. Gui, 2:Add, CheckBox, vTransparencyModeDD x155 y47 w95 h20 , Transparent
  767. }
  768. If TransparencyMode = true
  769. {
  770. Gui, 2:Tab, 3
  771. Gui, 2:Add, CheckBox, checked vTransparencyModeDD x155 y47 w95 h20 , Transparent
  772. }
  773.  
  774. ; Check if the data GameMode is Dev-Mode or Original or empty and arrange the gui in the proper way.
  775. If GameMode =  
  776. {
  777. GameModeDD = Dev-Mode|Original||
  778. ; I used this trick to write the properties for next time to make it a bit faster in the check.
  779. IniWrite, Original, %L2OSDIR%/System/Option.ini, Game, GameMode
  780. }
  781. If GameMode =  ERROR
  782. {
  783. GameModeDD = Dev-Mode|Original||
  784. IniWrite, Original, %L2OSDIR%/System/Option.ini, Game, GameMode
  785. }
  786. If GameMode = Original
  787. {
  788. GameModeDD = Dev-Mode|Original||
  789. }
  790. If GameMode = Dev-Mode
  791. {
  792. GameModeDD = Dev-Mode||Original
  793. }
  794.  
  795. ; Check the data MyName and arrange the gui in the proper way.
  796. If MyName = false
  797. {
  798. Gui, 2:Tab, 3
  799. Gui, 2:Add, CheckBox, vMyNameDD x91 y117 w90 h20 , Players
  800. }
  801. If MyName = true
  802. {
  803. Gui, 2:Tab, 3
  804. Gui, 2:Add, CheckBox, Checked vMyNameDD x91 y117 w90 h20 , Players
  805. }
  806.  
  807. ; Check the data NPCName and arrange the gui in the proper way.
  808. If NPCName = false
  809. {
  810. Gui, 2:Tab, 3
  811. Gui, 2:Add, CheckBox, vNPCNameDD x91 y137 w90 h20 , Monster
  812. }
  813. If NPCName = true
  814. {
  815. Gui, 2:Tab, 3
  816. Gui, 2:Add, CheckBox, Checked vNPCNameDD x91 y137 w90 h20 , Monster
  817. }
  818.  
  819. ; Check the data OtherPCName and arrange the gui in the proper way.
  820. If OtherPCName = false
  821. {
  822. Gui, 2:Tab, 3
  823. Gui, 2:Add, CheckBox, vOtherPCNameDD x91 y157 w90 h20 , Other PCs
  824. }
  825. If OtherPCName = true
  826. {
  827. Gui, 2:Tab, 3
  828. Gui, 2:Add, CheckBox, Checked vOtherPCNameDD x91 y157 w90 h20 , Other PCs
  829. }
  830.  
  831. ; Check the data PledgeMemberName and arrange the gui in the proper way.
  832. If PledgeMemberName = false
  833. {
  834. Gui, 2:Tab, 3
  835. Gui, 2:Add, CheckBox, vPledgeMemberNameDD x101 y177 w90 h20 , Clan
  836. }
  837. If PledgeMemberName = true
  838. {
  839. Gui, 2:Tab, 3
  840. Gui, 2:Add, CheckBox, Checked vPledgeMemberNameDD x101 y177 w90 h20 , Clan
  841. }
  842.  
  843. ; Check the data PartyMemberName and arrange the gui in the proper way.
  844. If PartyMemberName = false
  845. {
  846. Gui, 2:Tab, 3
  847. Gui, 2:Add, CheckBox, vPartyMemberNameDD x101 y197 w90 h20 , Party
  848. }
  849. If PartyMemberName = true
  850. {
  851. Gui, 2:Tab, 3
  852. Gui, 2:Add, CheckBox, vPartyMemberNameDD x101 y197 w90 h20 , Party
  853. }
  854.  
  855. ; Check the data GroupName and arrange the gui in the proper way.
  856. If GroupName = false
  857. {
  858. Gui, 2:Tab, 3
  859. Gui, 2:Add, CheckBox, vGroupNameDD x101 y217 w90 h20 , General
  860. }
  861. If GroupName = true
  862. {
  863. Gui, 2:Tab, 3
  864. Gui, 2:Add, CheckBox, vGroupNameDD Checked x101 y217 w90 h20 , General
  865. }
  866.  
  867. ; Check the data EnterChatting and arrange the gui in the proper way.
  868. If EnterChatting = false
  869. {
  870. Gui, 2:Tab, 3
  871. Gui, 2:Add, CheckBox, vEnterChattingDD x11 y257 w120 h20 , Enter Chat
  872. }
  873. If EnterChatting = true
  874. {
  875. Gui, 2:Tab, 3
  876. Gui, 2:Add, CheckBox, vEnterChattingDD x11 y257 w120 h20 , Enter Chat
  877. }
  878.  
  879. ; Check the data OldChatting and arrange the gui in the proper way.
  880. If OldChatting = false
  881. {
  882. Gui, 2:Tab, 3
  883. Gui, 2:Add, CheckBox, vOldChattingDD x11 y277 w120 h20 , Auto Code
  884. }
  885. If OldChatting = true
  886. {
  887. Gui, 2:Tab, 3
  888. Gui, 2:Add, CheckBox, Checked vOldChattingDD x11 y277 w120 h20 , Auto Code
  889. }
  890.  
  891. ; Check the data ArrowMode and arrange the gui in the proper way.
  892. If ArrowMode = false
  893. {
  894. Gui, 2:Tab, 3
  895. Gui, 2:Add, CheckBox, vArrowModeDD x11 y297 w120 h20 , 3D Arrow
  896. }
  897. If ArrowMode = true
  898. {
  899. Gui, 2:Tab, 3
  900. Gui, 2:Add, CheckBox, Checked vArrowModeDD x11 y297 w120 h20 , 3D Arrow
  901. }
  902.  
  903. ; Check the data AutoTrackingPawn and arrange the gui in the proper way.
  904. If AutoTrackingPawn = false
  905. {
  906. Gui, 2:Tab, 3
  907. Gui, 2:Add, CheckBox, vAutoTrackingPawnDD x141 y257 w110 h20 , Tracking
  908. }
  909. If AutoTrackingPawn = true
  910. {
  911. Gui, 2:Tab, 3
  912. Gui, 2:Add, CheckBox, vAutoTrackingPawnDD x141 y257 w110 h20 , Tracking
  913. }
  914.  
  915. ; Check the data IsNative and arrange the gui in the proper way.
  916. If IsNative = false
  917. {
  918. Gui, 2:Tab, 3
  919. Gui, 2:Add, CheckBox, vIsNativeDD x141 y277 w110 h20 , Key Security
  920. }
  921. If IsNative = true
  922. {
  923. Gui, 2:Tab, 3
  924. Gui, 2:Add, CheckBox, Checked vIsNativeDD x141 y277 w110 h20 , Key Security
  925. }
  926.  
  927. ; Check the data UseJoystick and arrange the gui in the proper way.
  928. If UseJoystick = false
  929. {
  930. Gui, 2:Tab, 3
  931. Gui, 2:Add, CheckBox, vUseJoystickDD x141 y297 w110 h20 , Game Pad
  932. }
  933. If UseJoystick = true
  934. {
  935. Gui, 2:Tab, 3
  936. Gui, 2:Add, CheckBox, Checked vUseJoystickDD  x141 y297 w110 h20 , Game Pad
  937. }
  938.  
  939. ; Check the data ScreenShotQuality and arrange the gui in the proper way.
  940. If ScreenShotQuality = 0
  941. {
  942. ScreenShotQualityDD = Bitmap||High Quality - JPG|Medium Quality - JPG|Low Quality - JPG
  943. }
  944. If ScreenShotQuality = 1
  945. {
  946. ScreenShotQualityDD = Bitmap|High Quality - JPG||Medium Quality - JPG|Low Quality - JPG
  947. }
  948. If ScreenShotQuality = 2
  949. {
  950. ScreenShotQualityDD = Bitmap|High Quality - JPG|Medium Quality - JPG||Low Quality - JPG
  951. }
  952. If ScreenShotQuality = 3
  953. {
  954. ScreenShotQualityDD = Bitmap|High Quality - JPG|Medium Quality - JPG|Low Quality - JPG||
  955. }
  956.  
  957. ; Check the data PartyLooting and arrange the gui in the proper way.
  958. If PartyLooting = 0
  959. {
  960. PartyLootingDD = Finders Keepers||Random|Random Including Spoil|By Turn|By Turn Including Spoil
  961. }
  962. If PartyLooting = 1
  963. {
  964. PartyLootingDD = Finders Keepers|Random||Random Including Spoil|By Turn|By Turn Including Spoil
  965. }
  966. If PartyLooting = 2
  967. {
  968. PartyLootingDD = Finders Keepers|Random|Random Including Spoil||By Turn|By Turn Including Spoil
  969. }
  970. If PartyLooting = 3
  971. {
  972. PartyLootingDD = Finders Keepers|Random|Random Including Spoil|By Turn||By Turn Including Spoil
  973. }
  974. If PartyLooting = 4
  975. {
  976. PartyLootingDD = Finders Keepers|Random|Random Including Spoil|By Turn|By Turn Including Spoil||
  977. }
  978. ; Creating rest of Gui with default Variable in case the one provided is empty and the check failed for unknown reason.
  979. ; All checkbox are in their corresponding "If" !
  980.  
  981. Gui, 2:Tab, 1
  982. Gui, 2:Add, GroupBox, x5 y15 w250 h205 ,
  983. Gui, 2:Add, GroupBox, x5 y210 w250 h45 ,
  984. Gui, 2:Add, GroupBox, x5 y245 w250 h165 ,
  985. Gui, 2:Add, GroupBox, x5 y400 w250 h70 ,
  986. Gui, 2:Add, Text, x11 y37 w100 h30 , FullScreen
  987. Gui, 2:Add, DropDownList, vStartupFullScreenDD r2 x131 y37 w110 h20 , %StartupFullScreenDD%
  988.  
  989. Gui, 2:Add, Text, x11 y67 w100 h30 , Alt+Tab Fix
  990. Gui, 2:Add, DropDownList, vAltTabFixDD r2 x131 y67 w110 h24 , %AltTabFixDD%
  991.  
  992. Gui, 2:Add, Text, x11 y97 w100 h30 , Gamma
  993. Gui, 2:Add, DropDownList, vGammaDD r5 x131 y97 w110 h24 , %GammaDD%
  994.  
  995. Gui, 2:Add, Text, x11 y127 w100 h30 , Textures
  996. Gui, 2:Add, DropDownList, vTextureDetailDD r3 x131 y127 w110 h24 , %TextureDetailDD%
  997.  
  998. Gui, 2:Add, Text, x11 y157 w100 h30 , Modeling Detail
  999. Gui, 2:Add, DropDownList, vModelDetailDD r2 x131 y157 w110 h24 , %ModelDetailDD%
  1000.  
  1001. Gui, 2:Add, Text, x11 y187 w100 h30 , Motion Detail
  1002. Gui, 2:Add, DropDownList, vSkipAnimDD r2 x131 y187 w110 h24 , %SkipAnimDD%
  1003.  
  1004. Gui, 2:Add, Text, x11 y257 w100 h30 , Terrain Range
  1005. Gui, 2:Add, DropDownList, vTerrainDD r5 x131 y257 w110 h24 , %TerrainDD%
  1006.  
  1007. Gui, 2:Add, Text, x11 y287 w100 h30 , PC/NPC Range
  1008. Gui, 2:Add, DropDownList, vPawnDD r5 x131 y287 w110 h24 , %PawnDD%
  1009.  
  1010. Gui, 2:Add, Text, x11 y317 w100 h30 , PC/NPC Limit
  1011. Gui, 2:Add, DropDownList, vRenderActorLimitedDD r6 x131 y317 w110 h24 , %RenderActorLimitedDD%
  1012.  
  1013. Gui, 2:Add, Text, x11 y347 w100 h30 , Reflection
  1014. Gui, 2:Add, DropDownList, vIsUseEffectDD r2 x131 y347 w110 h24 , %IsUseEffectDD%
  1015.  
  1016. Gui, 2:Add, Text, x11 y377 w100 h30 , Anti-Aliasing
  1017. Gui, 2:Add, DropDownList, vAntiAliasingDD r3 x131 y377 w110 h24 , %AntiAliasingDD%
  1018.  
  1019. Gui, 2:Tab, 2
  1020. Gui, 2:Add, GroupBox, x5 y37 w250 h150 ,
  1021. Gui, 2:Add, Text, x21 y57 w100 h30 , SFX Vol.
  1022. Gui, 2:Add, DropDownList, vSoundVolumeDD x131 y57 w100 h20 , %SoundVolumeDD%
  1023. Gui, 2:Add, Text, x21 y87 w100 h30 , Music Vol.
  1024. Gui, 2:Add, DropDownList, vMusicVolumeDD x131 y87 w100 h24 , %MusicVolumeDD%
  1025. Gui, 2:Add, Text, x21 y117 w100 h30 , System Voice
  1026. Gui, 2:Add, DropDownList, vWavVoiceVolumeDD x131 y117 w100 h24 , %WavVoiceVolumeDD%
  1027. Gui, 2:Add, Text, x21 y147 w100 h30 , Tutorial Voice
  1028. Gui, 2:Add, DropDownList, vOggVoiceVolumeDD x131 y147 w100 h24 , %OggVoiceVolumeDD%
  1029.  
  1030. Gui, 2:Tab, 3
  1031. Gui, 2:Add, GroupBox, x5 y35 w250 h40 ,
  1032. Gui, 2:Add, GroupBox, x5 y75 w250 h40 ,
  1033. Gui, 2:Add, GroupBox, x5 y115 w250 h130 ,
  1034. Gui, 2:Add, GroupBox, x5 y245 w250 h110 ,
  1035. Gui, 2:Add, GroupBox, x5 y355 w250 h50 ,
  1036. Gui, 2:Add, GroupBox, x5 y410 w250 h50 ,
  1037. Gui, 2:Add, Text, x11 y47 w80 h20 , Interface
  1038. Gui, 2:Add, Button, x91 y47 w60 h20 , Initialize
  1039. Gui, 2:Add, Text, x11 y87 w80 h20 , GameMode
  1040. Gui, 2:Add, DropDownList, vGameModeDD r2 x91 y87 w160 h20 , %GameModeDD%
  1041. Gui, 2:Add, Text, x11 y117 w80 h30 , Display
  1042. Gui, 2:Add, Text, x11 y327 w80 h20 , Screenshot
  1043. Gui, 2:Add, DropDownList, vScreenShotQualityDD r4 x91 y327 w160 h20 , %ScreenShotQualityDD%
  1044. Gui, 2:Add, Text, x11 y367 w80 h20 , Party Loot
  1045. Gui, 2:Add, DropDownList, vPartyLootingDD r5 x91 y367 w160 h24 , %PartyLootingDD%
  1046. Gui, 2:Add, Text, x11 y427 w100 h30 , Dev-Mod Map
  1047. Gui, 2:Add, Edit, vLocalMapDD x111 y423 w100 h25 , %LocalMapDD%
  1048. Gui, 2:Add, Text, x211 y427 w40 h30 , .unr
  1049. gui, 1:+Disabled
  1050. Gui, 2:Show, x591 y216 h508 w263, Options
  1051. Return
  1052.  
  1053. cancelgui2:
  1054. goto 2GuiClose
  1055. return
  1056.  
  1057. applygui:
  1058. Gui 2:Submit,Nohide
  1059. msgbox,
  1060. (
  1061. StartupFullScreenDD = %StartupFullScreenDD%
  1062. AltTabFixDD = %AltTabFixDD%
  1063. GammaDD = %GammaDD%
  1064. TextureDetailDD = %TextureDetailDD%
  1065. ModelDetailDD = %ModelDetailDD%
  1066. SkipAnimDD = %SkipAnimDD%
  1067. PawnShadowDD = %PawnShadowDD%
  1068. RenderDecoDD = %RenderDecoDD%
  1069. TerrainDD = %TerrainDD%
  1070. PawnDD = %PawnDD%
  1071. RenderActorLimitedDD = %RenderActorLimitedDD%
  1072. IsUseEffectDD = %IsUseEffectDD%
  1073. AntiAliasingDD = %AntiAliasingDD%
  1074. GlowDD = %GlowDD%
  1075. UseTrilinearDD = %UseTrilinearDD%
  1076. UseColorCursorDD = %UseColorCursorDD%
  1077. LowDetailDD = %LowDetailDD%
  1078. SoundVolumeDD = %SoundVolumeDD%
  1079. MusicVolumeDD = %MusicVolumeDD%
  1080. WavVoiceVolumeDD = %WavVoiceVolumeDD%
  1081. OggVoiceVolumeDD = %OggVoiceVolumeDD%
  1082. TransparencyModeDD = %TransparencyModeDD%
  1083. GameModeDD = %GameModeDD%
  1084. MyNameDD = %MyNameDD%
  1085. NPCNameDD = %NPCNameDD%
  1086. GroupNameDD = %GroupNameDD%
  1087. PledgeMemberNameDD = %PledgeMemberNameDD%
  1088. PartyMemberNameDD = %PartyMemberNameDD%
  1089. OtherPCNameDD = %OtherPCNameDD%
  1090. EnterChattingDD = %EnterChattingDD%
  1091. AutoTrackingPawnDD = %AutoTrackingPawnDD%
  1092. OldChattingDD = %OldChattingDD%
  1093. IsNativeDD = %IsNativeDD%
  1094. ArrowModeDD = %ArrowModeDD%
  1095. UseJoystickDD = %UseJoystickDD%
  1096. ScreenShotQualityDD = %ScreenShotQualityDD%
  1097. PartyLootingDD = %PartyLootingDD%
  1098. LocalMapDD = %LocalMapDD%
  1099. )
  1100. return
  1101.  
  1102. 2GuiClose:
  1103. gui, 2:+Disabled
  1104. MsgBox, 4,, Any unsaved change will be lost, Are you sure?
  1105. IfMsgBox Yes
  1106. {
  1107. Gui, 2:Destroy
  1108. gui, 1:-Disabled
  1109. Return
  1110. }
  1111. else
  1112. {
  1113. gui, 2:-Disabled
  1114. Return
  1115. }
  1116.  
  1117. btnPlay:
  1118. IniRead, GameMode, %L2OSDIR%/System/Option.ini, Game, GameMode
  1119. IniRead, AltTabFix, %L2OSDIR%/System/Option.ini, Game, AltTabFix
  1120.  
  1121. If GameMode = Dev-Mode
  1122. {
  1123.     If AltTabFix = True
  1124.     {
  1125.         IfExist, %L2OSDIR%\system\L2-dev.ini
  1126.         {
  1127.         FileMove, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\L2-off.ini
  1128.         FileMove, %L2OSDIR%\system\L2-dev.ini, %L2OSDIR%\system\L2.ini
  1129.         }
  1130.         Run, cmd /c CD %L2OSDIR%\system\ & runfirst.exe L2.exe,,Hide
  1131.         Goto GuiClose
  1132.     }
  1133.     else
  1134.     {
  1135.         IfExist, %L2OSDIR%\system\L2-dev.ini
  1136.         {
  1137.         FileMove, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\L2-off.ini
  1138.         FileMove, %L2OSDIR%\system\L2-dev.ini, %L2OSDIR%\system\L2.ini
  1139.         }
  1140.         Run, cmd /c CD %L2OSDIR%\system\ & L2.exe,,Hide
  1141.         Goto GuiClose
  1142.     }
  1143. }
  1144. Else
  1145. {
  1146.     If AltTabFix = True
  1147.     {
  1148.         IfExist, %L2OSDIR%\system\L2-off.ini
  1149.         {
  1150.         FileMove, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\L2-dev.ini
  1151.         FileMove, %L2OSDIR%\system\L2-off.ini, %L2OSDIR%\system\L2.ini
  1152.         }
  1153.         Run, cmd /c CD %L2OSDIR%\system\ & runfirst.exe L2.exe",,Hide
  1154.         Goto GuiClose
  1155.     }
  1156.     else
  1157.     {
  1158.         IfExist, %L2OSDIR%\system\L2-off.ini
  1159.         {
  1160.         FileMove, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\L2-dev.ini
  1161.         FileMove, %L2OSDIR%\system\L2-off.ini, %L2OSDIR%\system\L2.ini
  1162.         }
  1163.         Run, cmd /c CD %L2OSDIR%\system\ & L2.exe,,Hide
  1164.         Goto GuiClose
  1165.     }
  1166. }
  1167.  
  1168.  
  1169. return
  1170. ; If the app is closed totaly close the process! & delete unused files. (prevent to be a mess!)
  1171. GuiClose:
  1172. FileDelete, %L2OSDIR%\L2OSlastlogs.ini
  1173. FileDelete, %L2OSDIR%\L2OSCheckFileList.ini
  1174. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement