Advertisement
Baoulettes

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

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