Advertisement
Baoulettes

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

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