Advertisement
Baoulettes

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

Oct 18th, 2014
467
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, gdefaultgui2 x11 y477 w70 h20 , Default
  313. Gui, 2:Add, Button, gcancelgui2 x91 y477 w70 h20 , Cancel
  314. Gui, 2:Add, Button, gapplygui2 x171 y477 w70 h20 , Confirm
  315. Gui, 2:Add, Tab, x0 y0 w2410 h770 , Video|Audio|Game
  316.  
  317. ; Set default variable in case Option.ini is missing!
  318. IfNotExist %L2OSDIR%/System/Option.ini
  319. {
  320. StartupFullScreenDD = True
  321. AltTabFixDD = False
  322. GammaDD = 3
  323. TextureDetailDD = 0
  324. ModelDetailDD = 0
  325. SkipAnimDD = 1
  326. PawnShadowDD = False
  327. RenderDecoDD = False
  328. TerrainDD = 6.000000
  329. PawnDD = 2.000000
  330. RenderActorLimitedDD = 3
  331. IsUseEffectDD = False
  332. AntiAliasingDD = 0
  333. GlowDD = False
  334. UseTrilinearDD = True
  335. UseColorCursorDD = True
  336. LowDetailDD = False
  337. SoundVolumeDD = 0.600000
  338. MusicVolumeDD = 0.600000
  339. WavVoiceVolumeDD = 0.600000
  340. OggVoiceVolumeDD = 0.600000
  341. TransparencyModeDD = True
  342. GameModeDD = Original
  343. MyNameDD = True
  344. NPCNameDD = True
  345. GroupNameDD = True
  346. PledgeMemberNameDD = True
  347. PartyMemberNameDD = True
  348. OtherPCNameDD = True
  349. EnterChattingDD = False
  350. AutoTrackingPawnDD = True
  351. OldChattingDD = True
  352. IsNativeDD = True
  353. ArrowModeDD = True
  354. UseJoystickDD = False
  355. ScreenShotQualityDD = 0
  356. PartyLootingDD = 1
  357. LocalMapDD = Entry.unr
  358. }
  359. ; Reading LineageII Options.ini properties in the order it show on the window !
  360. ; Get info Tab "Video"
  361. IniRead, StartupFullScreen, %L2OSDIR%/System/Option.ini, Video, StartupFullScreen
  362. IniRead, AltTabFix, %L2OSDIR%/System/Option.ini, Game, AltTabFix
  363. IniRead, Gamma, %L2OSDIR%/System/Option.ini, Video, Gamma
  364. IniRead, TextureDetail, %L2OSDIR%/System/Option.ini, Video, TextureDetail
  365. IniRead, ModelDetail, %L2OSDIR%/System/Option.ini, Video, ModelDetail
  366. IniRead, SkipAnim, %L2OSDIR%/System/Option.ini, Video, SkipAnim
  367. IniRead, PawnShadow, %L2OSDIR%/System/Option.ini, Video, PawnShadow
  368. IniRead, RenderDeco, %L2OSDIR%/System/Option.ini, Video, RenderDeco
  369. IniRead, Terrain, %L2OSDIR%/System/Option.ini, ClippingRange, Terrain
  370. IniRead, Pawn, %L2OSDIR%/System/Option.ini, ClippingRange, Pawn
  371. IniRead, RenderActorLimited, %L2OSDIR%/System/Option.ini, Video, RenderActorLimited
  372. IniRead, IsUseEffect, %L2OSDIR%/System/Option.ini, L2WaterEffect, IsUseEffect
  373. IniRead, AntiAliasing, %L2OSDIR%/System/Option.ini, Video, AntiAliasing
  374. IniRead, Glow, %L2OSDIR%/System/Option.ini, Video, Glow
  375. IniRead, UseTrilinear, %L2OSDIR%/System/Option.ini, Video, UseTrilinear
  376. IniRead, UseColorCursor, %L2OSDIR%/System/Option.ini, Video, UseColorCursor
  377. IniRead, LowDetail, %L2OSDIR%/System/Option.ini, Video, LowDetail
  378.  
  379. ; Get info Tab "Audio"
  380. IniRead, SoundVolume, %L2OSDIR%/System/Option.ini, Audio, SoundVolume
  381. IniRead, MusicVolume, %L2OSDIR%/System/Option.ini, Audio, MusicVolume
  382. IniRead, WavVoiceVolume, %L2OSDIR%/System/Option.ini, Audio, WavVoiceVolume
  383. IniRead, OggVoiceVolume, %L2OSDIR%/System/Option.ini, Audio, OggVoiceVolume
  384.  
  385. ; Check if the data GameMode is Dev-Mode or Original or empty and arrange the gui in the proper way.
  386. IfNotExist Original, %L2OSDIR%/System/L2-dev.ini
  387. {
  388. IfNotExist Original, %L2OSDIR%/System/L2-off.ini
  389. {
  390. ; Create a Default "L2-dev.ini" in case the files isn't available, So it check if the -dev exist if not it check if -off exist (that way it detect if the game is already in dev mode or not.)
  391. FileAppend, [URL]`nProtocol=unreal`nProtocolDescription=Unreal Protocol`nName=Player`nMap=Index.unr`nLocalMap=Entry.unr`nHost=`nPortal=`nMapExt=unr`nEXEName=l2.exe`nSaveExt=usa`nPort=7777`nClass=LineageWarrior.MFighter`nServerAddr=127.0.0.1`nIsL2NetLogin=False`nIsL2Console=False`nIsL2Seamless=True`nIsL2Projector=True`nISL2Mark=True`nForceAspectRatio=False`nAspectRatio=1.334`nIsDefaultShaodw=False`nIsUnderWaterEffect=False`nIsUseCommand=False`nL2VersionCheck=false`nIsL2MemLog=False`nL2ThreadFilter=0`nL2TestServer=false`nEnablePurgeLevel=True`nSharedSky=True`nL2MaxPawnResourceLoad=1.0`nL2UseKeyCrypt=false`n`n[L2WaterEffect]`nColorReference=(A=180`,R=38`,G=56`,B=64`,RR=150)`nEffectResolution=512`n`n[LanguageSet]`nLanguage=0`n`n[FontSet]`n;Font=L2Font.Japan`n;Glyph=Japan.gly`nFont=L2Font.gulim`nGlyph=gulim.gly`n`n[CharacterDisplay]`nName=true`nDist=1000`n`n[ClippingRange]`nPawnMax=3.0`nPawnMin=1.5`nAntiPortal=1.5`nTerrain=8.0`nStaticMesh=4.0`nProjector=0.2`nStaticMeshLod=5.0`nPawn=2.0`nActor=4.0`n`n[AutoLogOn]`nIsL2AutoLogOn=True`nL2ID=Baoulettes`nL2Passwd=FakePassword`nL2Slot=7`n`n[FirstRun]`nFirstRun=2110`n`n[Engine.Engine]`nRenderDevice=D3DDrv.D3DRenderDevice`n;RenderDevice=Engine.NullRenderDevice`n;RenderDevice=OpenGLDrv.OpenGLRenderDevice`nAudioDevice=ALAudio.ALAudioSubsystem`n;AudioDevice=XboxAudio.XboxAudioSubsystem`nNetworkDevice=IpDrv.TcpNetDriver`nDemoRecordingDevice=Engine.DemoRecDriver`nConsole=Engine.Console`nDefaultPlayerMenu=UDebugMenu.UDebugRootWindow`nLanguage=int`nGameEngine=Engine.GameEngine`nEditorEngine=Editor.EditorEngine`nGUIController=Engine.BaseGUIController`n;DefaultGame=WarfareGame.WarfareTeamGame`n;DefaultServerGame=WarfareGame.WarfareTeamGame`nDefaultGame=Engine.GameInfo`nDefaultServerGame=Engine.GameInfo`nViewportManager=WinDrv.WindowsClient`n;ViewportManager=XboxDrv.XboxClient`n;ViewportManager=SDLDrv.SDLClient`nRender=Render.Render`nInput=Engine.Input`nCanvas=Engine.Canvas`nDefaultPlayerController=Engine.LineagePlayerController`nL2NetHandler=Engine.NetHandler`nL2Console=NWindow.ConsoleWnd`nL2Font=NWindow.L2Font`n`n[Core.System]`nPurgeCacheDays=1`nSavePath=../Save`nCachePath=../Cache`nCacheExt=.uxx`n`nPaths=../System/*.u`nPaths=../StaticMeshes/*.usx`nPaths=../Textures/*.utx`nPaths=../Sounds/*.uax`nPaths=../Voice/*.uax`nPaths=../Maps/*.unr`n;Paths=../Music/*.umx`nPaths=../Animations/*.ukx`nPaths=../SysTextures/*.utx`nPaths=../Animations/*.usk`nPaths=../Saves/*.uvx`nSuppress=DevLoad`nSuppress=DevSave`nSuppress=DevNetTraffic`nSuppress=DevGarbage`nSuppress=DevKill`nSuppress=DevReplace`nSuppress=DevCompile`nSuppress=DevBind`nSuppress=DevBsp`n`n[Engine.GameEngine]`nCacheSizeMegs=32`nUseSound=True`n;ServerActors=IpDrv.UdpBeacon`n;ServerActors=IpServer.UdpServerQuery`n;ServerActors=IpServer.UdpServerUplink MasterServerAddress=unreal.epicgames.com MasterServerPort=27900`n;ServerActors=UWeb.WebServer`nServerPackages=AmbientCreatures`n;ServerPackages=WarEffects`n;ServerPakages=Decorations`nServerPackages=GamePlay`nServerPackages=UnrealGame`n;ServerPackages=WarfareGame`n;ServerPackages=WarClassLight`n;ServerPackages=WarClassHeavy`n;ServerPackages=WarClassMisc`n;ServerPackages=Pickups`n`n[WinDrv.WindowsClient]`nWindowedViewportX=1024`nWindowedViewportY=768`nFullscreenViewportX=1024`nFullscreenViewportY=768`nMenuViewportX=1024`nMenuViewportY=768`nBrightness=0.800000`nContrast=0.700000`nGamma=0.800000`nUseJoystick=False`nCaptureMouse=True`nStartupFullscreen=False`nUseWindowFrame=true`nScreenFlashes=True`nNoLighting=False`nMinDesiredFrameRate=35.000000`nDecals=True`nCoronas=True`nDecoLayers=True`nProjectors=True`nNoDynamicLights=False`nReportDynamicUploads=False`nTextureDetailInterface=Higher`nTextureDetailTerrain=Higher`nTextureDetailWeaponSkin=Higher`nTextureDetailPlayerSkin=Higher`nTextureDetailWorld=Higher`nTextureDetailRenderMap=Higher`nTextureDetailLightmap=Higher`nNoFractalAnim=False`nScaleHUDX=0.0`n`n[SDLDrv.SDLClient]`nWindowedViewportX=640`nWindowedViewportY=480`nFullscreenViewportX=800`nFullscreenViewportY=600`nMenuViewportX=640`nMenuViewportY=480`nBrightness=0.800000`nContrast=0.700000`nGamma=0.800000`nUseJoystick=False`nJoystickNumber=0`nIgnoreHat=False`nJoystickHatNumber=0`nCaptureMouse=True`nStartupFullscreen=False`nScreenFlashes=True`nNoLighting=False`nMinDesiredFrameRate=35.000000`nDecals=True`nCoronas=True`nDecoLayers=True`nProjectors=True`nNoDynamicLights=False`nReportDynamicUploads=False`nTextureDetailInterface=Normal`nTextureDetailTerrain=Normal`nTextureDetailWeaponSkin=Normal`nTextureDetailPlayerSkin=Normal`nTextureDetailWorld=Normal`nTextureDetailRenderMap=Normal`nTextureDetailLightmap=UltraHigh`nNoFractalAnim=False`n`n[Engine.Player]`nConfiguredInternetSpeed=10000`nConfiguredLanSpeed=20000`n`n[ALAudio.ALAudioSubsystem]`nUseEAX=False`nUse3DSound=False`nUseDefaultDriver=True`nCompatibilityMode=False`nUsePrecache=True`nReverseStereo=false`nChannels=32`nMusicVolume=0.1`nAmbientVolume=1.0`nSoundVolume=1.0`nDopplerFactor=1.0`nRolloff=0.5`nTimeBetweenHWUpdates=15`nDisablePitch=False`nLowQualitySound=False`n`n[IpDrv.TcpNetDriver]`nAllowDownloads=True`nConnectionTimeout=15.0`nInitialConnectTimeout=500.0`nAckTimeout=1.0`nKeepAliveTime=0.2`nMaxClientRate=20000`nSimLatency=0`nRelevantTimeout=5.0`nSpawnPrioritySeconds=1.0`nServerTravelPause=4.0`nNetServerMaxTickRate=20`nLanServerMaxTickRate=35`nDownloadManagers=IpDrv.HTTPDownload`nDownloadManagers=Engine.ChannelDownload`n`n[IpDrv.HTTPDownload]`nRedirectToURL=`nProxyServerHost=`nProxyServerPort=3128`nUseCompression=True`n`n[Engine.DemoRecDriver]`nDemoSpectatorClass=Warriors.CHSpectator`nMaxClientRate=25000`nConnectionTimeout=15.0`nInitialConnectTimeout=500.0`nAckTimeout=1.0`nKeepAliveTime=1.0`nSimLatency=0`nRelevantTimeout=5.0`nSpawnPrioritySeconds=1.0`nServerTravelPause=4.0`nNetServerMaxTickRate=60`nLanServerMaxTickRate=60`n`n[Engine.GameReplicationInfo]`nServerName=Another Unreal Server`nShortName=Unreal Server`n`n[IpDrv.TcpipConnection]`nSimPacketLoss=0`nSimLatency=0`n`n[IpServer.UdpServerQuery]`nGameName=ut`n`n[IpDrv.UdpBeacon]`nDoBeacon=True`nBeaconTime=0.50`nBeaconTimeout=5.0`nBeaconProduct=ut`n`n[XboxDrv.XboxClient]`nTextureDetail=Medium`nSkinDetail=Medium`nLightmapDetail=High`nTextureMinLOD=6`nTextureMaxLOD=9`nBrightness=0.8`nContrast=0.7`nGamma=0.8`nNoFractalAnim=True`n`n[XBoxAudio.XBoxAudioSubsystem]`nReverseStereo=False`nChannels=32`nMusicVolume=1.0`nSoundVolume=1.0`nAmbientFactor=1.0`nUsePrecache=True`n`n[D3DDrv.D3DRenderDevice]`nDetailTextures=True`nHighDetailActors=True`nSuperHighDetailActors=True`nUsePrecaching=True`nUseTrilinear=True`nAdapterNumber=-1`nReduceMouseLag=True`nUseTripleBuffering=False`nUseHardwareTL=True`nUseHardwareVS=True`nUseCubemaps=True`nDesiredRefreshRate=60`nUseCompressedLightmaps=True`nUseStencil=False`nUse16bit=False`nUse16bitTextures=False`nMaxPixelShaderVersion=255`nUseVSync=False`nLevelOfAnisotropy=1`nDetailTexMipBias=0.8`nDefaultTexMipBias=-0.5`nUseNPatches=False`nTesselationFactor=1.0`nCheckForOverflow=False`n`n[OpenGLDrv.OpenGLRenderDevice]`nDetailTextures=True`nHighDetailActors=True`nSuperHighDetailActors=True`nUsePrecaching=True`nUseCompressedLightmaps=True`nUseTrilinear=True`nUseStencil=False`nMaxTextureUnits=8`nVARSize=32`nReduceMouseLag=False`n`n[Engine.NullRenderDevice]`nDetailTextures=True`nHighDetailActors=True`nSuperHighDetailActors=True`nUsePrecaching=True`nUseCompressedLightmaps=True`nUseStencil=False`n`n[Editor.EditorEngine]`nUseSound=True`nCacheSizeMegs=32`nGridEnabled=True`nSnapVertices=False`nSnapDistance=10.000000`nGridSize=(X=16.000000`,Y=16.000000`,Z=16.000000)`nRotGridEnabled=True`nRotGridSize=(Pitch=1024`,Yaw=1024`,Roll=1024)`nGameCommandLine=-log`nFovAngleDegrees=90.000000`nGodMode=True`nAutoSave=True`nAutoSaveTimeMinutes=5`nAutoSaveIndex=6`nUseAxisIndicator=True`nMatineeCurveDetail=0.1`nLoadEntirePackageWhenSaving=0`nEditPackages=Core`nEditPackages=Engine`nEditPackages=Fire`nEditPackages=Editor`nEditPackages=UWindow`nEditPackages=UnrealEd`nEditPackages=IpDrv`nEditPackages=GamePlay`nEditPackages=LineageEffect`nEditPackages=LineageWarrior`nEditPackages=LineageNpc`nEditPackages=LineageMonster`nEditPackages=LineageMonster2`nEditPackages=LineageVehicle`nEditPackages=LineageDeco`nEditPackages=LineageEnv`nEditPackages=UDebugMenu`n;EditPackages=WarEffects`n;EditPackages=Decorations`n;EditPackages=WarfareGame`n;EditPackages=IHVDemoContent`n;EditPackages=Pickups`n;EditPackages=WarClassLight`n;EditPackages=WarClassHeavy`n;EditPackages=WarClassMisc`n;EditPackages=AmbientCreatures`n;EditPackages=Vehicles`n;EditPackages=UPreview`n`n[UMenu.UnrealConsole]`nRootWindow=UMenu.UMenuRootWindow`nUWindowKey=IK_Esc`nShowDesktop=True`n`n[UMenu.UMenuMenuBar]`nShowHelp=True`nGameUMenuDefault=UTMenu.UTGameMenu`nMultiplayerUMenuDefault=UTMenu.UTMultiplayerMenu`nOptionsUMenuDefault=UTMenu.UTOptionsMenu`n`n[Engine.GameInfo]`nbLowGore=False`nbVeryLowGore=False`n`n[UWeb.WebServer]`n;Applications[0]=UTServerAdmin.UTServerAdmin`n;ApplicationPaths[0]=/ServerAdmin`n;Applications[1]=UTServerAdmin.UTImageServer`n;ApplicationPaths[1]=/images`nDefaultApplication=0`nbEnabled=False`n`n[Engine.LevelInfo]`nPhysicsDetailLevel=PDL_Medium`n`n[Engine.Console]`nConsoleKey=9`n`n[WindowPositions]`nGameLog=(X=0`,Y=0`,XL=512`,YL=256)`n`n[L2PawnViewer]`nST_HEAD=0`nST_RHAND=0`nST_LHAND=0`nST_GLOVES=0`nST_CHEST=0`nST_LEGS=0`nST_FEET=0`nST_BACK=0`nST_RLHAND=20019`n, %L2OSDIR%/System/L2-dev.ini
  392. }
  393. }
  394.  
  395. ; Get info Tab "Game"
  396. IniRead, TransparencyMode, %L2OSDIR%/System/Option.ini, Game, TransparencyMode
  397. IniRead, GameMode, %L2OSDIR%/System/Option.ini, Game, GameMode
  398. IniRead, MyName, %L2OSDIR%/System/Option.ini, Game, MyName
  399. IniRead, NPCName, %L2OSDIR%/System/Option.ini, Game, NPCName
  400. IniRead, GroupName, %L2OSDIR%/System/Option.ini, Game, GroupName
  401. IniRead, PledgeMemberName, %L2OSDIR%/System/Option.ini, Game, PledgeMemberName
  402. IniRead, PartyMemberName, %L2OSDIR%/System/Option.ini, Game, PartyMemberName
  403. IniRead, OtherPCName, %L2OSDIR%/System/Option.ini, Game, OtherPCName
  404. IniRead, EnterChatting, %L2OSDIR%/System/Option.ini, Game, EnterChatting
  405. IniRead, AutoTrackingPawn, %L2OSDIR%/System/Option.ini, Game, AutoTrackingPawn
  406. IniRead, OldChatting, %L2OSDIR%/System/Option.ini, Game, OldChatting
  407. IniRead, IsNative, %L2OSDIR%/System/Option.ini, Game, IsNative
  408. IniRead, ArrowMode, %L2OSDIR%/System/Option.ini, Game, ArrowMode
  409. IniRead, UseJoystick, %L2OSDIR%/System/Option.ini, Game, UseJoystick
  410. IniRead, ScreenShotQuality, %L2OSDIR%/System/Option.ini, Game, ScreenShotQuality
  411. IniRead, PartyLooting, %L2OSDIR%/System/Option.ini, Game, PartyLooting
  412.  
  413. ;Read L2.ini to know what map DEV-console would need.
  414. IfExist, %L2OSDIR%\system\L2-off.ini
  415. {
  416.     IniRead, LocalMap, %L2OSDIR%/System/L2.ini, URL, LocalMap
  417.     ; Directly Set variable there to do less coding stuff.
  418.     StringTrimRight, LocalMapReC, LocalMap, 4
  419.     LocalMapDD = %LocalMapReC%
  420. }
  421. Else
  422. {
  423.     IniRead, LocalMap, %L2OSDIR%/System/L2-dev.ini, URL, LocalMap
  424.     StringTrimRight, LocalMapReC, LocalMap, 4
  425.     LocalMapDD = %LocalMapReC%
  426. }
  427. ; Convert parsed data to variable compatible.
  428. ; Check if the data StartupFullScreen is true or false and arrange the gui in the proper way.
  429. If StartupFullScreen = False
  430. {
  431. StartupFullScreenDD=True|False||
  432. }
  433. If StartupFullScreen = True
  434. {
  435. StartupFullScreenDD=True||False
  436. }
  437. ; Check if the data AltTabFix is true or false or empty and arrange the gui in the proper way.
  438. If AltTabFix =  
  439. {
  440. AltTabFixDD = True|False||
  441. ; I used this trick to write the properties for next time to make it a bit faster in the check.
  442. IniWrite, False, %L2OSDIR%/System/Option.ini, Game, AltTabFix
  443. }
  444. If AltTabFix =  ERROR
  445. {
  446. AltTabFixDD = True|False||
  447. IniWrite, False, %L2OSDIR%/System/Option.ini, Game, AltTabFix
  448. }
  449. If AltTabFix = False
  450. {
  451. AltTabFixDD = True|False||
  452. }
  453. If AltTabFix = True
  454. {
  455. AltTabFixDD = True||False
  456. }
  457.  
  458. ; Check the data Gamma and arrange the gui in the proper way it can be any of this :
  459. ; Gamma=0.800000|0.900000|1.000000|1.100000|1.200000
  460. ; Game= 1       |2       |3       |4       |5
  461. ; I made a little variable check and rename to make it user-friendly & Lineage like.
  462. If Gamma =
  463. {
  464. GammaDD = 1|2|3||4|5
  465. }
  466. If Gamma = ERROR
  467. {
  468. GammaDD = 1|2|3||4|5
  469. }
  470. If Gamma = 0.800000
  471. {
  472. GammaDD = 1||2|3|4|5
  473. }
  474. If Gamma = 0.900000
  475. {
  476. GammaDD = 1|2||3|4|5
  477. }
  478. If Gamma = 1.000000
  479. {
  480. GammaDD = 1|2|3||4|5
  481. }
  482. If Gamma = 1.100000
  483. {
  484. GammaDD = 1|2|3|4||5
  485. }
  486. If Gamma = 1.200000
  487. {
  488. GammaDD = 1|2|3|4|5||
  489. }
  490.  
  491. ; Check the data TextureDetail and arrange the gui in the proper way.
  492. If TextureDetail = 0
  493. {
  494. TextureDetailDD = 0||1|2
  495. }
  496. If TextureDetail = 1
  497. {
  498. TextureDetailDD = 0|1||2
  499. }
  500. If TextureDetail = 2
  501. {
  502. TextureDetailDD = 0|1|2||
  503. }
  504.  
  505. ; Check the data ModelDetail and arrange the gui in the proper way.
  506. If ModelDetail = 0
  507. {
  508. ModelDetailDD = 0||1
  509. }
  510. If ModelDetail = 1
  511. {
  512. ModelDetailDD = 0|1||
  513. }
  514.  
  515. ; Check the data SkipAnim and arrange the gui in the proper way.
  516. If SkipAnim = 0
  517. {
  518. SkipAnimDD = 0||1
  519. }
  520. If SkipAnim = 1
  521. {
  522. SkipAnimDD = 0|1||
  523. }
  524.  
  525. ; Check the data PawnShadow and arrange the gui in the proper way.
  526. If PawnShadow = false
  527. {
  528. Gui, 2:Tab, 1
  529. Gui, 2:Add, CheckBox, vPawnShadowDD x21 y227 w100 h20 , Shadows
  530. }
  531. If PawnShadow = true
  532. {
  533. Gui, 2:Tab, 1
  534. Gui, 2:Add, CheckBox, Checked vPawnShadowDD x21 y227 w100 h20 , Shadows
  535. }
  536.  
  537. ; Check the data RenderDeco and arrange the gui in the proper way.
  538. If RenderDeco = false
  539. {
  540. Gui, 2:Tab, 1
  541. Gui, 2:Add, CheckBox, vRenderDecoDD x131 y227 w110 h20 , Ground Detail
  542. }
  543. If RenderDeco = true
  544. {
  545. Gui, 2:Tab, 1
  546. Gui, 2:Add, CheckBox, Checked vRenderDecoDD x131 y227 w110 h20 , Ground Detail
  547. }
  548.  
  549. ; Check the data Terrain and arrange the gui in the proper way.
  550. If Terrain = 4.000000
  551. {
  552. TerrainDD = 1||2|3|4|5
  553. }
  554. If Terrain = 5.000000
  555. {
  556. TerrainDD = 1|2||3|4|5
  557. }
  558. If Terrain = 6.000000
  559. {
  560. TerrainDD = 1|2|3||4|5
  561. }
  562. If Terrain = 7.000000
  563. {
  564. TerrainDD = 1|2|3|4||5
  565. }
  566. If Terrain = 8.000000
  567. {
  568. TerrainDD = 1|2|3|4|5||
  569. }
  570.  
  571. ; Check the data Pawn and arrange the gui in the proper way.
  572. If Pawn = 1.000000
  573. {
  574. PawnDD = 1||2|3|4|5
  575. }
  576. If Pawn = 1.500000
  577. {
  578. PawnDD = 1|2||3|4|5
  579. }
  580. If Pawn = 2.000000
  581. {
  582. PawnDD = 1|2|3||4|5
  583. }
  584. If Pawn = 2.500000
  585. {
  586. PawnDD = 1|2|3|4||5
  587. }
  588. If Pawn = 3.000000
  589. {
  590. PawnDD = 1|2|3|4|5||
  591. }
  592.  
  593. ; Check the data RenderActorLimited and arrange the gui in the proper way.
  594. ; Used a little trik to change "6" to "None" to make it more Lineage Like.
  595. If RenderActorLimited = 1
  596. {
  597. RenderActorLimitedDD = 1||2|3|4|5|None
  598. }
  599. If RenderActorLimited = 2
  600. {
  601. RenderActorLimitedDD = 1|2||3|4|5|None
  602. }
  603. If RenderActorLimited = 3
  604. {
  605. RenderActorLimitedDD = 1|2|3||4|5|None
  606. }
  607. If RenderActorLimited = 4
  608. {
  609. RenderActorLimitedDD = 1|2|3|4||5|None
  610. }
  611. If RenderActorLimited = 5
  612. {
  613. RenderActorLimitedDD = 1|2|3|4|5||None
  614. }
  615. If RenderActorLimited = 6
  616. {
  617. RenderActorLimitedDD = 1|2|3|4|5|None||
  618. }
  619.  
  620. ; Check the data IsUseEffect and arrange the gui in the proper way.
  621. If IsUseEffect = False
  622. {
  623. IsUseEffectDD = True|False||
  624. }
  625. If IsUseEffect = True
  626. {
  627. IsUseEffectDD = True||False
  628. }
  629.  
  630. ; Check the data AntiAliasing and arrange the gui in the proper way.
  631. If AntiAliasing = 0
  632. {
  633. AntiAliasingDD = 0||1|2
  634. }
  635. If AntiAliasing = 1
  636. {
  637. AntiAliasingDD = 0|1||2
  638. }
  639. If AntiAliasing = 2
  640. {
  641. AntiAliasingDD = 0|1|2||
  642. }
  643.  
  644. ; Check the data Glow and arrange the gui in the proper way.
  645. If Glow = false
  646. {
  647. Gui, 2:Tab, 1
  648. Gui, 2:Add, CheckBox, vGlowDD x21 y417 w100 h20 , Glow Effect
  649. }
  650. If Glow = true
  651. {
  652. Gui, 2:Tab, 1
  653. Gui, 2:Add, CheckBox, Checked vGlowDD x21 y417 w100 h20 , Glow Effect
  654. }
  655.  
  656. ; Check the data UseTrilinear and arrange the gui in the proper way.
  657. If UseTrilinear = false
  658. {
  659. Gui, 2:Tab, 1
  660. Gui, 2:Add, CheckBox, vUseTrilinearDD x131 y417 w100 h20 , Texture Filter
  661. }
  662. If UseTrilinear = true
  663. {
  664. Gui, 2:Tab, 1
  665. Gui, 2:Add, CheckBox, Checked vUseTrilinearDD x131 y417 w100 h20 , Texture Filter
  666. }
  667.  
  668. ; Check the data UseColorCursor and arrange the gui in the proper way.
  669. If UseColorCursor = false
  670. {
  671. Gui, 2:Tab, 1
  672. Gui, 2:Add, CheckBox, vUseColorCursorDD x21 y447 w100 h20 , Game Cursor
  673. }
  674. If UseColorCursor = true
  675. {
  676. Gui, 2:Tab, 1
  677. Gui, 2:Add, CheckBox, Checked vUseColorCursorDD x21 y447 w100 h20 , Game Cursor
  678. }
  679.  
  680. ; Check the data LowDetail and arrange the gui in the proper way.
  681. If LowDetail = false
  682. {
  683. Gui, 2:Tab, 1
  684. Gui, 2:Add, CheckBox, vLowDetailDD x131 y447 w100 h20 , Low detail
  685. }
  686. If LowDetail = true
  687. {
  688. Gui, 2:Tab, 1
  689. Gui, 2:Add, CheckBox, Checked vLowDetailDD x131 y447 w100 h20 , Low detail
  690. }
  691. ; In case that a first launch !
  692. If LowDetail =
  693. {
  694. Gui, 2:Tab, 1
  695. Gui, 2:Add, CheckBox, vLowDetailDD x131 y447 w100 h20 , Low detail
  696. IniWrite, False, %L2OSDIR%/System/Option.ini, Video, LowDetail
  697. }
  698. If LowDetail = ERROR
  699. {
  700. Gui, 2:Tab, 1
  701. Gui, 2:Add, CheckBox, vLowDetailDD x131 y447 w100 h20 , Low detail
  702. IniWrite, False, %L2OSDIR%/System/Option.ini, Video, LowDetail
  703. }
  704.  
  705. ; Check the data SoundVolume and arrange the gui in the proper way.
  706. ; Used a little trik to change "6" to "Off" to make it more Lineage Like.
  707. If SoundVolume = 0.200000
  708. {
  709. SoundVolumeDD = Off|1||2|3|4|5
  710. }
  711. If SoundVolume = 0.400000
  712. {
  713. SoundVolumeDD = Off|1|2||3|4|5
  714. }
  715. If SoundVolume = 0.600000
  716. {
  717. SoundVolumeDD = Off|1|2|3||4|5
  718. }
  719. If SoundVolume = 0.800000
  720. {
  721. SoundVolumeDD = Off|1|2|3|4||5
  722. }
  723. If SoundVolume = 1.000000
  724. {
  725. SoundVolumeDD = Off|1|2|3|4|5||
  726. }
  727. If SoundVolume = 0.000000
  728. {
  729. SoundVolumeDD = Off||1|2|3|4|5
  730. }
  731.  
  732. ; Check the data MusicVolume and arrange the gui in the proper way.
  733. ; Used a little trik to change "6" to "Off" to make it more Lineage Like.
  734. If MusicVolume = 0.200000
  735. {
  736. MusicVolumeDD = Off|1||2|3|4|5
  737. }
  738. If MusicVolume = 0.400000
  739. {
  740. MusicVolumeDD = Off|1|2||3|4|5
  741. }
  742. If MusicVolume = 0.600000
  743. {
  744. MusicVolumeDD = Off|1|2|3||4|5
  745. }
  746. If MusicVolume = 0.800000
  747. {
  748. MusicVolumeDD = Off|1|2|3|4||5
  749. }
  750. If MusicVolume = 1.000000
  751. {
  752. MusicVolumeDD = Off|1|2|3|4|5||
  753. }
  754. If MusicVolume = 0.000000
  755. {
  756. MusicVolumeDD = Off||1|2|3|4|5
  757. }
  758.  
  759. ; Check the data WavVoiceVolume and arrange the gui in the proper way.
  760. ; Used a little trik to change "6" to "Off" to make it more Lineage Like.
  761. If WavVoiceVolume = 0.200000
  762. {
  763. WavVoiceVolumeDD = Off|1||2|3|4|5
  764. }
  765. If WavVoiceVolume = 0.400000
  766. {
  767. WavVoiceVolumeDD = Off|1|2||3|4|5
  768. }
  769. If WavVoiceVolume = 0.600000
  770. {
  771. WavVoiceVolumeDD = Off|1|2|3||4|5
  772. }
  773. If WavVoiceVolume = 0.800000
  774. {
  775. WavVoiceVolumeDD = Off|1|2|3|4||5
  776. }
  777. If WavVoiceVolume = 1.000000
  778. {
  779. WavVoiceVolumeDD = Off|1|2|3|4|5||
  780. }
  781. If WavVoiceVolume = 0.000000
  782. {
  783. WavVoiceVolumeDD = Off||1|2|3|4|5
  784. }
  785.  
  786. ; Check the data OggVoiceVolume and arrange the gui in the proper way.
  787. ; Used a little trik to change "6" to "Off" to make it more Lineage Like.
  788. If OggVoiceVolume = 0.200000
  789. {
  790. OggVoiceVolumeDD = Off|1||2|3|4|5
  791. }
  792. If OggVoiceVolume = 0.400000
  793. {
  794. OggVoiceVolumeDD = Off|1|2||3|4|5
  795. }
  796. If OggVoiceVolume = 0.600000
  797. {
  798. OggVoiceVolumeDD = Off|1|2|3||4|5
  799. }
  800. If OggVoiceVolume = 0.800000
  801. {
  802. OggVoiceVolumeDD = Off|1|2|3|4||5
  803. }
  804. If OggVoiceVolume = 1.000000
  805. {
  806. OggVoiceVolumeDD = Off|1|2|3|4|5||
  807. }
  808. If OggVoiceVolume = 0.000000
  809. {
  810. OggVoiceVolumeDD = Off||1|2|3|4|5
  811. }
  812.  
  813. ; Check the data TransparencyMode and arrange the gui in the proper way.
  814. If TransparencyMode = false
  815. {
  816. Gui, 2:Tab, 3
  817. Gui, 2:Add, CheckBox, vTransparencyModeDD x155 y47 w95 h20 , Transparent
  818. }
  819. If TransparencyMode = true
  820. {
  821. Gui, 2:Tab, 3
  822. Gui, 2:Add, CheckBox, checked vTransparencyModeDD x155 y47 w95 h20 , Transparent
  823. }
  824.  
  825. If GameMode =  
  826. {
  827. GameModeDD = Dev-Mode|Original||
  828. ; I used this trick to write the properties for next time to make it a bit faster in the check.
  829. IniWrite, Original, %L2OSDIR%/System/Option.ini, Game, GameMode
  830. }
  831. If GameMode =  ERROR
  832. {
  833. GameModeDD = Dev-Mode|Original||
  834. IniWrite, Original, %L2OSDIR%/System/Option.ini, Game, GameMode
  835. }
  836. If GameMode = Original
  837. {
  838. GameModeDD = Dev-Mode|Original||
  839. }
  840. If GameMode = Dev-Mode
  841. {
  842. GameModeDD = Dev-Mode||Original
  843. }
  844.  
  845. ; Check the data MyName and arrange the gui in the proper way.
  846. If MyName = false
  847. {
  848. Gui, 2:Tab, 3
  849. Gui, 2:Add, CheckBox, vMyNameDD x91 y117 w90 h20 , Players
  850. }
  851. If MyName = true
  852. {
  853. Gui, 2:Tab, 3
  854. Gui, 2:Add, CheckBox, Checked vMyNameDD x91 y117 w90 h20 , Players
  855. }
  856.  
  857. ; Check the data NPCName and arrange the gui in the proper way.
  858. If NPCName = false
  859. {
  860. Gui, 2:Tab, 3
  861. Gui, 2:Add, CheckBox, vNPCNameDD x91 y137 w90 h20 , Monster
  862. }
  863. If NPCName = true
  864. {
  865. Gui, 2:Tab, 3
  866. Gui, 2:Add, CheckBox, Checked vNPCNameDD x91 y137 w90 h20 , Monster
  867. }
  868.  
  869. ; Check the data OtherPCName and arrange the gui in the proper way.
  870. If OtherPCName = false
  871. {
  872. Gui, 2:Tab, 3
  873. Gui, 2:Add, CheckBox, vOtherPCNameDD x91 y157 w90 h20 , Other PCs
  874. }
  875. If OtherPCName = true
  876. {
  877. Gui, 2:Tab, 3
  878. Gui, 2:Add, CheckBox, Checked vOtherPCNameDD x91 y157 w90 h20 , Other PCs
  879. }
  880.  
  881. ; Check the data PledgeMemberName and arrange the gui in the proper way.
  882. If PledgeMemberName = false
  883. {
  884. Gui, 2:Tab, 3
  885. Gui, 2:Add, CheckBox, vPledgeMemberNameDD x101 y177 w90 h20 , Clan
  886. }
  887. If PledgeMemberName = true
  888. {
  889. Gui, 2:Tab, 3
  890. Gui, 2:Add, CheckBox, Checked vPledgeMemberNameDD x101 y177 w90 h20 , Clan
  891. }
  892.  
  893. ; Check the data PartyMemberName and arrange the gui in the proper way.
  894. If PartyMemberName = false
  895. {
  896. Gui, 2:Tab, 3
  897. Gui, 2:Add, CheckBox, vPartyMemberNameDD x101 y197 w90 h20 , Party
  898. }
  899. If PartyMemberName = true
  900. {
  901. Gui, 2:Tab, 3
  902. Gui, 2:Add, CheckBox, checked vPartyMemberNameDD x101 y197 w90 h20 , Party
  903. }
  904.  
  905. ; Check the data GroupName and arrange the gui in the proper way.
  906. If GroupName = false
  907. {
  908. Gui, 2:Tab, 3
  909. Gui, 2:Add, CheckBox, vGroupNameDD x101 y217 w90 h20 , General
  910. }
  911. If GroupName = true
  912. {
  913. Gui, 2:Tab, 3
  914. Gui, 2:Add, CheckBox, vGroupNameDD Checked x101 y217 w90 h20 , General
  915. }
  916.  
  917. ; Check the data EnterChatting and arrange the gui in the proper way.
  918. If EnterChatting = false
  919. {
  920. Gui, 2:Tab, 3
  921. Gui, 2:Add, CheckBox, vEnterChattingDD x11 y257 w120 h20 , Enter Chat
  922. }
  923. If EnterChatting = true
  924. {
  925. Gui, 2:Tab, 3
  926. Gui, 2:Add, CheckBox, vEnterChattingDD x11 y257 w120 h20 , Enter Chat
  927. }
  928.  
  929. ; Check the data OldChatting and arrange the gui in the proper way.
  930. If OldChatting = false
  931. {
  932. Gui, 2:Tab, 3
  933. Gui, 2:Add, CheckBox, vOldChattingDD x11 y277 w120 h20 , Auto Code
  934. }
  935. If OldChatting = true
  936. {
  937. Gui, 2:Tab, 3
  938. Gui, 2:Add, CheckBox, Checked vOldChattingDD x11 y277 w120 h20 , Auto Code
  939. }
  940.  
  941. ; Check the data ArrowMode and arrange the gui in the proper way.
  942. If ArrowMode = false
  943. {
  944. Gui, 2:Tab, 3
  945. Gui, 2:Add, CheckBox, vArrowModeDD x11 y297 w120 h20 , 3D Arrow
  946. }
  947. If ArrowMode = true
  948. {
  949. Gui, 2:Tab, 3
  950. Gui, 2:Add, CheckBox, Checked vArrowModeDD x11 y297 w120 h20 , 3D Arrow
  951. }
  952.  
  953. ; Check the data AutoTrackingPawn and arrange the gui in the proper way.
  954. If AutoTrackingPawn = false
  955. {
  956. Gui, 2:Tab, 3
  957. Gui, 2:Add, CheckBox, vAutoTrackingPawnDD x141 y257 w110 h20 , Tracking
  958. }
  959. If AutoTrackingPawn = true
  960. {
  961. Gui, 2:Tab, 3
  962. Gui, 2:Add, CheckBox, vAutoTrackingPawnDD x141 y257 w110 h20 , Tracking
  963. }
  964.  
  965. ; Check the data IsNative and arrange the gui in the proper way.
  966. If IsNative = false
  967. {
  968. Gui, 2:Tab, 3
  969. Gui, 2:Add, CheckBox, vIsNativeDD x141 y277 w110 h20 , Key Security
  970. }
  971. If IsNative = true
  972. {
  973. Gui, 2:Tab, 3
  974. Gui, 2:Add, CheckBox, Checked vIsNativeDD x141 y277 w110 h20 , Key Security
  975. }
  976.  
  977. ; Check the data UseJoystick and arrange the gui in the proper way.
  978. If UseJoystick = false
  979. {
  980. Gui, 2:Tab, 3
  981. Gui, 2:Add, CheckBox, vUseJoystickDD x141 y297 w110 h20 , Game Pad
  982. }
  983. If UseJoystick = true
  984. {
  985. Gui, 2:Tab, 3
  986. Gui, 2:Add, CheckBox, Checked vUseJoystickDD  x141 y297 w110 h20 , Game Pad
  987. }
  988.  
  989. ; Check the data ScreenShotQuality and arrange the gui in the proper way.
  990. If ScreenShotQuality = 0
  991. {
  992. ScreenShotQualityDD = Bitmap||High Quality - JPG|Medium Quality - JPG|Low Quality - JPG
  993. }
  994. If ScreenShotQuality = 1
  995. {
  996. ScreenShotQualityDD = Bitmap|High Quality - JPG||Medium Quality - JPG|Low Quality - JPG
  997. }
  998. If ScreenShotQuality = 2
  999. {
  1000. ScreenShotQualityDD = Bitmap|High Quality - JPG|Medium Quality - JPG||Low Quality - JPG
  1001. }
  1002. If ScreenShotQuality = 3
  1003. {
  1004. ScreenShotQualityDD = Bitmap|High Quality - JPG|Medium Quality - JPG|Low Quality - JPG||
  1005. }
  1006.  
  1007. ; Check the data PartyLooting and arrange the gui in the proper way.
  1008. If PartyLooting = 0
  1009. {
  1010. PartyLootingDD = Finders Keepers||Random|Random Including Spoil|By Turn|By Turn Including Spoil
  1011. }
  1012. If PartyLooting = 1
  1013. {
  1014. PartyLootingDD = Finders Keepers|Random||Random Including Spoil|By Turn|By Turn Including Spoil
  1015. }
  1016. If PartyLooting = 2
  1017. {
  1018. PartyLootingDD = Finders Keepers|Random|Random Including Spoil||By Turn|By Turn Including Spoil
  1019. }
  1020. If PartyLooting = 3
  1021. {
  1022. PartyLootingDD = Finders Keepers|Random|Random Including Spoil|By Turn||By Turn Including Spoil
  1023. }
  1024. If PartyLooting = 4
  1025. {
  1026. PartyLootingDD = Finders Keepers|Random|Random Including Spoil|By Turn|By Turn Including Spoil||
  1027. }
  1028. ; Creating rest of Gui with default Variable in case the one provided is empty and the check failed for unknown reason.
  1029. ; All checkbox are in their corresponding "If" !
  1030.  
  1031. Gui, 2:Tab, 1
  1032. Gui, 2:Add, GroupBox, x5 y15 w250 h205 ,
  1033. Gui, 2:Add, GroupBox, x5 y210 w250 h45 ,
  1034. Gui, 2:Add, GroupBox, x5 y245 w250 h165 ,
  1035. Gui, 2:Add, GroupBox, x5 y400 w250 h70 ,
  1036. Gui, 2:Add, Text, x11 y37 w100 h30 , FullScreen
  1037. Gui, 2:Add, DropDownList, vStartupFullScreenDD r2 x131 y37 w110 h20 , %StartupFullScreenDD%
  1038.  
  1039. Gui, 2:Add, Text, x11 y67 w100 h30 , Alt+Tab Fix
  1040. Gui, 2:Add, DropDownList, vAltTabFixDD r2 x131 y67 w110 h24 , %AltTabFixDD%
  1041.  
  1042. Gui, 2:Add, Text, x11 y97 w100 h30 , Gamma
  1043. Gui, 2:Add, DropDownList, vGammaDD r5 x131 y97 w110 h24 , %GammaDD%
  1044.  
  1045. Gui, 2:Add, Text, x11 y127 w100 h30 , Textures
  1046. Gui, 2:Add, DropDownList, vTextureDetailDD r3 x131 y127 w110 h24 , %TextureDetailDD%
  1047.  
  1048. Gui, 2:Add, Text, x11 y157 w100 h30 , Modeling Detail
  1049. Gui, 2:Add, DropDownList, vModelDetailDD r2 x131 y157 w110 h24 , %ModelDetailDD%
  1050.  
  1051. Gui, 2:Add, Text, x11 y187 w100 h30 , Motion Detail
  1052. Gui, 2:Add, DropDownList, vSkipAnimDD r2 x131 y187 w110 h24 , %SkipAnimDD%
  1053.  
  1054. Gui, 2:Add, Text, x11 y257 w100 h30 , Terrain Range
  1055. Gui, 2:Add, DropDownList, vTerrainDD r5 x131 y257 w110 h24 , %TerrainDD%
  1056.  
  1057. Gui, 2:Add, Text, x11 y287 w100 h30 , PC/NPC Range
  1058. Gui, 2:Add, DropDownList, vPawnDD r5 x131 y287 w110 h24 , %PawnDD%
  1059.  
  1060. Gui, 2:Add, Text, x11 y317 w100 h30 , PC/NPC Limit
  1061. Gui, 2:Add, DropDownList, vRenderActorLimitedDD r6 x131 y317 w110 h24 , %RenderActorLimitedDD%
  1062.  
  1063. Gui, 2:Add, Text, x11 y347 w100 h30 , Reflection
  1064. Gui, 2:Add, DropDownList, vIsUseEffectDD r2 x131 y347 w110 h24 , %IsUseEffectDD%
  1065.  
  1066. Gui, 2:Add, Text, x11 y377 w100 h30 , Anti-Aliasing
  1067. Gui, 2:Add, DropDownList, vAntiAliasingDD r3 x131 y377 w110 h24 , %AntiAliasingDD%
  1068.  
  1069. Gui, 2:Tab, 2
  1070. Gui, 2:Add, GroupBox, x5 y37 w250 h150 ,
  1071. Gui, 2:Add, Text, x21 y57 w100 h30 , SFX Vol.
  1072. Gui, 2:Add, DropDownList, r6 vSoundVolumeDD x131 y57 w100 h20 , %SoundVolumeDD%
  1073. Gui, 2:Add, Text, x21 y87 w100 h30 , Music Vol.
  1074. Gui, 2:Add, DropDownList, r6 vMusicVolumeDD x131 y87 w100 h24 , %MusicVolumeDD%
  1075. Gui, 2:Add, Text, x21 y117 w100 h30 , System Voice
  1076. Gui, 2:Add, DropDownList, r6 vWavVoiceVolumeDD x131 y117 w100 h24 , %WavVoiceVolumeDD%
  1077. Gui, 2:Add, Text, x21 y147 w100 h30 , Tutorial Voice
  1078. Gui, 2:Add, DropDownList, r6 vOggVoiceVolumeDD x131 y147 w100 h24 , %OggVoiceVolumeDD%
  1079.  
  1080. Gui, 2:Tab, 3
  1081. Gui, 2:Add, GroupBox, x5 y35 w250 h40 ,
  1082. Gui, 2:Add, GroupBox, x5 y75 w250 h40 ,
  1083. Gui, 2:Add, GroupBox, x5 y115 w250 h130 ,
  1084. Gui, 2:Add, GroupBox, x5 y245 w250 h110 ,
  1085. Gui, 2:Add, GroupBox, x5 y355 w250 h50 ,
  1086. Gui, 2:Add, GroupBox, x5 y410 w250 h50 ,
  1087. Gui, 2:Add, Text, x11 y47 w80 h20 , Interface
  1088. Gui, 2:Add, Button, ginitizialisegui2 x91 y47 w60 h20 , Initialize
  1089. Gui, 2:Add, Text, x11 y87 w80 h20 , GameMode
  1090. Gui, 2:Add, DropDownList, vGameModeDD r2 x91 y87 w160 h20 , %GameModeDD%
  1091. Gui, 2:Add, Text, x11 y117 w80 h30 , Display
  1092. Gui, 2:Add, Text, x11 y327 w80 h20 , Screenshot
  1093. Gui, 2:Add, DropDownList, vScreenShotQualityDD r4 x91 y327 w160 h20 , %ScreenShotQualityDD%
  1094. Gui, 2:Add, Text, x11 y367 w80 h20 , Party Loot
  1095. Gui, 2:Add, DropDownList, vPartyLootingDD r5 x91 y367 w160 h24 , %PartyLootingDD%
  1096. Gui, 2:Add, Text, x11 y427 w100 h30 , Dev-Mod Map
  1097. Gui, 2:Add, Edit, vLocalMapDD x111 y423 w100 h25 , %LocalMapDD%
  1098. Gui, 2:Add, Text, x211 y427 w40 h30 , .unr
  1099. gui, 1:+Disabled
  1100. Gui, 2:Show, x591 y216 h508 w263, Options
  1101. Return
  1102.  
  1103. cancelgui2:
  1104. ; Load function to cancel same result than red cross so I use the same function.
  1105. goto 2GuiClose
  1106. return
  1107.  
  1108. defaultgui2:
  1109. ; Disable Gui number two to prevent any glitch
  1110. gui, 2:+Disabled
  1111. MsgBox, 4,, This will reset your option and windows location to default Medium value, Are you sure?
  1112. IfMsgBox Yes
  1113. {
  1114. ; Make back up.
  1115. ; Create Folder "Backup" in system in case it was not intended to be default-ed
  1116. FileCreateDir, %L2OSDIR%\system\Backup
  1117. FileMove, %L2OSDIR%\system\WindowsInfo.ini, %L2OSDIR%\system\Backup\WindowsInfo_%A_Hour%.%A_Min%-%A_DD%.%A_MM%.%A_YYYY%.ini
  1118. FileCopy, %L2OSDIR%\system\Option.ini, %L2OSDIR%\system\Backup\Option.ini
  1119. IfExist, %L2OSDIR%\system\L2-dev.ini
  1120. {
  1121.     FileCopy, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\Backup\L2-off_%A_Hour%.%A_Min%-%A_DD%.%A_MM%.%A_YYYY%.ini
  1122.     FileCopy, %L2OSDIR%\system\L2-dev.ini, %L2OSDIR%\system\Backup\L2-dev_%A_Hour%.%A_Min%-%A_DD%.%A_MM%.%A_YYYY%.ini
  1123. }
  1124. IfExist, %L2OSDIR%\system\L2-off.ini
  1125. {
  1126.     FileCopy, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\Backup\L2-dev_%A_Hour%.%A_Min%-%A_DD%.%A_MM%.%A_YYYY%.ini
  1127.     FileCopy, %L2OSDIR%\system\L2-off.ini, %L2OSDIR%\system\Backup\L2-off_%A_Hour%.%A_Min%-%A_DD%.%A_MM%.%A_YYYY%.ini
  1128. }
  1129.  
  1130. ; Assign Medium Detail - Fullscreen as "Default"
  1131. StartupFullScreenDD = True
  1132. AltTabFixDD = False
  1133. GammaDD = 3
  1134. TextureDetailDD = 0
  1135. ModelDetailDD = 0
  1136. SkipAnimDD = 1
  1137. PawnShadowDD = False
  1138. RenderDecoDD = False
  1139. TerrainDD = 6.000000
  1140. PawnDD = 2.000000
  1141. RenderActorLimitedDD = 3
  1142. IsUseEffectDD = False
  1143. AntiAliasingDD = 0
  1144. GlowDD = False
  1145. UseTrilinearDD = True
  1146. UseColorCursorDD = True
  1147. LowDetailDD = False
  1148. SoundVolumeDD = 0.600000
  1149. MusicVolumeDD = 0.600000
  1150. WavVoiceVolumeDD = 0.600000
  1151. OggVoiceVolumeDD = 0.600000
  1152. TransparencyModeDD = True
  1153. GameModeDD = Original
  1154. MyNameDD = True
  1155. NPCNameDD = True
  1156. GroupNameDD = True
  1157. PledgeMemberNameDD = True
  1158. PartyMemberNameDD = True
  1159. OtherPCNameDD = True
  1160. EnterChattingDD = False
  1161. AutoTrackingPawnDD = True
  1162. OldChattingDD = True
  1163. IsNativeDD = True
  1164. ArrowModeDD = True
  1165. UseJoystickDD = False
  1166. ScreenShotQualityDD = 0
  1167. PartyLootingDD = 1
  1168. LocalMapDD = Entry
  1169.  
  1170. ; Writing LineageII Options.ini properties !
  1171. ; Write info Tab "Video"
  1172. IniWrite, %StartupFullScreenDD%, %L2OSDIR%/System/Option.ini, Video, StartupFullScreen
  1173. IniWrite, %AltTabFixDD%, %L2OSDIR%/System/Option.ini, Game, AltTabFix
  1174. IniWrite, %GammaDD%, %L2OSDIR%/System/Option.ini, Video, Gamma
  1175. IniWrite, %TextureDetailDD%, %L2OSDIR%/System/Option.ini, Video, TextureDetail
  1176. IniWrite, %ModelDetailDD%, %L2OSDIR%/System/Option.ini, Video, ModelDetail
  1177. IniWrite, %SkipAnimDD%, %L2OSDIR%/System/Option.ini, Video, SkipAnim
  1178. IniWrite, %PawnShadowDD%, %L2OSDIR%/System/Option.ini, Video, PawnShadow
  1179. IniWrite, %RenderDecoDD%, %L2OSDIR%/System/Option.ini, Video, RenderDeco
  1180. IniWrite, %TerrainDD%, %L2OSDIR%/System/Option.ini, ClippingRange, Terrain
  1181. IniWrite, %PawnDD%, %L2OSDIR%/System/Option.ini, ClippingRange, Pawn
  1182. IniWrite, %RenderActorLimitedDD%, %L2OSDIR%/System/Option.ini, Video, RenderActorLimited
  1183. IniWrite, %IsUseEffectDD%, %L2OSDIR%/System/Option.ini, L2WaterEffect, IsUseEffect
  1184. IniWrite, %AntiAliasingDD%, %L2OSDIR%/System/Option.ini, Video, AntiAliasing
  1185. IniWrite, %GlowDD%, %L2OSDIR%/System/Option.ini, Video, Glow
  1186. IniWrite, %UseTrilinearDD%, %L2OSDIR%/System/Option.ini, Video, UseTrilinear
  1187. IniWrite, %UseColorCursorDD%, %L2OSDIR%/System/Option.ini, Video, UseColorCursor
  1188. IniWrite, %LowDetailDD%, %L2OSDIR%/System/Option.ini, Video, LowDetail
  1189.  
  1190. ; Write info Tab "Audio"
  1191. IniWrite, %SoundVolumeDD%, %L2OSDIR%/System/Option.ini, Audio, SoundVolume
  1192. IniWrite, %MusicVolumeDD%, %L2OSDIR%/System/Option.ini, Audio, MusicVolume
  1193. IniWrite, %WavVoiceVolumeDD%, %L2OSDIR%/System/Option.ini, Audio, WavVoiceVolume
  1194. IniWrite, %OggVoiceVolumeDD%, %L2OSDIR%/System/Option.ini, Audio, OggVoiceVolume
  1195.  
  1196. ; Write info Tab "Game"
  1197. IniWrite, %TransparencyModeDD%, %L2OSDIR%/System/Option.ini, Game, TransparencyMode
  1198. IniWrite, %GameModeDD%, %L2OSDIR%/System/Option.ini, Game, GameMode
  1199. IniWrite, %MyNameDD%, %L2OSDIR%/System/Option.ini, Game, MyName
  1200. IniWrite, %NPCNameDD%, %L2OSDIR%/System/Option.ini, Game, NPCName
  1201. IniWrite, %GroupNameDD%, %L2OSDIR%/System/Option.ini, Game, GroupName
  1202. IniWrite, %PledgeMemberNameDD%, %L2OSDIR%/System/Option.ini, Game, PledgeMemberName
  1203. IniWrite, %PartyMemberNameDD%, %L2OSDIR%/System/Option.ini, Game, PartyMemberName
  1204. IniWrite, %OtherPCNameDD%, %L2OSDIR%/System/Option.ini, Game, OtherPCName
  1205. IniWrite, %EnterChattingDD%, %L2OSDIR%/System/Option.ini, Game, EnterChatting
  1206. IniWrite, %AutoTrackingPawnDD%, %L2OSDIR%/System/Option.ini, Game, AutoTrackingPawn
  1207. IniWrite, %OldChattingDD%, %L2OSDIR%/System/Option.ini, Game, OldChatting
  1208. IniWrite, %IsNativeDD%, %L2OSDIR%/System/Option.ini, Game, IsNative
  1209. IniWrite, %ArrowModeDD%, %L2OSDIR%/System/Option.ini, Game, ArrowMode
  1210. IniWrite, %UseJoystickDD%, %L2OSDIR%/System/Option.ini, Game, UseJoystick
  1211. IniWrite, %ScreenShotQualityDD%, %L2OSDIR%/System/Option.ini, Game, ScreenShotQuality
  1212. IniWrite, %PartyLootingDD%, %L2OSDIR%/System/Option.ini, Game, PartyLooting
  1213. ; Write L2.ini to know what map DEV-console would need.
  1214. IfExist, %L2OSDIR%\system\L2-dev.ini
  1215. {
  1216.     IniWrite, %LocalMapDD%.unr, %L2OSDIR%\System\L2-dev.ini, URL, LocalMap
  1217. }
  1218. IfExist, %L2OSDIR%\system\L2-off.ini
  1219. {
  1220.     FileMove, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\L2-dev.ini
  1221.     FileMove, %L2OSDIR%\system\L2-off.ini, %L2OSDIR%\system\L2.ini
  1222.     IniWrite, %LocalMapDD%.unr, %L2OSDIR%\System\L2-dev.ini, URL, LocalMap
  1223. }
  1224. Msgbox Game settings, windows locations reseted to default !
  1225. Gui 2:Submit,Nohide
  1226. Gui, 2:Destroy
  1227. goto btnoption
  1228. }
  1229. else
  1230. {
  1231. gui, 2:-Disabled
  1232. Return
  1233. }
  1234.  
  1235. return
  1236.  
  1237. applygui2:
  1238. Gui 2:Submit,Nohide
  1239. ; Convert fancy Variable to game compatible datas.
  1240. If GammaDD = 1
  1241. {
  1242. GammaDD = 0.800000
  1243. }
  1244. If GammaDD = 2
  1245. {
  1246. GammaDD = 0.900000
  1247. }
  1248. If GammaDD = 3
  1249. {
  1250. GammaDD = 1.000000
  1251. }
  1252. If GammaDD = 4
  1253. {
  1254. GammaDD = 1.100000
  1255. }
  1256. If GammaDD = 4
  1257. {
  1258. GammaDD = 1.200000
  1259. }
  1260. If PawnShadowDD = 1
  1261. {
  1262. PawnShadowDD = true
  1263. }
  1264. If PawnShadowDD = 0
  1265. {
  1266. PawnShadowDD = false
  1267. }
  1268. If RenderDecoDD = 0
  1269. {
  1270. RenderDecoDD = false
  1271. }
  1272. If RenderDecoDD = 1
  1273. {
  1274. RenderDecoDD = true
  1275. }
  1276. If TerrainDD = 1
  1277. {
  1278. TerrainDD = 4.000000
  1279. }
  1280. If TerrainDD = 2
  1281. {
  1282. TerrainDD = 5.000000
  1283. }
  1284. If TerrainDD = 3
  1285. {
  1286. TerrainDD = 6.000000
  1287. }
  1288. If TerrainDD = 4
  1289. {
  1290. TerrainDD = 7.000000
  1291. }
  1292. If TerrainDD = 5
  1293. {
  1294. TerrainDD = 8.000000
  1295. }
  1296. If PawnDD = 1
  1297. {
  1298. PawnDD = 1.000000
  1299. }
  1300. If PawnDD = 2
  1301. {
  1302. PawnDD = 1.500000
  1303. }
  1304. If PawnDD = 3
  1305. {
  1306. PawnDD = 2.000000
  1307. }
  1308. If PawnDD = 4
  1309. {
  1310. PawnDD = 2.500000
  1311. }
  1312. If PawnDD = 5
  1313. {
  1314. PawnDD = 3.000000
  1315. }
  1316. If RenderActorLimitedDD = None
  1317. {
  1318. RenderActorLimitedDD = 6
  1319. }
  1320. If GlowDD = 1
  1321. {
  1322. GlowDD = true
  1323. }
  1324. If GlowDD = 0
  1325. {
  1326. GlowDD = false
  1327. }
  1328. If UseTrilinearDD = 1
  1329. {
  1330. UseTrilinearDD = true
  1331. }
  1332. If UseTrilinearDD = 0
  1333. {
  1334. UseTrilinearDD = false
  1335. }
  1336. If UseColorCursorDD = 1
  1337. {
  1338. UseColorCursorDD = true
  1339. }
  1340. If UseColorCursorDD = 0
  1341. {
  1342. UseColorCursorDD = false
  1343. }
  1344. If SoundVolumeDD = 1
  1345. {
  1346. SoundVolumeDD = 0.200000
  1347. }
  1348. If SoundVolumeDD = 2
  1349. {
  1350. SoundVolumeDD = 0.400000
  1351. }
  1352. If SoundVolumeDD = 3
  1353. {
  1354. SoundVolumeDD = 0.600000
  1355. }
  1356. If SoundVolumeDD = 4
  1357. {
  1358. SoundVolumeDD = 0.800000
  1359. }
  1360. If SoundVolumeDD = 5
  1361. {
  1362. SoundVolumeDD = 1.000000
  1363. }
  1364. If SoundVolumeDD = Off
  1365. {
  1366. SoundVolumeDD = 0.000000
  1367. }
  1368. If MusicVolumeDD = 1
  1369. {
  1370. MusicVolumeDD = 0.200000
  1371. }
  1372. If MusicVolumeDD = 2
  1373. {
  1374. MusicVolumeDD = 0.400000
  1375. }
  1376. If MusicVolumeDD = 3
  1377. {
  1378. MusicVolumeDD = 0.600000
  1379. }
  1380. If MusicVolumeDD = 4
  1381. {
  1382. MusicVolumeDD = 0.800000
  1383. }
  1384. If MusicVolumeDD = 5
  1385. {
  1386. MusicVolumeDD = 1.000000
  1387. }
  1388. If MusicVolumeDD = Off
  1389. {
  1390. MusicVolumeDD = 0.000000
  1391. }
  1392. If WavVoiceVolumeDD = 1
  1393. {
  1394. WavVoiceVolumeDD = 0.200000
  1395. }
  1396. If WavVoiceVolumeDD = 2
  1397. {
  1398. WavVoiceVolumeDD = 0.400000
  1399. }
  1400. If WavVoiceVolumeDD = 3
  1401. {
  1402. WavVoiceVolumeDD = 0.600000
  1403. }
  1404. If WavVoiceVolumeDD = 4
  1405. {
  1406. WavVoiceVolumeDD = 0.800000
  1407. }
  1408. If WavVoiceVolumeDD = 5
  1409. {
  1410. WavVoiceVolumeDD = 1.000000
  1411. }
  1412. If WavVoiceVolumeDD = Off
  1413. {
  1414. WavVoiceVolumeDD = 0.000000
  1415. }
  1416. If OggVoiceVolumeDD = 1
  1417. {
  1418. OggVoiceVolumeDD = 0.200000
  1419. }
  1420. If OggVoiceVolumeDD = 2
  1421. {
  1422. OggVoiceVolumeDD = 0.400000
  1423. }
  1424. If OggVoiceVolumeDD = 3
  1425. {
  1426. OggVoiceVolumeDD = 0.600000
  1427. }
  1428. If OggVoiceVolumeDD = 4
  1429. {
  1430. OggVoiceVolumeDD = 0.800000
  1431. }
  1432. If OggVoiceVolumeDD = 5
  1433. {
  1434. OggVoiceVolumeDD = 1.000000
  1435. }
  1436. If OggVoiceVolumeDD = Off
  1437. {
  1438. OggVoiceVolumeDD = 0.000000
  1439. }
  1440. If TransparencyModeDD = 1
  1441. {
  1442. TransparencyModeDD = true
  1443. }
  1444. If TransparencyModeDD = 0
  1445. {
  1446. TransparencyModeDD = false
  1447. }
  1448. If MyNameDD = 1
  1449. {
  1450. MyNameDD = true
  1451. }
  1452. If MyNameDD = 0
  1453. {
  1454. MyNameDD = false
  1455. }
  1456. If NPCNameDD = 1
  1457. {
  1458. NPCNameDD = true
  1459. }
  1460. If NPCNameDD = 0
  1461. {
  1462. NPCNameDD = false
  1463. }
  1464. If OtherPCNameDD = 1
  1465. {
  1466. OtherPCNameDD = true
  1467. }
  1468. If OtherPCNameDD = 0
  1469. {
  1470. OtherPCNameDD = false
  1471. }
  1472. If PledgeMemberNameDD = 1
  1473. {
  1474. PledgeMemberNameDD = true
  1475. }
  1476. If PledgeMemberNameDD = 0
  1477. {
  1478. PledgeMemberNameDD = false
  1479. }
  1480. If PartyMemberNameDDD = 1
  1481. {
  1482. PartyMemberNameDD = true
  1483. }
  1484. If PartyMemberNameDD = 0
  1485. {
  1486. PartyMemberNameDD = false
  1487. }
  1488. If GroupNameDD = 1
  1489. {
  1490. GroupNameDD = true
  1491. }
  1492. If GroupNameDD = 0
  1493. {
  1494. GroupNameDD = false
  1495. }
  1496. If EnterChattingDD = 1
  1497. {
  1498. EnterChattingDD = true
  1499. }
  1500. If EnterChattingDD = 0
  1501. {
  1502. EnterChattingDD = false
  1503. }
  1504. If OldChattingDD = 1
  1505. {
  1506. OldChattingDD = true
  1507. }
  1508. If OldChattingDD = 0
  1509. {
  1510. OldChattingDD = false
  1511. }
  1512. If ArrowModeDD = 1
  1513. {
  1514. ArrowModeDD = true
  1515. }
  1516. If ArrowModeDD = 0
  1517. {
  1518. ArrowModeDD = false
  1519. }
  1520. If AutoTrackingPawnDD = 1
  1521. {
  1522. AutoTrackingPawnDD = true
  1523. }
  1524. If AutoTrackingPawnDD = 0
  1525. {
  1526. AutoTrackingPawnDD = false
  1527. }
  1528. If IsNativeDD = 1
  1529. {
  1530. IsNativeDD = true
  1531. }
  1532. If IsNativeDD = 0
  1533. {
  1534. IsNativeDD = false
  1535. }
  1536. If UseJoystickDD = 1
  1537. {
  1538. UseJoystickDD = true
  1539. }
  1540. If UseJoystickDD = 0
  1541. {
  1542. UseJoystickDD = false
  1543. }
  1544. If ScreenShotQualityDD = Bitmap
  1545. {
  1546. ScreenShotQualityDD = 0
  1547. }
  1548. If ScreenShotQualityDD = High Quality - JPG
  1549. {
  1550. ScreenShotQualityDD = 1
  1551. }
  1552. If ScreenShotQualityDD = Medium Quality - JPG
  1553. {
  1554. ScreenShotQualityDD = 2
  1555. }
  1556. If ScreenShotQualityDD = Low Quality - JPG
  1557. {
  1558. ScreenShotQualityDD = 3
  1559. }
  1560. If PartyLootingDD = Finders Keepers
  1561. {
  1562. PartyLootingDD = 0
  1563. }
  1564. If PartyLootingDD = Random
  1565. {
  1566. PartyLootingDD = 1
  1567. }
  1568. If PartyLootingDD = Random Including Spoil
  1569. {
  1570. PartyLootingDD = 2
  1571. }
  1572. If PartyLootingDD = By Turn
  1573. {
  1574. PartyLootingDD = 3
  1575. }
  1576. If PartyLootingDD = By Turn Including Spoil
  1577. {
  1578. PartyLootingDD = 4
  1579. }
  1580. If LowDetailDD = 1
  1581. {
  1582. GammaDD = 1.000000
  1583. TextureDetailDD = 2
  1584. ModelDetailDD = 1
  1585. SkipAnimDD = 1
  1586. PawnShadowDD = False
  1587. RenderDecoDD = False
  1588. TerrainDD = 4.000000
  1589. PawnDD = 1.000000
  1590. RenderActorLimitedDD = 1
  1591. IsUseEffectDD = False
  1592. AntiAliasingDD = 0
  1593. GlowDD = False
  1594. UseTrilinearDD = False
  1595. UseColorCursorDD = False
  1596. LowDetailDD = True
  1597. }
  1598. If LowDetailDD = 0
  1599. {
  1600. LowDetailDD = False
  1601. }
  1602. ; Writing LineageII Options.ini properties !
  1603. ; Write info Tab "Video"
  1604. IniWrite, %StartupFullScreenDD%, %L2OSDIR%/System/Option.ini, Video, StartupFullScreen
  1605. IniWrite, %AltTabFixDD%, %L2OSDIR%/System/Option.ini, Game, AltTabFix
  1606. IniWrite, %GammaDD%, %L2OSDIR%/System/Option.ini, Video, Gamma
  1607. IniWrite, %TextureDetailDD%, %L2OSDIR%/System/Option.ini, Video, TextureDetail
  1608. IniWrite, %ModelDetailDD%, %L2OSDIR%/System/Option.ini, Video, ModelDetail
  1609. IniWrite, %SkipAnimDD%, %L2OSDIR%/System/Option.ini, Video, SkipAnim
  1610. IniWrite, %PawnShadowDD%, %L2OSDIR%/System/Option.ini, Video, PawnShadow
  1611. IniWrite, %RenderDecoDD%, %L2OSDIR%/System/Option.ini, Video, RenderDeco
  1612. IniWrite, %TerrainDD%, %L2OSDIR%/System/Option.ini, ClippingRange, Terrain
  1613. IniWrite, %PawnDD%, %L2OSDIR%/System/Option.ini, ClippingRange, Pawn
  1614. IniWrite, %RenderActorLimitedDD%, %L2OSDIR%/System/Option.ini, Video, RenderActorLimited
  1615. IniWrite, %IsUseEffectDD%, %L2OSDIR%/System/Option.ini, L2WaterEffect, IsUseEffect
  1616. IniWrite, %AntiAliasingDD%, %L2OSDIR%/System/Option.ini, Video, AntiAliasing
  1617. IniWrite, %GlowDD%, %L2OSDIR%/System/Option.ini, Video, Glow
  1618. IniWrite, %UseTrilinearDD%, %L2OSDIR%/System/Option.ini, Video, UseTrilinear
  1619. IniWrite, %UseColorCursorDD%, %L2OSDIR%/System/Option.ini, Video, UseColorCursor
  1620. IniWrite, %LowDetailDD%, %L2OSDIR%/System/Option.ini, Video, LowDetail
  1621.  
  1622. ; Write info Tab "Audio"
  1623. IniWrite, %SoundVolumeDD%, %L2OSDIR%/System/Option.ini, Audio, SoundVolume
  1624. IniWrite, %MusicVolumeDD%, %L2OSDIR%/System/Option.ini, Audio, MusicVolume
  1625. IniWrite, %WavVoiceVolumeDD%, %L2OSDIR%/System/Option.ini, Audio, WavVoiceVolume
  1626. IniWrite, %OggVoiceVolumeDD%, %L2OSDIR%/System/Option.ini, Audio, OggVoiceVolume
  1627.  
  1628. ; Write info Tab "Game"
  1629. IniWrite, %TransparencyModeDD%, %L2OSDIR%/System/Option.ini, Game, TransparencyMode
  1630. IniWrite, %GameModeDD%, %L2OSDIR%/System/Option.ini, Game, GameMode
  1631. IniWrite, %MyNameDD%, %L2OSDIR%/System/Option.ini, Game, MyName
  1632. IniWrite, %NPCNameDD%, %L2OSDIR%/System/Option.ini, Game, NPCName
  1633. IniWrite, %GroupNameDD%, %L2OSDIR%/System/Option.ini, Game, GroupName
  1634. IniWrite, %PledgeMemberNameDD%, %L2OSDIR%/System/Option.ini, Game, PledgeMemberName
  1635. IniWrite, %PartyMemberNameDD%, %L2OSDIR%/System/Option.ini, Game, PartyMemberName
  1636. IniWrite, %OtherPCNameDD%, %L2OSDIR%/System/Option.ini, Game, OtherPCName
  1637. IniWrite, %EnterChattingDD%, %L2OSDIR%/System/Option.ini, Game, EnterChatting
  1638. IniWrite, %AutoTrackingPawnDD%, %L2OSDIR%/System/Option.ini, Game, AutoTrackingPawn
  1639. IniWrite, %OldChattingDD%, %L2OSDIR%/System/Option.ini, Game, OldChatting
  1640. IniWrite, %IsNativeDD%, %L2OSDIR%/System/Option.ini, Game, IsNative
  1641. IniWrite, %ArrowModeDD%, %L2OSDIR%/System/Option.ini, Game, ArrowMode
  1642. IniWrite, %UseJoystickDD%, %L2OSDIR%/System/Option.ini, Game, UseJoystick
  1643. IniWrite, %ScreenShotQualityDD%, %L2OSDIR%/System/Option.ini, Game, ScreenShotQuality
  1644. IniWrite, %PartyLootingDD%, %L2OSDIR%/System/Option.ini, Game, PartyLooting
  1645. ; Write L2.ini to know what map DEV-console would need.
  1646. IfExist, %L2OSDIR%\system\L2-dev.ini
  1647. {
  1648.     IniWrite, %LocalMapDD%.unr, %L2OSDIR%\System\L2-dev.ini, URL, LocalMap
  1649. }
  1650. IfExist, %L2OSDIR%\system\L2-off.ini
  1651. {
  1652.     FileMove, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\L2-dev.ini
  1653.     FileMove, %L2OSDIR%\system\L2-off.ini, %L2OSDIR%\system\L2.ini
  1654.     IniWrite, %LocalMapDD%.unr, %L2OSDIR%\System\L2-dev.ini, URL, LocalMap
  1655. }
  1656. If IsUseEffect = False
  1657. {
  1658. IniWrite, 0, %L2OSDIR%/System/Option.ini, L2WaterEffect, EffectType
  1659. }
  1660. If IsUseEffect = True
  1661. {
  1662. IniWrite, 1, %L2OSDIR%/System/Option.ini, L2WaterEffect, EffectType
  1663. }
  1664. Gui, 2:Destroy
  1665. gui, 1:-Disabled
  1666. return
  1667.  
  1668. 2GuiClose:
  1669. gui, 2:+Disabled
  1670. MsgBox, 4,, Any unsaved change will be lost, Are you sure?
  1671. IfMsgBox Yes
  1672. {
  1673. Gui, 2:Destroy
  1674. gui, 1:-Disabled
  1675. Return
  1676. }
  1677. else
  1678. {
  1679. gui, 2:-Disabled
  1680. Return
  1681. }
  1682.  
  1683. btnPlay:
  1684. IniRead, GameMode, %L2OSDIR%/System/Option.ini, Game, GameMode
  1685. IniRead, AltTabFix, %L2OSDIR%/System/Option.ini, Game, AltTabFix
  1686.  
  1687. If GameMode = Dev-Mode
  1688. {
  1689.     If AltTabFix = True
  1690.     {
  1691.         IfExist, %L2OSDIR%\system\L2-dev.ini
  1692.         {
  1693.         FileMove, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\L2-off.ini
  1694.         FileMove, %L2OSDIR%\system\L2-dev.ini, %L2OSDIR%\system\L2.ini
  1695.         }
  1696.         Run, cmd /c CD %L2OSDIR%\system\ & runfirst.exe L2.exe,,Hide
  1697.         Goto GuiClose
  1698.     }
  1699.     else
  1700.     {
  1701.         IfExist, %L2OSDIR%\system\L2-dev.ini
  1702.         {
  1703.         FileMove, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\L2-off.ini
  1704.         FileMove, %L2OSDIR%\system\L2-dev.ini, %L2OSDIR%\system\L2.ini
  1705.         }
  1706.         Run, cmd /c CD %L2OSDIR%\system\ & L2.exe,,Hide
  1707.         Goto GuiClose
  1708.     }
  1709. }
  1710. Else
  1711. {
  1712.     If AltTabFix = True
  1713.     {
  1714.         IfExist, %L2OSDIR%\system\L2-off.ini
  1715.         {
  1716.         FileMove, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\L2-dev.ini
  1717.         FileMove, %L2OSDIR%\system\L2-off.ini, %L2OSDIR%\system\L2.ini
  1718.         }
  1719.         Run, cmd /c CD %L2OSDIR%\system\ & runfirst.exe L2.exe",,Hide
  1720.         Goto GuiClose
  1721.     }
  1722.     else
  1723.     {
  1724.         IfExist, %L2OSDIR%\system\L2-off.ini
  1725.         {
  1726.         FileMove, %L2OSDIR%\system\L2.ini, %L2OSDIR%\system\L2-dev.ini
  1727.         FileMove, %L2OSDIR%\system\L2-off.ini, %L2OSDIR%\system\L2.ini
  1728.         }
  1729.         Run, cmd /c CD %L2OSDIR%\system\ & L2.exe,,Hide
  1730.         Goto GuiClose
  1731.     }
  1732. }
  1733. return
  1734. initizialisegui2:
  1735. gui, 2:+Disabled
  1736. MsgBox, 4,, This will reset your game UI windows to default, Are you sure?
  1737. IfMsgBox Yes
  1738. {
  1739. ; Make back up.
  1740. ; Create Folder "Backup" in system in case it was not intended to be default-ed
  1741. FileCreateDir, %L2OSDIR%\system\Backup
  1742. FileMove, %L2OSDIR%\system\WindowsInfo.ini, %L2OSDIR%\system\Backup\WindowsInfo_%A_Hour%.%A_Min%-%A_DD%.%A_MM%.%A_YYYY%.ini
  1743. gui, 2:-Disabled
  1744. Return
  1745. }
  1746. else
  1747. {
  1748. gui, 2:-Disabled
  1749. Return
  1750. }
  1751.  
  1752.  
  1753.  
  1754. ; If the app is closed totaly close the process! & delete unused files. (prevent to be a mess!)
  1755. GuiClose:
  1756. FileDelete, %L2OSDIR%\L2OSlastlogs.ini
  1757. FileDelete, %L2OSDIR%\L2OSCheckFileList.ini
  1758. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement