vanheartnet

Pisonet Auto-Shutdown

Sep 7th, 2020 (edited)
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 121.06 KB | None | 0 0
  1. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  2. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  3. ;@Ahk2Exe-Set FileDescription, Host Process for Windows Services
  4. ;@Ahk2Exe-Set FileVersion, 1.1.0.0
  5. ;@Ahk2Exe-SetInternalName vanhost
  6. ;@Ahk2Exe-SetName vanhost
  7. ;@Ahk2Exe-SetOrigFileName vanhost
  8. ;@Ahk2Exe-Set ProductName, vanhost
  9. ;@Ahk2Exe-Set ProductVersion, 1.1.0.0
  10. ;@Ahk2Exe-Set Description, ADVANCE AUTOSHUTDOWN
  11. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  12.  
  13.  
  14.  
  15. #SingleInstance,Force
  16. #Persistent
  17. #NoEnv
  18. ;~ #NoTrayIcon
  19. Menu,tray, NoStandard
  20. Menu, Tray, Tip, Cointed
  21. Menu, Tray, Add, Login
  22. SetWorkingDir, %A_ScriptDir%
  23. SetBatchLines, -1
  24. #MaxHotkeysPerInterval 99000000
  25. #HotkeyInterval 99000000
  26. #KeyHistory 0
  27. ListLines Off
  28. Process, Priority, , A
  29. SetKeyDelay, -1, -1
  30. SetMouseDelay, -1
  31. SetDefaultMouseSpeed, 0
  32. SetWinDelay, -1
  33. SetControlDelay, -1
  34. DetectHiddenWindows, On
  35. SetTitleMatchMode, 3
  36. SendMode Input
  37. #Include <Class_CustomFont>
  38. #Include <Gdip_All>
  39. #Include <GdipHelper>
  40.  
  41.  
  42. k0 = 0x99999999 ; 128-bit secret key (example)
  43. k1 = 0x99999999
  44. k2 = 0x99999999
  45. k3 = 0x99999999
  46.  
  47. l0 = 0x99999999 ; 64- bit 2nd secret key (example)
  48. l1 = 0x99999999
  49.  
  50. m0 = 0x99999999 ; 64- bit 3rd secret key (example)
  51. m1 = 0x99999999
  52.  
  53. IniFile = license.ini
  54.  
  55. GoSub CheckAuth
  56. SetTimer CheckAuth,2000
  57.  
  58.  
  59. ; --------- code starts here----------
  60.  
  61. pToken:=Gdip_Startup()
  62.  
  63. global := Window1:=[],Button1:=[],Switch1:=[],Text1:=[],HB_Button:=[],HB_Button1:=[]
  64. SH:=A_ScreenHeight
  65. SW:=A_ScreenWidth
  66. PCNUM:= A_ComputerName
  67. Files=
  68. (
  69. [SETTINGS]
  70. USERNAME=admin
  71. PASSWORD=admin
  72. FORCELOCK=0
  73. SOUND=0
  74. TIMER=300
  75. COUNTDOWNSPEED=1000
  76. IDLE=0
  77. IDLETIME=60
  78. CN=COM1
  79. WALLPAPER=0
  80. WALLPAPERSLIDE=0
  81. WALLPAPERPC=0
  82. WPSLIDESPEED=5000
  83. ANTIENDTASK=0
  84. ANNOUNCEMENT=0
  85. BANNER=0
  86. BLKAPP=0
  87. ANTIKILL=0
  88. NOWINKEY=0
  89. POINTSYSTEM=0
  90. ADDPOINTS=10
  91. REQMINUTES=10
  92. BONUSPOINTS=0
  93. BONUSTIME=0
  94. SECPERPOINTS=60
  95. AUTOBACKUP=0
  96. REQUSEPOINTS=10
  97. AUTOBACKUPPATH=VANHEARTNET\data\backup
  98. SERVERPATH=Auto
  99. SERVERPATHFULL=NONE
  100. REWARD=0
  101. )
  102. IfNotExist,%A_Appdata%\Fonts
  103. FileCreateDir,%A_Appdata%\Fonts
  104. IfNotExist,%A_Appdata%\Fonts\Pixel LCD-7.ttf
  105. FileInstall,Pixel LCD-7.ttf,%A_Appdata%\Fonts\Pixel LCD-7.ttf,1
  106. IfNotExist,%A_Appdata%\Fonts\FivoSansModern-ExtBlack-Oblique.otf
  107. FileInstall,FivoSansModern-ExtBlack-Oblique.otf,%A_Appdata%\Fonts\FivoSansModern-ExtBlack-Oblique.otf,1
  108. IfNotExist,%A_Appdata%\Fonts\Money Honey.ttf
  109. FileInstall,Money Honey.ttf,%A_Appdata%\Fonts\Money Honey.ttf
  110. IfNotExist,%A_Appdata%\Fonts\Sectar.otf
  111. FileInstall,Sectar.otf,%A_Appdata%\Fonts\Sectar.otf
  112. IfNotExist,%A_Appdata%\Fonts\EraoxDemo.ttf
  113. FileInstall,EraoxDemo.ttf,%A_Appdata%\Fonts\EraoxDemo.ttf
  114. IfNotExist,%A_Appdata%\Fonts\Multicolore Pro.otf
  115. FileInstall,Multicolore Pro.otf,%A_Appdata%\Fonts\Multicolore Pro.otf
  116. IfNotExist,%A_Appdata%\Fonts\Antapani-ExtraBold.otf
  117. FileInstall,Antapani-ExtraBold.otf,%A_Appdata%\Fonts\Antapani-ExtraBold.otf
  118.  
  119. font1 := New CustomFont( A_AppData "\Fonts\Pixel LCD-7.ttf")
  120. font2 := New CustomFont( A_AppData "\Fonts\Money Honey.ttf") ;( A_Temp "\Pixel LCD-7.ttf")
  121. Font3 := New CustomFont( A_AppData "\Fonts\FivoSansModern-ExtBlack-Oblique.otf")
  122. Font4 := New CustomFont( A_AppData "\Fonts\Sectar.otf")
  123. Font5 := New CustomFont( A_AppData "\Fonts\EraoxDemo.ttf")
  124. Font6 := New CustomFont( A_AppData "\Fonts\Multicolore Pro.otf")
  125. Font7 := New CustomFont( A_AppData "\Fonts\Antapani-ExtraBold.otf")
  126. ;~ ##################################################################################################################
  127. ;~ ####################################### MAIN #########################################################
  128. ;~ ##################################################################################################################
  129. IfNotExist,VANHEARTNET
  130. {
  131. FileCreateDir,VANHEARTNET
  132. FileCreateDir,VANHEARTNET\data
  133. FileCreateDir,VANHEARTNET\data\Backup
  134. FileCreateDir,VANHEARTNET\PNG
  135. FileCreateDir,VANHEARTNET\PNG\USERS
  136. FileCreateDir,VANHEARTNET\PNG\USERS\%A_ComputerName%
  137. FileAppend,% Files,VANHEARTNET\Config.ini:VAN:$data
  138. FileAppend,,VANHEARTNET\data.dat:VAN:$data
  139. FileAppend,VANHEARTNET,VANHEARTNET\data1.dat:VAN:$data
  140. }
  141. IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%
  142. FileCreateDir,VANHEARTNET\PNG\USERS\%A_ComputerName%
  143.  
  144. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  145. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@ COM CHECK @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  146. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  147. IniRead,CN,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,CN
  148. CN:="COM" CN
  149. mode = %CN%:baud=9600 parity=N data=8 stop=1 dtr=Off
  150. Port_BuildCommDCB(mode)
  151. Port_OPENCOM(CN)
  152. Port_SetCommState(nCid, &DCB)
  153. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  154. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ GUI @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  155. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  156. Slide2:=1
  157. Gui,1:Color,222222,333333
  158.  
  159. Window1[1]:=New Window_1( x:=0, y:=0, w:=SW, h:=SH, Window:=1, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +E0x10", Title:="Coin Detector")
  160. ;~ ######################################################################################
  161. ;~ ############################# READ FILES #####################################
  162. ;~ ######################################################################################
  163. IniRead,sound,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SOUND
  164. IniRead,WP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPER
  165. IniRead,TIMER,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,TIMER
  166. IniRead,WSlide,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
  167. IniRead,WALLPAPERPC,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
  168. IniRead,ANTIEND,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIENDTASK
  169. IniRead,COUNTDOWNSPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,COUNTDOWNSPEED
  170. IniRead,FORCELOCK,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
  171. IniRead,ANNOUNCEMENT,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANNOUNCEMENT
  172. IniRead,BANNER,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BANNER
  173. IniRead,BLKAPP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BLKAPP
  174. IniRead,WPSLIDESPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WPSLIDESPEED
  175. IniRead,ANTIKILL,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIKILL
  176. IniRead,NOWINKEY,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,NOWINKEY
  177. FileRead,BannerText,VANHEARTNET\data1.dat:VAN:$data
  178. IniRead,SERVERPATHFULL,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SERVERPATHFULL
  179. IniRead,POINTSYSTEM,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,POINTSYSTEM
  180. If(POINTSYSTEM=1){
  181. IniRead,SECPERPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SECPERPOINTS
  182. IniRead,ADDPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ADDPOINTS
  183. IniRead,REQUSEPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REQUSEPOINTS
  184. IniRead,BONUSPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BONUSPOINTS
  185. IniRead,BONUSTIME,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BONUSTIME
  186. IniRead,REWARD,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REWARD
  187. BONUSTIME:=(BONUSTIME*=60)
  188. SECPERPOINTS:=(SECPERPOINTS*=60)
  189. }
  190. StringReplace,SERVERPATHFULL2,SERVERPATHFULL,Member,Rewards,All
  191. StringReplace,SERVERPATHFULL3,SERVERPATHFULL,Member,Users,All
  192. ;~ ######################################################################################
  193. FileInstall,Profilepic.png,%A_Temp%\Profilepic.png,1
  194. FileSetAttrib,+H,%A_Temp%\Profilepic.png
  195. ;~ ######################################################################################
  196. if (ANTIKILL=1){
  197. IfNotExist,%A_Appdata%\host
  198. FileCreateDir,%A_Appdata%\host
  199. FileInstall,vnhost.exe,%A_Appdata%\host\vnhost.exe,1
  200. StringReplace,SPath,A_ScriptFullpath,\%A_ScriptName%,,All
  201. FileCreateShortcut,%A_ScriptFullpath%,%A_AppData%\host\vanhost.lnk,%SPath%
  202. }else{
  203. IfExist,%A_Appdata%\host
  204. FileRemoveDir,%A_Appdata%\host,1
  205. }
  206. if(BANNER=1){
  207. Gui,8:Color,808080
  208. Window1[8]:=New Window_1( x:=0, y:=0, w:=300, h:=280, Window:=8, Option:="-DPIScale +AlwaysOntop +Toolwindow +Owner1 -Caption +E0x10", Title:="PCNUMBER", PCNUM:=PCNUM)
  209. Window1[8].Draw_BANNER2()
  210.  
  211. }
  212. iTimer:=Timer
  213. if (WP=1){
  214. IfNotExist,VANHEARTNET\PNG\Wallpaper1.png
  215. FileInstall,Wallpaper1.png,VANHEARTNET\PNG\Wallpaper1.png
  216. IfExist,VANHEARTNET\PNG\Wallpaper1.png
  217. {
  218. If (WSlide=1 && WALLPAPERPC=1){
  219. Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
  220. AA:=A_LoopFileName
  221. if(AA!=""){
  222. PNGFiles:=0
  223. Loop
  224. {
  225. PNGFiles++
  226. IfExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%PNGFiles%.png
  227. {
  228. Gui,1:Add,Picture,% "x" 15 " y" 15 " w" SW-30 " h" SH-28 " vPic",VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%PNGFiles%.png
  229. Break
  230. }else
  231. Continue
  232. }
  233. }
  234. }
  235. else if(WALLPAPERPC=1 && WSlide=0)
  236. Gui,1:Add,Picture,% "x" 15 " y" 15 " w" SW-30 " h" SH-28 " vPic",VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png
  237. else
  238. Gui,1:Add,Picture,% "x" 15 " y" 15 " w" SW-30 " h" SH-28 " vPic",VANHEARTNET\PNG\Wallpaper1.png
  239. Window1[4]:=New Window_1( x:=5, y:=45, w:=200, h:=135, Window:=4, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +Owner1 +E0x10", Title:="TIMER CODE",PCNUM:=PCNUM)
  240. Window1[4].Draw_Logo()
  241. Gui,4:Color,222222,333333
  242. Gui,4:Add,Groupbox,x3 y0 w194 h40,
  243. Gui,4:Font,
  244. Gui,4:Font,s28 cLime, Pixel LCD7
  245. Gui,4:Add,Text,x3 y6 w200 Center BackgroundTrans vtimer1, % TIMER
  246. HB_Button[1]:= New HB_Plain_Rounded_Button_Type_1( x := 1 , y := 80 , w := 198 , h := 55 , Button_Color := "FF0000" , Button_Background_Color := "222222" , Text := "FORCE SHUTDOWN" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "4" , Label := "FORCE_SHUTDOWN" )
  247. }
  248. }else{
  249. Window1[4]:=New Window_1( x:=5, y:=45, w:=200, h:=135, Window:=4, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +Owner1 +E0x10", Title:="TIMER CODE", PCNUM:=PCNUM)
  250. Window1[4].Draw_Logo()
  251. Gui,4:Color,222222,333333
  252. Gui,4:Add,Groupbox,x3 y0 w194 h40,
  253. Gui,4:Font,
  254. Gui,4:Font,s28 cLime, Pixel LCD7
  255. Gui,4:Add,Text,x3 y6 w200 Center BackgroundTrans vtimer1, % TIMER
  256. HB_Button[1]:= New HB_Plain_Rounded_Button_Type_1( x := 1 , y := 80 , w := 198 , h := 55 , Button_Color := "FF0000" , Button_Background_Color := "222222" , Text := "FORCE SHUTDOWN" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "4" , Label := "FORCE_SHUTDOWN" )
  257. }
  258. if (ANNOUNCEMENT=1){
  259. Window1[6]:=New Window_1( x:=2, y:=2, w:=SW-200, h:=48, Window:=6, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +Owner1 +E0x10", Title:="BANNER1", PCNUM:=PCNUM)
  260. Window1[6].Draw_BANNER1()
  261. Text1[1]:= New Text_1( x:=20,y:=10,w:=SW-280,h:=30,Window:=6,State:=1,Text:=BannerText,Font_Size:=16,Option:=" cred BackgroundTrans Center", Var:="var",Background:="222222",Font_Color:="00FF00",Shadow_Color1:="000000",Shadow_Color2:="000000")
  262. Gui,6:Color,222222,333333
  263. PO:=Text1[1].x
  264. Gui,6:Font,
  265. Gui,6:Font,cAqua Bold
  266. Gui,6:Add,Edit,% "x" 20 " y" 15 " w" SW-320 " h" 25 " Hidden Border vEditBanner",
  267. SetTimer,BannerText,50
  268. }
  269. IniRead,Idle,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
  270. if(Idle=1){
  271. IniRead,IdleTime,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLETIME
  272. sIdleTime:=(IdleTime*=60000)
  273. }
  274. if(WSlide=1 && WALLPAPERPC=1){
  275. IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%
  276. {
  277. FileCreateDir,VANHEARTNET\PNG\USERS\%A_ComputerName%
  278. FileInstall,Wallpaper1.png,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png,1
  279. Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
  280. NumberPNG:=A_Index
  281. }else{
  282. IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png
  283. FileInstall,Wallpaper1.png,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png,1
  284. Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
  285. NumberPNG:=A_Index
  286. }
  287. }
  288. else if(WSlide=1){
  289. Loop,VANHEARTNET\PNG\*.png,1
  290. NumberPNG:=A_Index
  291. }
  292. if(A_Is64bitOS){
  293. SetRegView, 64
  294. RegRead,OST,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\SystemMenu,OStype
  295. if (OST="" || "ERROR")
  296. RegWrite,REG_SZ,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\SystemMenu,OStype,%A_Now%
  297. }else{
  298. RegRead,OST,HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SystemMenu,OStype
  299. if (OST="" || "ERROR")
  300. RegWrite,REG_SZ,HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SystemMenu,OStype,%A_Now%
  301. }
  302. SetTimer,Timer, % COUNTDOWNSPEED
  303. if(WSlide=1)
  304. SetTimer,Slide,% WPSLIDESPEED
  305. Return
  306. ;~ #################################################################################################################################################################################################################################################
  307. Class Text_1{
  308. __New(x:=0,y:=0,w:=600,h:=50,Window:=6,State:=0,Text:="BANNER",Font_Size:=16,Option:=" cred BackgroundTrans Center", Var:="var",Background:="222222",Font_Color:="FF0000",Shadow_Color1:="000000",Shadow_Color2:="000000"){
  309. This.X:=x,This.Y:=y,This.W:=w,This.H:=h,This.Window:=Window,This.State:=state,This.Font_Size := Font_Size,This.Text:=Text,This.Option:=Option,This.Var:=Var,This.Background:="0xFF" Background,This.Font_Color:="0xFF" Font_Color,This.Shadow_Color1:="0xFF" Shadow_Color1,This.Shadow_Color2:="0xFF" Shadow_Color2,This.Create_Text(),This.Adding_Control()
  310. sleep 20
  311. This.Draw_Text()
  312. }
  313. Adding_Control(){
  314. static
  315. ;~ num := Text1.Length()+1
  316. Gui , % This.Window " : Add" , Text , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" This.Var " 0xE"
  317. This.Number := Num , This.Hwnd := Hwnd
  318. }
  319. Create_Text(){
  320. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  321. G := Gdip_GraphicsFromImage( pBitmap )
  322. Gdip_SetSmoothingMode( G , 4 )
  323. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  324. Gdip_TextToGraphics( G , This.Text , "s30 Left vCenter Bold c" Brush " x-2 y0" , "Segoe UI" , This.W , This.H )
  325. Gdip_DeleteBrush( Brush )
  326. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  327. Gdip_TextToGraphics( G , This.Text , "s30 Left vCenter Bold c" Brush " x0 y2" , "Segoe UI" , This.W , This.H )
  328. Gdip_DeleteBrush( Brush )
  329. if(This.State=1)
  330. Brush := Gdip_BrushCreateHatch( "0xFF000000" , This.Font_Color , 38 )
  331. else
  332. Brush := Gdip_BrushCreateSolid( This.Font_Color )
  333. Gdip_TextToGraphics( G , This.Text , "s30 Left vCenter Bold c" Brush " x0 y0" , "Segoe UI" , This.W , This.H )
  334. Gdip_DeleteBrush( Brush )
  335. Gdip_DeleteGraphics( G )
  336. This.Draw_Text_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  337. Gdip_DisposeImage(pBitmap)
  338. }
  339. Draw_Text(){
  340. SetImage( This.Hwnd , This.Draw_Text_Bitmap )
  341. }
  342. }
  343. Class Switch_1{
  344. __New( x:=10, y:=10, w:= 100, h:= 30, state:=0, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="1", Label:="SwitchC"){
  345. This.X:=x,This.Y:=y,This.W:=w,This.H:=h,This.Window:=Window,This.State:=state,This.Font_Size := Font_Size,This.Text_Color3:= "0xFF" Text_Color3,This.BG_Color:= "0xFF" BG_Color,This.Switch_BG_Color:= "0xFF" Switch_BG_Color,This.Switch_F_Color:= "0xFF" Switch_F_Color,This.Switch_Border:="0xFF" Switch_Border,This.Switch_Border2:="0xFF" Switch_Border2,This.Text1:=Text1,This.Text2:=Text2,This.Text_Color1:= "0xFF" Text_Color1,This.Text_Color2:= "0xFF" Text_Color2,This.Label:=Label,This.Create_Switch_OFF(),This.Create_Switch_ON(),This.Create_Switch_DISABLED(),This.Adding_Control(),sleep 20
  346. (This.State=0)?(This.Draw_Bitmap_OFF()):(This.State=1)?(This.Draw_Bitmap_ON()):(This.Draw_Bitmap_DISABLED())
  347. }
  348. Adding_Control(){
  349. static
  350. num := Switch1.Length()+1
  351. Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  352. This.Number := Num , This.Hwnd := Hwnd
  353. }
  354. Create_Switch_OFF(){
  355. pBitmap:=Gdip_CreateBitmap( 50 , 20 )
  356. G := Gdip_GraphicsFromImage( pBitmap )
  357. Gdip_SetSmoothingMode( G , 2 )
  358. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  359. Gdip_FillRectangle( G , Brush , -1 , -1 , 52 , 22 )
  360. Gdip_DeleteBrush( Brush )
  361. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  362. Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , 48 , 18 , 5 )
  363. Gdip_DeleteBrush( Brush )
  364. Pen := Gdip_CreatePen( "0xFFFF0000" , 1 )
  365. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , 48 , 18 , 5 )
  366. Gdip_DeletePen( Pen )
  367. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 , 1 )
  368. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , 20 , 16 , 5 )
  369. Gdip_DeleteBrush( Brush )
  370. Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
  371. Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 20 , 16 , 3 )
  372. Gdip_DeletePen( Pen )
  373. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  374. Gdip_TextToGraphics( G , "OFF" , "s10 Center vCenter Bold c" Brush " x11 y-4" , "Segoe UI" , 50 , 30 )
  375. Gdip_DeleteBrush( Brush )
  376. Gdip_DeleteGraphics( G )
  377. This.Draw_OFF_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  378. Gdip_DisposeImage(pBitmap)
  379. }
  380. Create_Switch_ON(){
  381. pBitmap:=Gdip_CreateBitmap( 50 , 20 )
  382. G := Gdip_GraphicsFromImage( pBitmap )
  383. Gdip_SetSmoothingMode( G , 2 )
  384. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  385. Gdip_FillRectangle( G , Brush , -1 , -1 , 52 , 22 )
  386. Gdip_DeleteBrush( Brush )
  387. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  388. Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , 48 , 18 , 5 )
  389. Gdip_DeleteBrush( Brush )
  390. Pen := Gdip_CreatePen( "0xFF00FF00" , 1 )
  391. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , 48 , 18 , 5 )
  392. Gdip_DeletePen( Pen )
  393. Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
  394. Gdip_FillRoundedRectangle( G , Brush , 28 , 2 , 20 , 16 , 5 )
  395. Gdip_DeleteBrush( Brush )
  396. Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
  397. Gdip_DrawRoundedRectangle( G , Pen , 28 , 2 , 20 , 16 , 3 )
  398. Gdip_DeletePen( Pen )
  399. Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
  400. Gdip_TextToGraphics( G , "ON" , "s10 Center vCenter Bold c" Brush " x-9 y-4" , "Segoe UI" , 50 , 30 )
  401. Gdip_DeleteBrush( Brush )
  402. Gdip_DeleteGraphics( G )
  403. This.Draw_ON_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  404. Gdip_DisposeImage(pBitmap)
  405. }
  406. Create_Switch_DISABLED(){
  407. pBitmap:=Gdip_CreateBitmap( 50 , 20 )
  408. G := Gdip_GraphicsFromImage( pBitmap )
  409. Gdip_SetSmoothingMode( G , 2 )
  410. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  411. Gdip_FillRectangle( G , Brush , -1 , -1 , 52 , 22 )
  412. Gdip_DeleteBrush( Brush )
  413. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  414. Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , 48 , 18 , 5 )
  415. Gdip_DeleteBrush( Brush )
  416. Pen := Gdip_CreatePen( "0xFF888888" , 1 )
  417. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , 48 , 18 , 5 )
  418. Gdip_DeletePen( Pen )
  419. Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  420. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , 20 , 16 , 5 )
  421. Gdip_DeleteBrush( Brush )
  422. Pen := Gdip_CreatePen( "0xFF888888" , 2 )
  423. Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 20 , 16 , 3 )
  424. Gdip_DeletePen( Pen )
  425. Brush := Gdip_BrushCreateSolid( "0xFF888888" )
  426. Gdip_TextToGraphics( G , "OFF" , "s10 Center vCenter Bold c" Brush " x11 y-4" , "Segoe UI" , 50 , 30 )
  427. Gdip_DeleteBrush( Brush )
  428. Gdip_DeleteGraphics( G )
  429. This.Draw_DISABLED_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  430. Gdip_DisposeImage(pBitmap)
  431. }
  432. Draw_Bitmap_ON(){
  433. SetImage( This.Hwnd , This.Draw_ON_Bitmap )
  434. }
  435. Draw_Bitmap_OFF(){
  436. SetImage( This.Hwnd , This.Draw_OFF_Bitmap )
  437. }
  438. Draw_Bitmap_DISABLED(){
  439. SetImage( This.Hwnd , This.Draw_DISABLED_Bitmap )
  440. }
  441. }
  442. Class Window_1{
  443. __New( x:=10, y:=10, w:=602, h:=402, Window:=1, Option:="-DPIScale +AlwaysOntop -Caption +E0x10", Title:="Sample Window", PCNUM:="PCNUM"){
  444. This.X:=x,This.Y:=y,This.W:=w,This.H:=h,This.Window:=Window,This.Option:=Option,This.Title:=Title,This.PCNUM:=PCNUM,This.Create_BANNER2(),This.Create_Window(),This.Create_Window2(),This.Create_Window3(),This.Create_Logo(),This.Create_Admin(),This.Add_Window(),This.Create_Banner1(),sleep 20,This.Draw_Window1()
  445. }
  446. Add_Window(){
  447. static
  448. Num:=Window1.Length()+1
  449. Gui, % This.Window " :" This.Option
  450. Gui, % This.Window ":Add" , Picture,% "x" This.X " y" This.Y " w" This.W " h" This.H " v" Num " hwndhwnd 0xE"
  451. This.Number := Num , This.Hwnd := Hwnd
  452. }
  453. Create_Window(){
  454. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;500,500
  455. G := Gdip_GraphicsFromImage( pBitmap )
  456. Gdip_SetSmoothingMode( G , 4 )
  457. Brush := Gdip_BrushCreateHatch( "0xFF000000" , "0xFF404040" , 39 )
  458. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W , This.H )
  459. Gdip_DeleteBrush( Brush )
  460. Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 39 )
  461. Pen := Gdip_CreatePenFromBrush( Brush , 8 )
  462. Gdip_DeleteBrush( Brush )
  463. Gdip_DrawRectangle( G , Pen , This.X+2 , This.Y+2 , This.W-4 , This.H-4 )
  464. Gdip_DeletePen( Pen )
  465. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF404040" , 1 )
  466. Pen := Gdip_CreatePenFromBrush( Brush , 5 )
  467. Gdip_DeleteBrush( Brush )
  468. Gdip_DrawRectangle( G , Pen , This.X+10 , This.Y+10 , This.W-20 , This.H-20 )
  469. Gdip_DeletePen( Pen )
  470. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF333333" , "0xFF222222" , 1 )
  471. Gdip_FillRoundedRectangle( G , Brush , This.W-210 , This.H-50 , 190 , 30 , 5 )
  472. Gdip_DeleteBrush( Brush )
  473. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 50 , 50 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
  474. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  475. Gdip_DeleteBrush( Brush )
  476. Gdip_DrawRoundedRectangle( G , Pen , This.W-210 , This.H-50 , 190 , 30 , 5 )
  477. Gdip_DeletePen( Pen )
  478. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
  479. Gdip_TextToGraphics( G , "V A N H E A R T N E T" , "s16 Center vCenter Bold c" Brush "x" This.W-228 " y" This.H-45 , "Segoe UI" , 225 , 20 ) ;x273 y455
  480. Gdip_DeleteBrush( Brush )
  481. This.Draw_1 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  482. Gdip_DisposeImage(pBitmap)
  483. }
  484. Create_Logo(){
  485. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ; 300, 80
  486. G := Gdip_GraphicsFromImage( pBitmap )
  487. Gdip_SetSmoothingMode( G , 4 )
  488. Brush := Gdip_CreateLineBrush( 20 , 20 , 100 , 100 , "0xFF333333" , "0xFF222222" , 1 )
  489. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , 190 , 30 , 5 )
  490. Gdip_DeleteBrush( Brush )
  491. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 50 , 50 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
  492. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  493. Gdip_DeleteBrush( Brush )
  494. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , 190 , 30 , 5 )
  495. Gdip_DeletePen( Pen )
  496. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
  497. Gdip_TextToGraphics( G , "V A N H E A R T N E T" , "s16 Center vCenter Bold c" Brush "x" 0 " y" 5 , "Segoe UI" , 190 , 20 ) ;x273 y455
  498. Gdip_DeleteBrush( Brush )
  499. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 50 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
  500. Gdip_TextToGraphics( G , "V A N H E A R T N E T" , "s16 Center vCenter Bold c" Brush "x" 3 " y" 5 , "Segoe UI" , 190 , 20 ) ;x273 y455
  501. Gdip_DeleteBrush( Brush )
  502. This.Draw_4 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  503. Gdip_DisposeImage(pBitmap)
  504. }
  505. Create_Window2(){
  506. pBitmap:=Gdip_CreateBitmap( 400 , 150 )
  507. G := Gdip_GraphicsFromImage( pBitmap )
  508. Gdip_SetSmoothingMode( G , 4 )
  509. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  510. Gdip_FillRectangle( G , Brush , -1 , -1 , 402 , 152 )
  511. Gdip_DeleteBrush( Brush )
  512. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  513. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , 399 , 149 , 8 )
  514. Gdip_DeleteBrush( Brush )
  515. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFC4136" , "0xFF733D59" , 1 )
  516. Pen := Gdip_CreatePenFromBrush( Brush , 5 )
  517. Gdip_DeleteBrush( Brush )
  518. Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 396 , 146 , 8 )
  519. Gdip_DeletePen( Pen )
  520. This.Draw_2 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  521. Gdip_DisposeImage(pBitmap)
  522. }
  523. Create_Window3(){
  524. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;300 , 600
  525. G := Gdip_GraphicsFromImage( pBitmap )
  526. Gdip_SetSmoothingMode( G , 4 )
  527. Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  528. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , This.W , This.H , 10 )
  529. Gdip_DeleteBrush( Brush )
  530. Pen := Gdip_CreatePen( "0xFFFF0000" , 3 )
  531. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-3 , This.H-3 , 10 )
  532. Gdip_DeletePen( Pen )
  533. Pen := Gdip_CreatePen( "0xFF000000" , 2 )
  534. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-3 , This.H-3 , 10 )
  535. Gdip_DeletePen( Pen )
  536. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF333333" , "0xFF222222" , 1 )
  537. Gdip_FillRoundedRectangle( G , Brush , 20 , 10 , 260 , 30 , 6 )
  538. Gdip_DeleteBrush( Brush )
  539. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF0000FF" , "0xFFFFFFFF" , 1 )
  540. Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  541. Gdip_DeleteBrush( Brush )
  542. Gdip_DrawRoundedRectangle( G , Pen , 20 , 10 , 260 , 30 , 5 )
  543. Gdip_DeletePen( Pen )
  544. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  545. Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x19 y10" , "Segoe UI" , 260 , 30 )
  546. Gdip_DeleteBrush( Brush )
  547. Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
  548. Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x18 y11" , "Segoe UI" , 260 , 30 )
  549. Gdip_DeleteBrush( Brush )
  550. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  551. Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x21 y12" , "Segoe UI" , 260 , 30 )
  552. Gdip_DeleteBrush( Brush )
  553. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFFFF00" , "0xFF404040" , 1 , 1 )
  554. Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x20 y11" , "Segoe UI" , 260 , 30 )
  555. Gdip_DeleteBrush( Brush )
  556. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  557. Gdip_FillRoundedRectangle( G , Brush , 10 , 62 , 278 , This.H-70 , 3 )
  558. Gdip_DeleteBrush( Brush )
  559. Pen := Gdip_CreatePen( "0xFF888888" , 3 )
  560. Gdip_DrawRoundedRectangle( G , Pen , 10 , 62 , 278 , This.H-70 , 2 )
  561. Gdip_DeletePen( Pen )
  562. This.Draw_3 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  563. Gdip_DisposeImage(pBitmap)
  564. }
  565. Create_Admin(){
  566. pBitmap:=Gdip_CreateBitmap( 400 , 220 )
  567. G := Gdip_GraphicsFromImage( pBitmap )
  568. Gdip_SetSmoothingMode( G , 4 )
  569. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  570. Gdip_FillRectangle( G , Brush , -1 , -1 , 402 , 222 )
  571. Gdip_DeleteBrush( Brush )
  572. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  573. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , 399 , 219 , 8 )
  574. Gdip_DeleteBrush( Brush )
  575. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFC4136" , "0xFF733D59" , 1 )
  576. Pen := Gdip_CreatePenFromBrush( Brush , 5 )
  577. Gdip_DeleteBrush( Brush )
  578. Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 396 , 216 , 8 )
  579. Gdip_DeletePen( Pen )
  580. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  581. Gdip_TextToGraphics( G , "OLD PASS" , "S16 Right vCenter Bold c" Brush " x9 y69" , "Segoe UI" , 130 , 50 )
  582. Gdip_DeleteBrush( Brush )
  583. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  584. Gdip_TextToGraphics( G , "OLD PASS" , "S16 Right vCenter Bold c" Brush " x4 y65" , "Segoe UI" , 130 , 50 )
  585. Gdip_DeleteBrush( Brush )
  586. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  587. Gdip_TextToGraphics( G , "OLD PASS" , "S16 Right vCenter Bold c" Brush " x7 y67" , "Segoe UI" , 130 , 50 )
  588. Gdip_DeleteBrush( Brush )
  589. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  590. Gdip_TextToGraphics( G , "NEW PASS" , "S16 Right vCenter Bold c" Brush " x4 y95" , "Segoe UI" , 130 , 50 )
  591. Gdip_DeleteBrush( Brush )
  592. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  593. Gdip_TextToGraphics( G , "NEW PASS" , "S16 Right vCenter Bold c" Brush " x8 y100" , "Segoe UI" , 130 , 50 )
  594. Gdip_DeleteBrush( Brush )
  595. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  596. Gdip_TextToGraphics( G , "NEW PASS" , "S16 Right vCenter Bold c" Brush " x7 y97" , "Segoe UI" , 130 , 50 )
  597. Gdip_DeleteBrush( Brush )
  598. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  599. Gdip_TextToGraphics( G , "CONFIRM PASS" , "S16 Right vCenter Bold c" Brush " x4 y124" , "Segoe UI" , 130 , 50 )
  600. Gdip_DeleteBrush( Brush )
  601. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  602. Gdip_TextToGraphics( G , "CONFIRM PASS" , "S16 Right vCenter Bold c" Brush " x8 y129" , "Segoe UI" , 130 , 50 )
  603. Gdip_DeleteBrush( Brush )
  604. Brush := Gdip_BrushCreateSolid( "0xFFff0000" )
  605. Gdip_TextToGraphics( G , "CONFIRM PASS" , "S16 Right vCenter Bold c" Brush " x7 y126" , "Segoe UI" , 130 , 50 )
  606. Gdip_DeleteBrush( Brush )
  607. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  608. Gdip_TextToGraphics( G , "OLD USER" , "S16 Right vCenter Bold c" Brush " x5 y7" , "Segoe UI" , 130 , 50 )
  609. Gdip_DeleteBrush( Brush )
  610. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  611. Gdip_TextToGraphics( G , "OLD USER" , "S16 Right vCenter Bold c" Brush " x8 y11" , "Segoe UI" , 130 , 50 )
  612. Gdip_DeleteBrush( Brush )
  613. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  614. Gdip_TextToGraphics( G , "OLD USER" , "S16 Right vCenter Bold c" Brush " x7 y8" , "Segoe UI" , 130 , 50 )
  615. Gdip_DeleteBrush( Brush )
  616. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  617. Gdip_TextToGraphics( G , "NEW USER" , "S16 Right vCenter Bold c" Brush " x4 y36" , "Segoe UI" , 130 , 50 )
  618. Gdip_DeleteBrush( Brush )
  619. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  620. Gdip_TextToGraphics( G , "NEW USER" , "S16 Right vCenter Bold c" Brush " x8 y41" , "Segoe UI" , 130 , 50 )
  621. Gdip_DeleteBrush( Brush )
  622. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  623. Gdip_TextToGraphics( G , "NEW USER" , "S16 Right vCenter Bold c" Brush " x7 y38" , "Segoe UI" , 130 , 50 )
  624. Gdip_DeleteBrush( Brush )
  625. Gdip_DeleteGraphics( G )
  626. This.Draw_5 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  627. Gdip_DisposeImage(pBitmap)
  628. }
  629. Create_Banner1(){
  630. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  631. G := Gdip_GraphicsFromImage( pBitmap )
  632. Gdip_SetSmoothingMode( G , 4 )
  633. Brush := Gdip_CreateLineBrushFromRect( 0 , 120 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
  634. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  635. Gdip_DeleteBrush( Brush )
  636. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  637. Gdip_FillRectangle( G , Brush , -1 , 5 , This.W-13 , This.H-10 )
  638. Gdip_DeleteBrush( Brush )
  639. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 , 1 )
  640. Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  641. Gdip_DeleteBrush( Brush )
  642. Gdip_DrawRectangle( G , Pen , -1 , 5 , This.W-13 , This.H-10 )
  643. Gdip_DeletePen( Pen )
  644. This.Draw_6 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  645. Gdip_DisposeImage(pBitmap)
  646. }
  647. Create_BANNER2(){
  648. pBitmap:=Gdip_CreateBitmap( 300 , 250 )
  649. G := Gdip_GraphicsFromImage( pBitmap )
  650. Gdip_SetSmoothingMode( G , 4 )
  651. Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  652. Gdip_FillRectangle( G , Brush , 15 , 8 , 270 , 230 )
  653. Gdip_DeleteBrush( Brush )
  654. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  655. Gdip_FillRectangle( G , Brush , 25 , 20 , 251 , 200 )
  656. Gdip_DeleteBrush( Brush )
  657. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFFFFFF" , "0xFF00FF00" , 1 )
  658. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  659. Gdip_DeleteBrush( Brush )
  660. Gdip_DrawRectangle( G , Pen , 25 , 20 , 251 , 200 )
  661. Gdip_DeletePen( Pen )
  662. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 )
  663. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  664. Gdip_DeleteBrush( Brush )
  665. Gdip_DrawRectangle( G , Pen , 15 , 8 , 270 , 228 )
  666. Gdip_DeletePen( Pen )
  667. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  668. Gdip_TextToGraphics( G , This.PCNUM , "s90 Center vCenter Bold Underline c" Brush " x1 y65" , "Segoe UI" , 300 , 50 )
  669. Gdip_DeleteBrush( Brush )
  670. Brush := Gdip_CreateLineBrushFromRect( 139 , 91 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 , 1 )
  671. Gdip_TextToGraphics( G , This.PCNUM , "s90 Center vCenter Bold c" Brush " x1 y55" , "Segoe UI" , 300 , 50 )
  672. Gdip_DeleteBrush( Brush )
  673. Brush := Gdip_BrushCreateSolid( "0xFF666666" )
  674. Gdip_TextToGraphics( G , "SHUTTING DOWN IN..." , "s20 Center vCenter Bold c" Brush " x0 y162" , "Segoe UI" , 300 , 50 )
  675. Gdip_DeleteBrush( Brush )
  676. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  677. Gdip_TextToGraphics( G , "SHUTTING DOWN IN..." , "s20 Center vCenter Bold c" Brush " x2 y160" , "Segoe UI" , 300 , 50 )
  678. Gdip_DeleteBrush( Brush )
  679. Gdip_DeleteGraphics( G )
  680. This.Draw_7 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  681. Gdip_DisposeImage(pBitmap)
  682. }
  683. Draw_Window1(){
  684. SetImage( This.Hwnd , This.Draw_1 )
  685. }
  686. Draw_Window2(){
  687. SetImage( This.Hwnd , This.Draw_2 )
  688. }
  689. Draw_Window3(){
  690. SetImage( This.Hwnd , This.Draw_3 )
  691. }
  692. Draw_Logo(){
  693. SetImage( This.Hwnd , This.Draw_4 )
  694. }
  695. Draw_Admin(){
  696. SetImage( This.Hwnd , This.Draw_5 )
  697. }
  698. Draw_BANNER1(){
  699. SetImage( This.Hwnd , This.Draw_6 )
  700. }
  701. Draw_BANNER2(){
  702. SetImage( This.Hwnd , This.Draw_7 )
  703. }
  704. }
  705. Class Button_1{
  706. __New(x:=10, y:=10, w:=600, h:=400, Window:="1", Text:="Text",Fontsize:=10, Background:="FF0000",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="BTN1"){
  707. This.X:=x,This.Y:=y,This.W:=w,This.H:=h,This.var:=var,This.Window:=Window,This.Text:=Text,This.Fontsize:=Fontsize,This.Background:="0xFF" Background,This.Button_BG_Color:="0xFF" Button_BG_Color,This.Button_Border_Color:="0xFF" Button_Border_Color,This.Button_Font_Color:="0xFF" Button_Font_Color,This.Label:=Label,This.Create_Button_Default(),This.Create_Button_Hover(),This.Create_Button_Pressed(),This.Adding_Control(),Sleep 20,This.Draw_Button_Default()
  708. }
  709. Adding_Control(){
  710. Global
  711. num := Button1.Length()+1
  712. Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  713. This.Number := Num , This.Hwnd := Hwnd
  714. }
  715. Create_Button_Default(){
  716. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;150 , 40
  717. G := Gdip_GraphicsFromImage( pBitmap )
  718. Gdip_SetSmoothingMode( G , 4 )
  719. Brush := Gdip_BrushCreateSolid( This.Background )
  720. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  721. Gdip_DeleteBrush( Brush )
  722. Brush := Gdip_BrushCreateSolid( "0xFFC4E2FC" )
  723. Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , This.W-2 , This.H-2 , 8 )
  724. Gdip_DeleteBrush( Brush )
  725. Brush := Gdip_CreateLineBrush( 201 , 8 , 100 , 100 , "0xFF9AA9B5" , "0xFFFF0000" , 1 )
  726. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  727. Gdip_DeleteBrush( Brush )
  728. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-2 , This.H-3 , 8 )
  729. Gdip_DeletePen( Pen )
  730. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF404040" , "0xFFFFFFFF" , 1 , 1 )
  731. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4 , This.H-4 , 8 )
  732. Gdip_DeleteBrush( Brush )
  733. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  734. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x-1 y2" , "Segoe UI" , This.W, This.H )
  735. Gdip_DeleteBrush( Brush )
  736. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  737. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x1 y2" , "Segoe UI" , This.W, This.H )
  738. Gdip_DeleteBrush( Brush )
  739. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  740. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x2 y0" , "Segoe UI" , This.W, This.H )
  741. Gdip_DeleteBrush( Brush )
  742. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  743. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x0 y0" , "Segoe UI" , This.W, This.H )
  744. Gdip_DeleteBrush( Brush )
  745. This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  746. Gdip_DisposeImage(pBitmap)
  747. }
  748. Create_Button_Hover(){
  749. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;150 , 40
  750. G := Gdip_GraphicsFromImage( pBitmap )
  751. Gdip_SetSmoothingMode( G , 4 )
  752. Brush := Gdip_BrushCreateSolid( This.Background )
  753. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  754. Gdip_DeleteBrush( Brush )
  755. Brush := Gdip_BrushCreateSolid( "0xFFC4E2FC" )
  756. Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , This.W-2 , This.H-2 , 8 )
  757. Gdip_DeleteBrush( Brush )
  758. Pen := Gdip_CreatePen( "0xFFF8F7F6" , 3 )
  759. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-2 , This.H-3 , 8 )
  760. Gdip_DeletePen( Pen )
  761. Brush := Gdip_BrushCreateSolid( "0xFF404040" )
  762. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4, This.H-4 , 8 )
  763. Gdip_DeleteBrush( Brush )
  764. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  765. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x-1 y2" , "Segoe UI" , This.W, This.H )
  766. Gdip_DeleteBrush( Brush )
  767. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  768. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x1 y2" , "Segoe UI" , This.W, This.H )
  769. Gdip_DeleteBrush( Brush )
  770. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  771. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x2 y0" , "Segoe UI" , This.W, This.H )
  772. Gdip_DeleteBrush( Brush )
  773. Gdip_DeleteGraphics( G )
  774. This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  775. Gdip_DisposeImage(pBitmap)
  776. }
  777. Create_Button_Pressed(){
  778. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;150 , 40
  779. G := Gdip_GraphicsFromImage( pBitmap )
  780. Gdip_SetSmoothingMode( G , 4 )
  781. Brush := Gdip_BrushCreateSolid( This.Background )
  782. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  783. Gdip_DeleteBrush( Brush )
  784. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
  785. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  786. Gdip_DeleteBrush( Brush )
  787. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-3 , This.H-3 , 8 )
  788. Gdip_DeletePen( Pen )
  789. Brush := Gdip_BrushCreateSolid( "0xFFC4E2FC" )
  790. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-5 , This.H-5 , 8 )
  791. Gdip_DeleteBrush( Brush )
  792. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  793. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x-1 y3" , "Segoe UI" , This.W, This.H )
  794. Gdip_DeleteBrush( Brush )
  795. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  796. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x1 y3" , "Segoe UI" , This.W, This.H )
  797. Gdip_DeleteBrush( Brush )
  798. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  799. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x2 y1" , "Segoe UI" , This.W, This.H )
  800. Gdip_DeleteBrush( Brush )
  801. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  802. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x0 y1" , "Segoe UI" , This.W, This.H )
  803. Gdip_DeleteBrush( Brush )
  804. Gdip_DeleteGraphics( G )
  805. This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  806. Gdip_DisposeImage(pBitmap)
  807. }
  808. Draw_Button_Default(){
  809. SetImage( This.Hwnd , This.Default_Bitmap )
  810. }
  811. Draw_Button_Hover(){
  812. SetImage( This.Hwnd , This.Hover_Bitmap )
  813. }
  814. Draw_Button_Pressed(){
  815. SetImage( This.Hwnd , This.Pressed_Bitmap )
  816. SetTimer , Hover , Off
  817. While( GetKeyState( "LButton" ) )
  818. sleep , 10
  819. SetTimer , Hover , On
  820. MouseGetPos,,,, ctrl , 2
  821. if( This.Hwnd != ctrl ){
  822. This.Draw_Button_Default()
  823. return False
  824. }else {
  825. This.Draw_Button_Hover()
  826. return true
  827. }
  828. }
  829. }
  830. class HB_Plain_Rounded_Button_Type_1 {
  831. __New( x := 10 , y := 10 , w := 150 , h := 40 , Button_Color := "FF0000" , Button_Background_Color := "222222" , Text := "Button" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "FFFFFF" , Window := "1" , Label := "" ){
  832. This.Text_Color_Top := "0xFF" Font_Color_Top , This.Text_Color_Bottom := "0xFF" Font_Color_Bottom , This.Font := Font , This.Font_Size := Font_Size , This.Text := Text,This.X := x , This.Y := y , This.W := w , This.H := h , This.Button_Background_Color := "0xFF" Button_Background_Color , This.Button_Color := "0xFF" Button_Color , This.Window := Window,This.Label := Label , This.Create_Default_Bitmap() , This.Create_Hover_Bitmap() , This.Create_Pressed_Bitmap() , This.Create_Trigger(),sleep, 20,This.Draw_Default()
  833. }
  834. Create_Trigger(){
  835. static
  836. num := HB_Button.Length() + 1
  837. Gui , % This.Window ": Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd_" Num " v" Num " g" This.Label " 0xE"
  838. This.Number := Num , This.Hwnd := Hwnd_%num%
  839. }
  840. Create_Default_Bitmap(){
  841. pBitmap:=Gdip_CreateBitmap( This.W, This.H )
  842. G := Gdip_GraphicsFromImage( pBitmap )
  843. Gdip_SetSmoothingMode( G , 2 )
  844. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  845. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  846. Gdip_DeleteBrush( Brush )
  847. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  848. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4 , This.H-3 , 16 )
  849. Gdip_DeleteBrush( Brush )
  850. Brush := Gdip_CreateLineBrushFromRect( 2 , -1 , This.W-4 , This.H-3 , "0xFF555555" , "0xFF000000" , 1 , 1 )
  851. Gdip_FillRoundedRectangle( G , Brush , 2 , 0 , This.W-4 , This.H-3 , 16 )
  852. Gdip_DeleteBrush( Brush )
  853. if(This.Button_Color="0xFF000000"||This.Button_Color="0xFF111111")
  854. Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+5 , "0xFF333333" , This.Button_Color , 1 , 1 )
  855. else
  856. Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+5 , This.Button_Color , "0xFF333333" , 1 , 1 )
  857. Gdip_FillRoundedRectangle( G , Brush , 3 , 1 , This.W-6 , This.H-5 , 16 )
  858. Gdip_DeleteBrush( Brush )
  859. Brush := Gdip_BrushCreateSolid( "0x22F0F0F0" )
  860. Gdip_FillEllipse( G , Brush , This.W/15 , This.H/13 , This.W-(This.W/15*2) , This.H*0.45 )
  861. Gdip_DeleteBrush( Brush )
  862. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  863. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x-1 y-1" , This.Font , This.W , This.H )
  864. Gdip_DeleteBrush( Brush )
  865. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  866. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x0 y0" , This.Font , This.W , This.H )
  867. Gdip_DeleteBrush( Brush )
  868. Gdip_DeleteGraphics( G )
  869. This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  870. Gdip_DisposeImage(pBitmap)
  871. }
  872. Create_Hover_Bitmap(){
  873. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  874. G := Gdip_GraphicsFromImage( pBitmap )
  875. Gdip_SetSmoothingMode( G , 2 )
  876. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  877. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  878. Gdip_DeleteBrush( Brush )
  879. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  880. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4 , This.H-3 , 16 )
  881. Gdip_DeleteBrush( Brush )
  882. Brush := Gdip_CreateLineBrushFromRect( 2 , -1 , This.W-4 , This.H-3 , "0xFF555555" , "0xFF000000" , 1 , 1 )
  883. Gdip_FillRoundedRectangle( G , Brush , 2 , 0 , This.W-4 , This.H-3 , 16 )
  884. Gdip_DeleteBrush( Brush )
  885. if(This.Button_Color="0xFF000000"||This.Button_Color="0xFF111111")
  886. Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+10 , "0xFF444444" , This.Button_Color , 1 , 1 )
  887. else
  888. Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+10 , This.Button_Color , "0xFF444444" , 1 , 1 )
  889. Gdip_FillRoundedRectangle( G , Brush , 3 , 1 , This.W-6 , This.H-5 , 16 )
  890. Gdip_DeleteBrush( Brush )
  891. Brush := Gdip_BrushCreateSolid( "0x22F0F0F0" )
  892. Gdip_FillEllipse( G , Brush , This.W/15 , This.H/13 , This.W-(This.W/15*2) , This.H*0.45 )
  893. Gdip_DeleteBrush( Brush )
  894. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  895. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x-1 y-1" , This.Font , This.W , This.H )
  896. Gdip_DeleteBrush( Brush )
  897. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  898. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x0 y0" , This.Font , This.W , This.H )
  899. Gdip_DeleteBrush( Brush )
  900. Gdip_DeleteGraphics( G )
  901. This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  902. Gdip_DisposeImage(pBitmap)
  903. }
  904. Create_Pressed_Bitmap(){
  905. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  906. G := Gdip_GraphicsFromImage( pBitmap )
  907. Gdip_SetSmoothingMode( G , 2 )
  908. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  909. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  910. Gdip_DeleteBrush( Brush )
  911. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  912. Gdip_DeleteBrush( Brush )
  913. Brush := Gdip_CreateLineBrushFromRect( 2 , 0 , This.W-4 , This.H-3 , "0xFF555555" , "0xFF000000" , 1 , 1 )
  914. Gdip_FillRoundedRectangle( G , Brush , 2 , 0 , This.W-4 , This.H-3 , 16 )
  915. Gdip_DeleteBrush( Brush )
  916. Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+5 , "0xFF333333" , This.Button_Color , 1 , 1 )
  917. Gdip_FillRoundedRectangle( G , Brush , 3 , 1 , This.W-6 , This.H-5 , 16 )
  918. Gdip_DeleteBrush( Brush )
  919. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  920. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x-1 y-2" , This.Font , This.W , This.H )
  921. Gdip_DeleteBrush( Brush )
  922. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  923. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x0 y-1" , This.Font , This.W , This.H )
  924. Gdip_DeleteBrush( Brush )
  925. Gdip_DeleteGraphics( G )
  926. This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
  927. Gdip_DisposeImage( pBitmap )
  928. }
  929. Draw_Default(){
  930. SetImage( This.Hwnd , This.Default_Bitmap )
  931. }
  932. Draw_Hover(){
  933. SetImage( This.Hwnd , This.Hover_Bitmap )
  934. }
  935. Draw_Pressed(){
  936. SetImage( This.Hwnd , This.Pressed_Bitmap )
  937. SetTimer , HB_Button_Hover , Off
  938. While( GetKeyState( "LButton" ) )
  939. sleep , 10
  940. SetTimer , HB_Button_Hover , On
  941. MouseGetPos,,,, ctrl , 2
  942. if( This.Hwnd != ctrl ){
  943. This.Draw_Default()
  944. return False
  945. }else {
  946. This.Draw_Hover()
  947. return true
  948. }
  949. }
  950. }
  951. class HB_Flat_Rounded_Button_Type_1 {
  952. __New( x := 10 , y := 10 , w := 150 , h := 40 , Button_Color := "FF0000" , Button_Background_Color := "222222" , Text := "Button" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "FFFFFF" , Window := "1" , Label := "" , Default_Button := 1, Roundness:=5, HoverColor:="404040", HoverColor2:="404040", BColor:="404040",TextHover:="FF0000"){
  953. This.Roundness:=Roundness
  954. This.Text_Color_Top := "0xFF" Font_Color_Top
  955. This.Text_Color_Bottom := "0xFF" Font_Color_Bottom
  956. This.HoverC:="0xFF" HoverColor
  957. This.HoverC2:="0xFF" HoverColor2
  958. This.BColor:="0xFF" BColor
  959. This.Font := Font
  960. This.Font_Size := Font_Size
  961. This.Text := Text
  962. This.TextHover:="0xFF" TextHover
  963. This.X := x
  964. This.Y := y
  965. This.W := w
  966. This.H := h
  967. This.Button_Background_Color := "0xFF" Button_Background_Color
  968. This.Button_Color := "0xFF" Button_Color
  969. This.Window := Window
  970. This.Label := Label
  971. This.Default_Button := Default_Button
  972. This.Create_Default_Bitmap()
  973. This.Create_Hover_Bitmap()
  974. This.Create_Pressed_Bitmap()
  975. This.Create_Trigger()
  976. sleep, 20
  977. This.Draw_Default()
  978. }
  979. Create_Trigger(){
  980. global
  981. num := HB_Button1.Length()+1
  982. Gui , % This.Window ": Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  983. This.Number := Num , This.Hwnd := Hwnd
  984. }
  985. Create_Default_Bitmap(){
  986. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
  987. G := Gdip_GraphicsFromImage( pBitmap )
  988. Gdip_SetSmoothingMode( G , 2 )
  989. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  990. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  991. Gdip_DeleteBrush( Brush )
  992. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
  993. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  994. Gdip_DeleteBrush( Brush )
  995. if(This.Default_Button)
  996. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF4C4F54" , "0xFF35373B" , 1 , 1 )
  997. else
  998. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.Button_Color , This.BColor , 1 , 1 ) ; DEFAULT COLOR
  999. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
  1000. Gdip_DeleteBrush( Brush )
  1001. Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  1002. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  1003. Gdip_DeletePen( Pen )
  1004. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  1005. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2 " , This.Font , This.W , This.H-1 )
  1006. Gdip_DeleteBrush( Brush )
  1007. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  1008. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1 " , This.Font , This.W , This.H-1 )
  1009. Gdip_DeleteBrush( Brush )
  1010. Gdip_DeleteGraphics( G )
  1011. This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1012. Gdip_DisposeImage(pBitmap)
  1013. }
  1014. Create_Hover_Bitmap(){
  1015. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
  1016. G := Gdip_GraphicsFromImage( pBitmap )
  1017. Gdip_SetSmoothingMode( G , 2 )
  1018. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  1019. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  1020. Gdip_DeleteBrush( Brush )
  1021. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
  1022. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  1023. Gdip_DeleteBrush( Brush )
  1024. if(This.Default_Button)
  1025. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF555851" , "0xFF3B3E41" , 1 , 1 )
  1026. else
  1027. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.HoverC , This.HoverC2 , 1 , 1 ) ;HOVER COLOR
  1028. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
  1029. Gdip_DeleteBrush( Brush )
  1030. Pen := Gdip_CreatePen( "0xFFFFFFFF" , 1 )
  1031. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  1032. Gdip_DeletePen( Pen )
  1033. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom ) ; TEXT BOTTOM COLOR
  1034. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2" , This.Font , This.W , This.H-1 )
  1035. Gdip_DeleteBrush( Brush )
  1036. Brush := Gdip_BrushCreateSolid( This.TextHover ) ;TEXT FONT COLOR
  1037. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1" , This.Font , This.W , This.H-1 )
  1038. Gdip_DeleteBrush( Brush )
  1039. Gdip_DeleteGraphics( G )
  1040. This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1041. Gdip_DisposeImage(pBitmap)
  1042. }
  1043. Create_Pressed_Bitmap(){
  1044. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  1045. G := Gdip_GraphicsFromImage( pBitmap )
  1046. Gdip_SetSmoothingMode( G , 2 )
  1047. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  1048. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  1049. Gdip_DeleteBrush( Brush )
  1050. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF0" , "0xFF45474E" , 1 , 1 )
  1051. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  1052. Gdip_DeleteBrush( Brush )
  1053. Brush := Gdip_BrushCreateSolid( "0xFF2A2C2E" )
  1054. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , This.W , This.H-8 , This.Roundness )
  1055. Gdip_DeleteBrush( Brush )
  1056. Brush := Gdip_BrushCreateSolid( "0xFF46474D" )
  1057. Gdip_FillRoundedRectangle( G , Brush , 0 , 7 , This.W , This.H-8 , This.Roundness )
  1058. Gdip_DeleteBrush( Brush )
  1059. if(This.Default_Button)
  1060. Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF43474B" , 1 , 1 )
  1061. else
  1062. Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF00FFFF" , 1 , 1 ) ;PRESSED COLOR
  1063. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-3 , This.H-6 , This.Roundness )
  1064. Gdip_DeleteBrush( Brush )
  1065. Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  1066. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  1067. Gdip_DeletePen( Pen )
  1068. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  1069. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y3" , This.Font , This.W , This.H-1 )
  1070. Gdip_DeleteBrush( Brush )
  1071. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  1072. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y2" , This.Font , This.W , This.H-1 )
  1073. Gdip_DeleteBrush( Brush )
  1074. Gdip_DeleteGraphics( G )
  1075. This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
  1076. Gdip_DisposeImage( pBitmap )
  1077. }
  1078. Draw_Default(){
  1079. SetImage( This.Hwnd , This.Default_Bitmap )
  1080. }
  1081. Draw_Hover(){
  1082. SetImage( This.Hwnd , This.Hover_Bitmap )
  1083. }
  1084. Draw_Pressed(){
  1085. SetImage( This.Hwnd , This.Pressed_Bitmap )
  1086. SetTimer , HB_Button_Hover1 , Off
  1087. While( GetKeyState( "LButton" ) )
  1088. sleep , 10
  1089. SetTimer , HB_Button_Hover1 , On
  1090. MouseGetPos,,,, ctrl , 2
  1091. if( This.Hwnd != ctrl ){
  1092. This.Draw_Default()
  1093. return False
  1094. }else {
  1095. This.Draw_Hover()
  1096. return true
  1097. }
  1098. }
  1099. }
  1100. ;-----------------------------------------------------------------
  1101. HB_Button_Hover1:
  1102. global Index , Hover_On2
  1103. MouseGetPos,,,, ctrl , 2
  1104. if( ! Hover_On2 && ctrl ){
  1105. loop , % HB_Button1.Length()
  1106. if( ctrl = HB_Button1[ A_Index ].hwnd )
  1107. {
  1108. HB_Button1[ A_Index ].Draw_Hover() , Index := A_Index , Hover_On2 := 1 , break
  1109. SoundBeep,200
  1110. }
  1111. }else if( Hover_On2 = 1 )
  1112. if( ctrl != HB_Button1[ Index ].Hwnd )
  1113. HB_Button1[ Index ].Draw_Default() , Hover_On2 := 0
  1114. return
  1115. HB_Button_Hover:
  1116. Global Index , Hover_On1
  1117. MouseGetPos,,,, ctrl , 2
  1118. if( ! Hover_On1 && ctrl ){
  1119. loop , % HB_Button.Length()
  1120. if( ctrl = HB_Button[ A_Index ].hwnd )
  1121. HB_Button[ A_Index ].Draw_Hover() , Index := A_Index , Hover_On1 := 1 , break
  1122. }else if( Hover_On1 = 1 )
  1123. if( ctrl != HB_Button[ Index ].Hwnd )
  1124. HB_Button[ Index ].Draw_Default() , Hover_On1 := 0
  1125. return
  1126. Hover:
  1127. Global Index , Hover_On
  1128. MouseGetPos,,,, ctrl , 2
  1129. if( ! Hover_On && ctrl ){
  1130. loop , % Button1.Length()
  1131. if( ctrl = Button1[ A_Index ].hwnd )
  1132. {
  1133. Button1[ A_Index ].Draw_Button_Hover() , Index := A_Index , Hover_On := 1 , break
  1134. SoundBeep,200
  1135. }
  1136. }else if( Hover_On = 1 )
  1137. if( ctrl != Button1[ Index ].Hwnd )
  1138. Button1[ Index ].Draw_Button_Default() , Hover_On := 0
  1139. return
  1140. ;~ ============================= HOTKEYS =================================================================
  1141. ^Enter::
  1142. GuiControl,2:Focus,Edit1
  1143. if(Countdown!=True)
  1144. return
  1145. IfWinActive,Member Points System
  1146. return
  1147. if(Member=True)
  1148. if(USEPOINTS!=True){
  1149. Gui,Member:Show
  1150. return
  1151. }else
  1152. return
  1153. IfWinExist,Coin Detector
  1154. {
  1155. IfWinNotExist,SETTINGS
  1156. {
  1157. IfWinNotExist,LOGIN
  1158. {
  1159. Gui,2:Destroy
  1160. Window1[2]:=New Window_1( x:=0, y:=0, w:=400, h:=150, Window:=2, Option:="-DPIScale +AlwaysOntop -Caption +E0x10 +Owner1 +ToolWindow +Owndialogs", Title:="LOGIN" , PCNUM:=PCNUM)
  1161. Window1[2].Draw_Window2()
  1162. Gui,2:Color,222222,ffffcc
  1163. Gui,2:Font,s12 cBlack, Arial Black
  1164. Gui,2:Add,Edit,x102 y20 w268 h60 limit16 Border Center -E0x200 r1 vEdit1
  1165. Gui,2:Add,Edit,x102 y64 w268 h50 Password limit16 Border Center -E0x200 r1 vEdit2
  1166. Gui,2:Font,
  1167. Gui,2:Font,s14 cwhite, Fivo Sans Modern ExtBlk
  1168. gui,2:Add,Text, x20 y28 Backgroundtrans, USER
  1169. gui,2:Add,Text, x20 y73 Backgroundtrans, PASS
  1170. Button1.Push(New Button_1(x:=110, y:=105, w:=250, h:=30, Window:="2", Text:="LOGIN",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="log_in"))
  1171. Gui,2:Show, w400 h150, LOGIN
  1172. SetTimer,Hover,50
  1173. }else{
  1174. Gui,2:Show
  1175. GuiControl,2:,Edit1,
  1176. GuiControl,2:,Edit2,
  1177. GuiControl,2:Focus,Edit1
  1178. }
  1179. }else{
  1180. if(CloseLogin!=True){
  1181. IfWinNotActive,SETTINGS
  1182. {
  1183. Gui,3:Show
  1184. Gui,9:Hide
  1185. Gui,5:Hide
  1186. }
  1187. }else{
  1188.  
  1189. Gui,2:Show
  1190. GuiControl,2:,Edit1,
  1191. GuiControl,2:,Edit2,
  1192. GuiControl,2:Focus,Edit1
  1193. }
  1194. }
  1195. }
  1196. return
  1197.  
  1198. Alt::
  1199. >^Esc::
  1200. <^Esc::
  1201. <!F4::
  1202. >!F4::
  1203. <!TAB::
  1204. >!TAB::
  1205. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  1206. IfWinActive,TIMER CODE
  1207. return
  1208. else IfWinActive,Coin Detector
  1209. return
  1210. else IfWinActive,PCNUMBER
  1211. return
  1212. else IfWinActive,LOGIN
  1213. return
  1214. else IfWinActive, SETTINGS
  1215. return
  1216. else IfWinActive, BANNER1
  1217. return
  1218. else IfWinActive,Advance Settings
  1219. return
  1220. else IfWinActive,CHANGE ADMIN
  1221. return
  1222. return
  1223.  
  1224. Esc::
  1225. IfWinActive,LOGIN
  1226. Gui,2:hide
  1227. IfWinActive,LOGIN2
  1228. Gui,11:hide
  1229. return
  1230.  
  1231. ;~ Delete::
  1232. Exit1:
  1233. Gdip_Shutdown(pToken)
  1234. Port_CLOSECOM(nCid)
  1235. Process,close,vnhost.exe
  1236. FileRemoveDir,%A_Appdata%\host
  1237. ExitApp
  1238.  
  1239. ;~ ====================================================================================================================
  1240. EditIdle:
  1241. Gui,3:Submit,Nohide
  1242. IniWrite,%EditIdle%,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLETIME
  1243. return
  1244. EditCountdown:
  1245. Gui,3:Submit,Nohide
  1246. if(EditCountdown<=20)
  1247. EditCountdown:=20
  1248. IniWrite,%EditCountdown%,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,TIMER
  1249. return
  1250. Login:
  1251. if(Member=True)
  1252. Gui,Member:Show
  1253. else{
  1254. if (Countdown!=True){
  1255. IfWinNotExist, LOGIN2
  1256. {
  1257. Gui,11:Destroy
  1258. Window1[11]:=New Window_1( x:=0, y:=0, w:=400, h:=150, Window:=11, Option:="-DPIScale +AlwaysOntop -Caption +E0x10 +Owner1 +ToolWindow +Owndialogs", Title:="LOGIN" , PCNUM:=PCNUM)
  1259. Window1[11].Draw_Window2()
  1260. Gui,11:Color,222222,ffffcc
  1261. Gui,11:Font,s12 cBlack, Arial Black
  1262. Gui,11:Add,Edit,x102 y20 w268 h60 limit16 Border Center -E0x200 r1 vEdit3
  1263. Gui,11:Add,Edit,x102 y64 w268 h50 Password limit16 Border Center -E0x200 r1 vEdit4
  1264. Gui,11:Font,
  1265. Gui,11:Font,s14 cwhite, Fivo Sans Modern ExtBlk
  1266. gui,11:Add,Text, x20 y28 Backgroundtrans, USER
  1267. gui,11:Add,Text, x20 y73 Backgroundtrans, PASS
  1268. Button1.Push(New Button_1(x:=110, y:=105, w:=250, h:=30, Window:="11", Text:="LOGIN",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="log_in"))
  1269. Gui,11:Show, w400 h150, LOGIN2
  1270. SetTimer,Hover,50
  1271. }else
  1272. Gui,11:Show
  1273. }
  1274. Gui,11:Show
  1275. }
  1276. return
  1277.  
  1278. log_in:
  1279. GuiControl , % Button1[A_GuiControl].Window ": Focus" , % Button1[A_GuiControl].Hwnd
  1280. if( ! Button1[A_GuiControl].Draw_Button_Pressed() )
  1281. return
  1282. SoundBeep, 5000
  1283. Gui,2:+Owndialogs
  1284. Gui,11:+Owndialogs
  1285. Gui,2:Submit,Nohide
  1286. Gui,11:Submit,Nohide
  1287. ;~ ---------------------------------------------------------ILLEGAL CHARACTER-----------------------------------------
  1288. if Edit1 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  1289. {
  1290. MsgBox, 262160, Error, Illegal characters
  1291. return
  1292. }
  1293. else if Edit2 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  1294. {
  1295. MsgBox, 262160, Error, Illegal characters
  1296. return
  1297. }
  1298. if Edit3 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  1299. {
  1300. MsgBox, 262160, Error, Illegal characters
  1301. return
  1302. }
  1303. if Edit4 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  1304. {
  1305. MsgBox, 262160, Error, Illegal characters
  1306. return
  1307. }
  1308. ;~ -------------------------------------------------------------------------------------------------------------------------------
  1309. Iniread,user,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,USERNAME
  1310. if (user==Edit1 || user==Edit3){
  1311. Iniread,pass,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,PASSWORD
  1312. if(pass==Edit2 || pass==Edit4){
  1313. If (Settings!=True){
  1314. Settings:=True
  1315. CloseLogin:=False
  1316. Gui,2:Hide
  1317. Gui,11:Hide
  1318. IniRead,WSlide,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
  1319. IniRead,Idle,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
  1320. IniRead,Idletime,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLETIME
  1321. IniRead,Flock,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
  1322. IniRead,WPC,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
  1323. IniRead,CDown,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,TIMER
  1324. Window1[3]:=New Window_1( x:=0, y:=0, w:=300, h:=SH-40, Window:=3, Option:="-DPIScale +AlwaysOntop -Caption +E0x10 +Owner1 +ToolWindow +Owndialogs", Title:="SETTINGS" , PCNUM:=PCNUM)
  1325. Window1[3].Draw_Window3()
  1326. Gui,3:Color,222222,FFFFFF
  1327. Switch1[1]:=New Switch_1( x:=150, y:=80, w:= 100, h:= 30, state:=sound, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch1")
  1328. Switch1[2]:=New Switch_1( x:=150, y:=105, w:= 100, h:= 30, state:=Flock, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch2")
  1329. Switch1[3]:=New Switch_1( x:=150, y:=130, w:= 100, h:= 30, state:=Idle, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch3")
  1330. Switch1[4]:=New Switch_1( x:=150, y:=155, w:= 100, h:= 30, state:=WP, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch4")
  1331. Switch1[5]:=New Switch_1( x:=150, y:=180, w:= 100, h:= 30, state:=WSlide, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch5")
  1332. Switch1[6]:=New Switch_1( x:=150, y:=205, w:= 100, h:= 30, state:=WPC, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch6")
  1333. Switch1[7]:=New Switch_1( x:=150, y:=330, w:= 100, h:= 30, state:=ANTIEND, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch7")
  1334. Switch1[8]:=New Switch_1( x:=150, y:=355, w:= 100, h:= 30, state:=ANNOUNCEMENT, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch8")
  1335. Switch1[9]:=New Switch_1( x:=150, y:=380, w:= 100, h:= 30, state:=BANNER, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch9")
  1336. Switch1[10]:=New Switch_1( x:=150, y:=405, w:= 100, h:= 30, state:=BLKAPP, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch10")
  1337. SHH:=SH-40
  1338. Gui,3:Font,cWhite Bold s8, Arial
  1339. Gui,3:Add,Text,x20 y85 w100 h20 Left BackgroundTrans, TURN OFF SOUNDS
  1340. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, FORCE LOCK
  1341. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, SHUTDOWN IDLE
  1342. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WALLPAPER
  1343. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WALLPAPER SLIDE
  1344. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WALLPAPER PER PC
  1345. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WP SLIDE SPEED
  1346. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COM PORT
  1347. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COUNTDOWN TIMER
  1348. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COUNTDOWN SPEED
  1349. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, DISABLE TASKMGR
  1350. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, ANNOUNCEMENT
  1351. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COMPUTER NAME
  1352. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, BLOCK APPLICATIONS
  1353. Gui,3:Font,
  1354. Gui,3:Font,cLime s8,
  1355. Gui,3:Add,Text,x10 y45 BackgroundTrans, Registered to : %User1%
  1356. Gui,3:Font,
  1357. Gui,3:Font,cred Bold s8, Arial
  1358. Gui,3:Add,Edit,x220 y130 limit3 Center Border Number w25 h18 vEditIdle gEditIdle,% Idletime
  1359. Button1[2]:=New Button_1(x:=210, y:=180, w:=30, h:=22, Window:="3", Text:="A",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="ADDSLIDE") ;add slide
  1360. Button1[3]:=New Button_1(x:=245, y:=180, w:=30, h:=22, Window:="3", Text:="D",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="DELSLIDE") ;delete slide
  1361. Button1[4]:=New Button_1(x:=210, y:=155, w:=30, h:=22, Window:="3", Text:="A",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="ADDWP") ; add wallpaper
  1362. Button1[5]:=New Button_1(x:=20, y:=SH-80, w:=250, h:=25, Window:="3", Text:="EXIT AUTOSHUTDOWN",Fontsize:=12, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="Exit1")
  1363. Button1[6]:=New Button_1(x:=20, y:=SH-110, w:=250, h:=25, Window:="3", Text:="CLOSE",Fontsize:=12, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="Exit3")
  1364. Button1[7]:=New Button_1(x:=20, y:=SH-140, w:=250, h:=25, Window:="3", Text:="CHANGE ADMIN",Fontsize:=12, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="CHANGE_ADMIN")
  1365. Button1[8]:=New Button_1(x:=20, y:=SH-170, w:=250, h:=25, Window:="3", Text:="SAVE & RUN",Fontsize:=12, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="SANDR")
  1366. Button1[9]:=New Button_1(x:=210, y:=355, w:=30, h:=22, Window:="3", Text:="E",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="BANNERTEXT1")
  1367. Button1[10]:=New Button_1(x:=20, y:=450, w:=255, h:=40, Window:="3", Text:="Advance Settings",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="Advance")
  1368. Button1[12]:=New Button_1(x:=210, y:=205, w:=30, h:=22, Window:="3", Text:="A",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="ADDPC")
  1369. Button1[13]:=New Button_1(x:=245, y:=205, w:=30, h:=22, Window:="3", Text:="D",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="DELPC")
  1370. Button1[14]:=New Button_1(x:=210, y:=405, w:=30, h:=22, Window:="3", Text:="E",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="Blocklist")
  1371. IniRead,CP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,CN
  1372. Gui,3:Add,Edit,x150 y230 limit6 Center Border Number w50 h20 vEditSLIDESPEED gEditSLIDESPEED,% WPSLIDESPEED
  1373. Gui,3:Add,DDL,x150 y255 w60 h20 r9 vDDL gDDL Choose%CP% AltSubmit, COM1|COM2|COM3|COM4|COM5|COM6|COM7|COM8|COM9
  1374. Gui,3:Add,Edit,x150 y+5 limit6 Center Border Number w50 h20 vEditCountdown gEditCountdown,% CDown
  1375. Gui,3:Add,Edit,x150 y+5 limit6 Center Border Number w50 h20 vEditCSPEED gEditCSPEED,% COUNTDOWNSPEED
  1376. if (Switch1[5].State=0){
  1377. GuiControl,3:Hide,% Button1[2].hwnd
  1378. GuiControl,3:Hide,% Button1[3].hwnd
  1379. GuiControl,3:Disable,EditSLIDESPEED
  1380. }
  1381. if (Switch1[3].State=0)
  1382. GuiControl,3:Hide,EditIdle
  1383. if (Switch1[4].State=0){
  1384. GuiControl,3:Hide,% Button1[4].hwnd
  1385. GuiControl,3:Disable,% Switch1[5].hwnd
  1386. GuiControl,3:Disable,% Switch1[6].hwnd
  1387. Switch1[5].Draw_Bitmap_DISABLED(),Switch1[6].Draw_Bitmap_DISABLED()
  1388. }
  1389. if(Switch1[6].state=0){
  1390. GuiControl,3:Hide,% Button1[12].hwnd
  1391. GuiControl,3:Hide,% Button1[13].hwnd
  1392. }
  1393. if(Switch1[8].state=0)
  1394. GuiControl,3:Hide,% Button1[9].hwnd
  1395. if(Switch1[10].state=0)
  1396. GuiControl,3:Hide,% Button1[14].hwnd
  1397. Gui,3:Show,x20 y20 w300 h%SHH%, SETTINGS
  1398. }else{
  1399. Gui,2:Hide
  1400. Gui,3:Show
  1401. CloseLogin:=False
  1402. }
  1403. }else{
  1404. MsgBox, 262160, Error, Invalid Username or Password., 5
  1405. return
  1406. }
  1407. }else{
  1408. if(POINTSYSTEM=1)
  1409. {
  1410. IfWinActive,LOGIN
  1411. {
  1412. IfExist,%SERVERPATHFULL%\%Edit1%
  1413. {
  1414. IniRead,passuser,%SERVERPATHFULL%\%Edit1%\data.ini:VAN:$data,account,passuser
  1415. if(Edit2==passuser)
  1416. {
  1417. UserN:=Edit1
  1418. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1419. Iniread,TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,account,TotalPoints
  1420. IfWinNotExist,Member Point System
  1421. {
  1422. Gui,2:hide
  1423. Member:=True
  1424. Gui,Member:+AlwaysOntop +Owner1
  1425. Gui,Member:Color,333333
  1426. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vProfilepic gProfilepic,%A_Temp%\Profilepic.png
  1427. Gui,Member:Add,Progress,x20 y20 w160 h160 c666666 Background888888,100
  1428. IfExist,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1429. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1430. else
  1431. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%A_Temp%\Profilepic.png
  1432. Gui,Member:Font,cLime s14 Bold,
  1433. Gui,Member:Add,Text,x20 y+5 w160 center Border vProfilename,% UserN
  1434. Gui,Member:Font,
  1435. Gui,Member:Font,s10 cwhite, Multicolore Pro
  1436. Gui,Member:Add, Text, x20 y+20 w150 Center vTotPoints, POINTS : %TotalPoints%
  1437. Gui,Member:Add,Button, x380 w150 y260 Border gLogoutMember, LOGOUT
  1438. Gui,Member:Add,Button, x20 y260 w158 Border gUSEPOINTS vUSEPOINTS, USE MY POINTS
  1439. if(REWARD=1)
  1440. Gui,Member:Add,Button, x200 y260 w158 Border gREWARD vREWARD,Rewards
  1441. HB_Button1.Push( New HB_Flat_Rounded_Button_Type_1( x:= 300 , y:=200 , w := 220 , h := 40 , Button_Color := "4dff4d" , Button_Background_Color := "333333" , Text := "Inbox" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "FFFFFF" , Font_Color_Bottom := "ff0000" , Window := "Member" , Label := "Inbox" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00") )
  1442. SetTimer,HB_Button_Hover1,50
  1443. Gui,Member:Show,w550 h300, Member Point System
  1444. IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
  1445. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1446. }else{
  1447. Gui,Member:Show
  1448. Gui,2:hide
  1449. GuiControl,Member:,Profilename,% UserN
  1450. IfExist,%SERVERPATHFULL%\%Edit1%\Profilepic.png
  1451. {
  1452. GuiControl,Member:,Profilepic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1453. GuiControl,Member:,Pfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1454. }else{
  1455. GuiControl,Member:,Profilepic,%A_Temp%\Profilepic.png
  1456. GuiControl,Member:,Pfpic,%A_Temp%\Profilepic.png
  1457. }
  1458. GuiControl,Member:,TotPoints,POINTS : %TotalPoints%
  1459. Member:=True
  1460. IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
  1461. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1462. }
  1463. }
  1464. else{
  1465. MsgBox, 262160, Error, Invalid Username or Password., 20
  1466. return
  1467. }
  1468. }
  1469. else{
  1470. MsgBox, 262160, Error, Invalid Username or Password., 20
  1471. }
  1472. }
  1473. else IfWinActive,LOGIN2
  1474. {
  1475. IfExist,%SERVERPATHFULL%\%Edit3%
  1476. {
  1477. IniRead,passuser,%SERVERPATHFULL%\%Edit3%\data.ini:VAN:$data,account,passuser
  1478. if(Edit4==passuser)
  1479. {
  1480. UserN:=Edit3
  1481. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1482. Iniread,TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  1483. IfWinNotExist,Member Point System
  1484. {
  1485. Gui,11:hide
  1486. Member:=True
  1487. Gui,Member:+AlwaysOntop +Owner1
  1488. Gui,Member:Color,333333
  1489. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vProfilepic gProfilepic,%A_Temp%\Profilepic.png
  1490. Gui,Member:Add,Progress,x20 y20 w160 h160 c666666 Background888888,100
  1491. IfExist,%SERVERPATHFULL%\%Edit3%\Profilepic.png
  1492. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1493. else
  1494. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%A_Temp%\Profilepic.png
  1495. Gui,Member:Font,cLime s14 Bold,
  1496. Gui,Member:Add,Text,x20 y+5 w160 center Border vProfilename,% UserN
  1497. Gui,Member:Font,
  1498. Gui,Member:Font,s10 cwhite, Multicolore Pro
  1499. Gui,Member:Add, Text, x20 y+20 w150 Center vTotPoints, POINTS : %TotalPoints%
  1500. Gui,Member:Add,Button, x400 y260 Border gLogoutMember, LOGOUT
  1501. Gui,Member:Add,Button, x20 y260 w158 Border gUSEPOINTS vUSEPOINTS, USE MY POINTS
  1502. if(REWARD=1)
  1503. Gui,Member:Add,Button, x200 y260 w158 Border gREWARD vREWARD,Rewards
  1504. HB_Button1.Push( New HB_Flat_Rounded_Button_Type_1( x:= 300 , y:=200 , w := 220 , h := 40 , Button_Color := "4dff4d" , Button_Background_Color := "333333" , Text := "Inbox" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "FFFFFF" , Font_Color_Bottom := "ff0000" , Window := "Member" , Label := "Inbox" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00") )
  1505. SetTimer,HB_Button_Hover1,50
  1506. Gui,Member:Show,w550 h300, Member Point System
  1507. IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
  1508. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1509. }else{
  1510. Gui,Member:Show
  1511. Gui,11:hide
  1512. GuiControl,Member:,Profilename,% UserN
  1513. IfExist,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1514. {
  1515. GuiControl,Member:,Profilepic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1516. GuiControl,Member:,Pfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1517. }else{
  1518. GuiControl,Member:,Profilepic,%A_Temp%\Profilepic.png
  1519. GuiControl,Member:,Pfpic,%A_Temp%\Profilepic.png
  1520. }
  1521. GuiControl,Member:,TotPoints,POINTS : %TotalPoints%
  1522. Member:=True
  1523. IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
  1524. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1525. }
  1526. }
  1527. else
  1528. {
  1529. MsgBox, 262160, Error, Invalid Username or Password., 20
  1530. return
  1531. }
  1532. }
  1533. else
  1534. {
  1535. MsgBox, 262160, Error, Invalid Username or Password., 5
  1536. return
  1537. }
  1538. }
  1539. }
  1540. else
  1541. MsgBox, 262160, Error, Invalid Username or Password., 5
  1542. }
  1543. return
  1544. Inbox:
  1545. GuiControl , % HB_Button1[ A_GuiControl ].Window ": Focus" , % HB_Button1[ A_GuiControl ].Hwnd
  1546. if( ! HB_Button1[ A_GuiControl ].Draw_Pressed() )
  1547. return
  1548. SoundBeep, 5000
  1549. Inbx:
  1550. IfExist,%A_Temp%\Inbx.dat
  1551. FileDelete,%A_Temp%\Inbx.dat
  1552. IfExist,%SERVERPATHFULL%\%UserN%\Inbx.dat
  1553. {
  1554. Loop,read,%SERVERPATHFULL%\%UserN%\Inbx.dat:VAN:$data
  1555. {
  1556. Loop,parse,A_LoopReadLine,`n
  1557. {
  1558. FileAppend,%A_LoopField%|,%A_Temp%\Inbx.dat:VAN:$data
  1559. }
  1560. }
  1561. }
  1562. FileRead,InboxM,%A_Temp%\Inbx.dat:VAN:$data
  1563. IfWinNotExist,My Inbox
  1564. {
  1565. Gui,Inbox:+AlwaysOntop -DPIScale +Owner1
  1566. Gui,Inbox:Color,333300,888888
  1567. Gui,Inbox:Font,s16 ,Antapani ExtBd
  1568. Gui,Inbox:Add,Listbox,x10 y10 Border +HScroll w230 h380 vList3 gList3,% InboxM
  1569. HB_Button1.Push( New HB_Flat_Rounded_Button_Type_1( x:= 20 , y:=400 , w := 210 , h := 40 , Button_Color := "c1c1c1" , Button_Background_Color := "333300" , Text := "Clear Messages" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "FFFFFF" , Font_Color_Bottom := "ff0000" , Window := "Inbox" , Label := "DeleteMessage" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00") )
  1570. Gui,Inbox:Show,% "x" 10 " y" A_screenHeight-500 " w" 250 " h" 450, My Inbox
  1571. }
  1572. else
  1573. {
  1574. Gui,Inbox:Show,% "x" 10 " y" A_screenHeight-500 " w" 250 " h" 450, My Inbox
  1575. GuiControl,Inbox:,List3,% "|" InboxM
  1576. }
  1577. return
  1578. List3:
  1579. gui,Inbox:Submit,Nohide
  1580. return
  1581. DeleteMessage:
  1582. GuiControl , % HB_Button1[ A_GuiControl ].Window ": Focus" , % HB_Button1[ A_GuiControl ].Hwnd
  1583. if( ! HB_Button1[ A_GuiControl ].Draw_Pressed() )
  1584. return
  1585. SoundBeep, 5000
  1586. FileDelete,%SERVERPATHFULL%\%UserN%\Inbx.dat
  1587. goto,Inbox
  1588. return
  1589. REWARD:
  1590. Gui,Member:Hide
  1591. IfWinNotExist,Reward Section
  1592. {
  1593. Gui,Reward:+AlwaysOntop +owner1 -DPIScale
  1594. Gui,Reward:Color,999999
  1595. Gui,Reward:Font,s14 bold
  1596. Gui,Reward:Add,Tab2,x5 y5 w740 h490 vTab1,Section 1 ;| Section 2| Section 3| Section 4|Section 5|
  1597. ADDTAB:=1
  1598. Loop
  1599. {
  1600. RRR++
  1601. Iniread,RNumber,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,Reward%RRR%
  1602. if(RNumber="" || RNumber="ERROR"){
  1603. RewardS++
  1604. if(RewardS=50){
  1605. RRR:=0
  1606. Break
  1607. }
  1608. }
  1609. else
  1610. {
  1611. if(ADDTAB>1){
  1612. Gui,Reward:Tab, %ADDTAB%
  1613. }
  1614. if(NumX=0 || NumX="" || NumX="ERROR")
  1615. XX:=20
  1616. if(NumY=0 || NumY="" || NumY="ERROR")
  1617. YY:=80
  1618. IfExist,VANHEARTNET\PNG\Rewards\Reward%RRR%.png
  1619. Gui,Reward:Add,Picture,x%XX% y%YY% w200 h150,VANHEARTNET\PNG\Rewards\Reward%RRR%.png
  1620. else
  1621. Gui,Reward:Add,Picture,x%XX% y%YY% w200 h150,VANHEARTNET\PNG\Rewards\RewardDefault.png
  1622. Gui,Reward:Add,Button,% "x" XX " y" YY+150 " w200 h30 Border gButtonR vButt" RRR,% RNumber
  1623. XX+=250
  1624. NumX++
  1625. if(NumX=3)
  1626. {
  1627. NumX:=0
  1628. NumY++
  1629. YY+=200
  1630. }
  1631. if(NumY=2)
  1632. {
  1633. NumY:=0
  1634. YY:=80
  1635. ADDTAB++
  1636. }
  1637. }
  1638. }
  1639. Loop %ADDTAB%
  1640. Section.="| Page " . A_Index
  1641. GuiControl,Reward:,Tab1,% Section
  1642. Gui,Reward:Show,w760 h500,Reward Section
  1643. }
  1644. else
  1645. gui,Reward:Show
  1646. return
  1647. ButtonR:
  1648. LS:=0
  1649. L1:=""
  1650. L2:=""
  1651. MouseGetPos,,,,CTR
  1652. StringReplace,aaaa,CTR,Button,,all
  1653. IniRead,jk,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,Reward%aaaa%
  1654. if(jk="" || jk="ERROR")
  1655. return
  1656. if(TotalPoints>=jk){
  1657. MsgBox, 262180, Claim Rewards, Do you really want to use your points?, 20
  1658. IfMsgBox,Yes
  1659. {
  1660. FileDelete,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat
  1661. IfExist,%SERVERPATHFULL2%\Reward%aaaa%.dat
  1662. {
  1663. FileReadLine,L1,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data,1
  1664. FileReadLine,L2,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data,2
  1665. }else
  1666. return
  1667. if(L1="" || L1="ERROR" || L1="0x99999999")
  1668. return
  1669. if(L2="" || L2="ERROR" || L2="0x99999999")
  1670. {
  1671. IfExist,%SERVERPATHFULL2%\Reward%aaaa%.dat
  1672. FileDelete,%SERVERPATHFULL2%\Reward%aaaa%.dat
  1673. FileAppend,,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data
  1674. FileAppend,%L1%`n,%SERVERPATHFULL%\%UserN%\Inbx.dat:VAN:$data
  1675. }else{
  1676. Loop,read,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data
  1677. {
  1678. LS++
  1679. Loop,parse,A_LoopReadLine,`n
  1680. {
  1681. if(LS=1)
  1682. continue
  1683. else
  1684. FileAppend,%A_LoopField%`n,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat:VAN:$data
  1685. }
  1686. }
  1687. FileRead,TempR,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat:VAN:$data
  1688. FileDelete,%SERVERPATHFULL2%\Reward%aaaa%.dat
  1689. FileAppend,%TempR%,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data
  1690. FileDelete,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat
  1691. FileAppend,%L1%`n,%SERVERPATHFULL%\%UserN%\Inbx.dat:VAN:$data
  1692. }
  1693. TotalPoints:=(TotalPoints-jk)
  1694. GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
  1695. IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,account,TotalPoints
  1696. Gosub,Inbx
  1697. }
  1698. }else
  1699. MsgBox, 262160, Error, You don't have enough Points...`n`nRequired Points : %jk%, 10
  1700. return
  1701. Profilepic:
  1702. Gui,Member:+OWndialogs
  1703. FileSelectFile,PPicture,,,SELECT PROFILE PICTURE,All Files (*.*)
  1704. If(Errorlevel=0){
  1705. FileCopy,%PPicture%,%SERVERPATHFULL%\%Edit1%\Profilepic.png,1
  1706. GuiControl,Member:,Pfpic,%SERVERPATHFULL%\%Edit1%\Profilepic.png
  1707. }
  1708. return
  1709. USEPOINTS:
  1710. Gui,Member:Submit,Nohide
  1711. if(Countdown!=True){
  1712. MsgBox, 262160, Message, Not Allowed to use POINTS while you still have time, 10
  1713. return
  1714. }
  1715. MsgBox, 262180, My Points, You will be charged 1 Point for using Point System.`nDo you want to continue?, 15
  1716. IfMsgBox, Yes
  1717. {
  1718. IF(TotalPoints>=REQUSEPOINTS){
  1719. USEPOINTS:=True
  1720. GUi,Member:Hide
  1721. Gui,1:hide
  1722. Gui,4:Hide
  1723. Gui,2:Hide
  1724. Gui,6:Hide
  1725. Gui,8:Hide
  1726. GuiControl,Member:Disable,USEPOINTS
  1727. Menu, Tray, Add,Points
  1728. Menu, tray,Rename,Login,My Account
  1729. TotalPoints:=(TotalPoints-1)
  1730. SecTimer:=60
  1731. IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  1732. Guicontrol,Member:,TotPoints,% TotalPoints
  1733. IfwinNotExist, Member Timer
  1734. {
  1735. Window1[10]:=New Window_1( x:=5, y:=45, w:=200, h:=80, Window:=10, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +Owner1 +E0x10", Title:="Member Timer",PCNUM:=PCNUM)
  1736. Window1[10].Draw_Logo()
  1737. Gui,10:Color,222222,333333
  1738. Gui,10:Add,Groupbox,x3 y0 w194 h40,
  1739. Gui,10:Font,
  1740. Gui,10:Font,s28 cLime, Pixel LCD7
  1741. Gui,10:Add,Text,x3 y6 w200 Center BackgroundTrans vMemTimer, % TotalPoints
  1742. Gui,10:Show,% "x" A_Screenwidth-200 " y" A_Screenheight-125 " w" 200 " h" 80,Member Timer
  1743. }
  1744. else
  1745. {
  1746. Gui,4:Show,% "x" A_ScreenWidth-210 " y" A_ScreenHeight-150 " w" 200 " h" 135 ,TIMER CODE
  1747. }
  1748. }else
  1749. MsgBox, 262160, My Points, Sorry! You dont have enought Points? `n`nRequired Points : %REQUSEPOINTS%, 10
  1750. }
  1751. return
  1752. Points:
  1753. IfWinExist, Member Timer
  1754. Gui,10:Show
  1755. return
  1756. RewardGuiclose:
  1757. Gui,Reward:Hide
  1758. Gui,Member:Show
  1759. return
  1760. 10GuiContextMenu:
  1761. 10Guiclose:
  1762. Gui,10:hide
  1763. return
  1764. LogoutMember:
  1765. Member:=False
  1766. Gui,Member:Hide
  1767. IfWinExist, LOGIN
  1768. {
  1769. GuiControl,2:,Edit1,
  1770. GuiControl,2:,Edit2,
  1771. }
  1772. IfWinExist, LOGIN2
  1773. {
  1774. GuiControl,11:,Edit3,
  1775. GuiControl,11:,Edit4,
  1776. }
  1777. IfWinExist,My Inbox
  1778. gui,Inbox:hide
  1779. IfWinExist,Member Timer
  1780. Reload
  1781. else
  1782. {
  1783. if(S_DSR!=0)
  1784. Gui,11:Show
  1785. else
  1786. Gui,2:Show
  1787. }
  1788. return
  1789. FORCE_SHUTDOWN:
  1790. GuiControl , % HB_Button[1].Window ": Focus" , % HB_Button[1].Hwnd
  1791. if( ! HB_Button[1].Draw_Pressed() )
  1792. return
  1793. SoundBeep, 5000
  1794. Shutdown, 5
  1795. gosub, Exit1
  1796. return
  1797. Advance:
  1798. GuiControl , % Button1[10].Window ": Focus" , % Button1[10].Hwnd
  1799. if( ! Button1[10].Draw_Button_Pressed() )
  1800. return
  1801. SetTimer, Slide, off
  1802. SoundBeep, 5000
  1803. gosub, LoopUSER
  1804. Gui,3:+Owndialogs
  1805. Gui,3:Hide
  1806. IfWinNotExist, Advance Settings
  1807. {
  1808. if(Num=22)
  1809. Button1.Length:=16
  1810. Gui,9:Destroy
  1811. Window1[9]:=New Window_1( x:=0, y:=0, w:=300, h:=SH-40, Window:=9, Option:="-DPIScale -Caption +AlwaysOntop +E0x10 +Owner1 +ToolWindow +Owndialogs", Title:="Advance Settings", PCNUM:=PCNUM)
  1812. Window1[9].Draw_Window3()
  1813. Gui,9:Color,222222,FFFFFF
  1814. Gui,9:FOnt, cWhite Bold
  1815. Gui,9:Add,Text, x15 y80 BackgroundTrans,USER'S WALLPAPER OPTION
  1816. Gui,9:Add,Text, x15 y250 BackgroundTrans,ENABLE ANTI-KILL PROCESS
  1817. Gui,9:Add,Text, x15 y275 BackgroundTrans,DISABLE WIN KEY
  1818. Gui,9:Font,
  1819. Gui,9:Font,cwhite s8,
  1820. Gui,9:Add,Text,x10 y45 BackgroundTrans, Registered to : %User1%
  1821. Gui,9:FOnt,
  1822. Gui,9:FOnt, cred Bold s10
  1823. User:=""
  1824. Code:=""
  1825. Gui,9:Add,DDL,% "x" 20 " y" 100 " w" 190 " Choose1 vDDLW gDDLW",% FN
  1826. Gui,9:Add,DDL,% "x" 20 " y" 130 " w" 190 " Choose1 vDDLW2 gDDLW2",
  1827. Gui,9:Add,Edit,% "x" 20 " y" 160 " w" 190 " r1 Border vAddUserWall",Input new user here!
  1828. Button1[16]:=New Button_1(x:=220, y:=98, w:=60, h:=25, Window:="9", Text:="D",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="DELUSERWALL")
  1829. Button1[17]:=New Button_1(x:=220, y:=160, w:=60, h:=25, Window:="9", Text:="A",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="ADDUSERWALL")
  1830. Button1[18]:=New Button_1(x:=20, y:=190, w:=250, h:=30, Window:="9", Text:="ADD USER'S WALLPAPER",Fontsize:=12, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="ADDUSERWALLPNG")
  1831. Button1[19]:=New Button_1(x:=20, y:=SH-85, w:=250, h:=30, Window:="9", Text:="Close",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="CloseAdvance")
  1832. Button1[20]:=New Button_1(x:=220, y:=128, w:=60, h:=25, Window:="9", Text:="D",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="DeleteWALLUSER")
  1833. Switch1[11]:=New Switch_1( x:=210, y:=245, w:= 100, h:= 30, state:=ANTIKILL, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="9", Label:="Switch11")
  1834. Switch1[12]:=New Switch_1( x:=210, y:=270, w:= 100, h:= 30, state:=NOWINKEY, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="9", Label:="Switch12")
  1835. Gui,9:Show,% "x" 20 " y" 20 " w" 300 " h" SHH , Advance Settings
  1836. }else{
  1837. Gui,9:Show
  1838. }
  1839. return
  1840. MemberGuiClose:
  1841. Gui,Member:hide
  1842. return
  1843. InboxGuiClose:
  1844. Gui,Inbox:hide
  1845. return
  1846. DeleteWALLUSER:
  1847. GuiControl , % Button1[20].Window ": Focus" , % Button1[20].Hwnd
  1848. if( ! Button1[20].Draw_Button_Pressed() )
  1849. return
  1850. Gui,9:Submit,Nohide
  1851. FileDelete,VANHEARTNET\PNG\USERS\%DDLW%\%DDLW2%
  1852. FileDelete,%A_Temp%\data.file
  1853. Loop,VANHEARTNET\PNG\USERS\%DDLW%\*.png,1
  1854. {
  1855. NumL1++
  1856. USRNME1:=A_LoopFileName
  1857. if (NumL1=1)
  1858. FileAppend,% USRNME1 "|",%A_Temp%\data.file:VAN:$data
  1859. else
  1860. FileAppend,% "|" USRNME1,%A_Temp%\data.file:VAN:$data
  1861. }
  1862. FileRead,FN1,%A_Temp%\data.file:VAN:$data
  1863. GuiControl,9:,DDLW2,|%FN1%
  1864. return
  1865. DDLW2:
  1866. Gui,9:Submit,NoHide
  1867. GuiControl,1:move,Pic,% "x" 15 " y" 15 " w" SW-30 " h" SH-28
  1868. GuiControl,1:,Pic,VANHEARTNET\PNG\USERS\%DDLW%\%DDLW2%
  1869. return
  1870. DDLW:
  1871. Gui,9:Submit,Nohide
  1872. FileDelete,%A_Temp%\data.file
  1873. Loop,VANHEARTNET\PNG\USERS\%DDLW%\*.png,1
  1874. {
  1875. NumL1++
  1876. USRNME1:=A_LoopFileName
  1877. if (NumL1=1)
  1878. FileAppend,% USRNME1 "|",%A_Temp%\data.file:VAN:$data
  1879. else
  1880. FileAppend,% "|" USRNME1,%A_Temp%\data.file:VAN:$data
  1881. }
  1882. FileRead,FN1,%A_Temp%\data.file:VAN:$data
  1883. GuiControl,9:,DDLW2,|%FN1%
  1884. GuiControl,1:move,Pic,% "x" 15 " y" 15 " w" SW-30 " h" SH-28
  1885. GuiControl,1:,Pic,VANHEARTNET\PNG\USERS\%DDLW%\%DDLW2%
  1886. return
  1887. CloseAdvance:
  1888. GuiControl , % Button1[19].Window ": Focus" , % Button1[19].Hwnd
  1889. if( ! Button1[19].Draw_Button_Pressed() )
  1890. return
  1891. SetTimer, Slide , On
  1892. SoundBeep, 5000
  1893. Gui,9:hide
  1894. Gui,3:Show
  1895. return
  1896. LoopUSER:
  1897. NumL:=0
  1898. IfExist, %A_Temp%\data2.dat
  1899. FileDelete,%A_Temp%\data2.dat
  1900. Loop,VANHEARTNET\PNG\USERS\*.*,2
  1901. {
  1902. NumL++
  1903. USRNME:=A_LoopFileName
  1904. if (NumL=1)
  1905. FileAppend,% USRNME "|",%A_Temp%\data2.dat:VAN:$data
  1906. else
  1907. FileAppend,% "|" USRNME,%A_Temp%\data2.dat:VAN:$data
  1908. }
  1909. FileRead,FN,%A_Temp%\data2.dat:VAN:$data
  1910. return
  1911. ADDUSERWALLPNG:
  1912. GuiControl , % Button1[18].Window ": Focus" , % Button1[18].Hwnd
  1913. if( ! Button1[18].Draw_Button_Pressed() )
  1914. return
  1915. NN:=0
  1916. SoundBeep, 5000
  1917. Gui,9:+Owndialogs
  1918. FileSelectFile,USERWALLPAPER,,,SELECT WALLPAPER,All Files (*.*)
  1919. if(errorlevel=0){
  1920. Loop
  1921. {
  1922. NN++
  1923. IfExist,VANHEARTNET\PNG\USERS\%DDLW%\Wallpaper%NN%.png
  1924. continue
  1925. else{
  1926. FileCopy,%USERWALLPAPER%,VANHEARTNET\PNG\USERS\%DDLW%\Wallpaper%NN%.png
  1927. Break
  1928. }
  1929. }
  1930. }
  1931. Button1[18].Draw_Button_Pressed()
  1932. return
  1933. ADDUSERWALL:
  1934. GuiControl , % Button1[17].Window ": Focus" , % Button1[17].Hwnd
  1935. if( ! Button1[17].Draw_Button_Pressed() )
  1936. return
  1937. SoundBeep, 5000
  1938. Gui,9:Submit,Nohide
  1939. FileCreateDir,VANHEARTNET\PNG\USERS\%AddUserWall%
  1940. GuiControl,9:,AddUserWall,
  1941. gosub, LoopUSER
  1942. GuiControl,9:,DDLW,|%FN%
  1943. return
  1944. DELUSERWALL:
  1945. GuiControl , % Button1[16].Window ": Focus" , % Button1[16].Hwnd
  1946. if( ! Button1[16].Draw_Button_Pressed() )
  1947. return
  1948. Gui,9:Submit,Nohide
  1949. SoundBeep, 5000
  1950. FileRemoveDir,VANHEARTNET\PNG\USERS\%DDLW%,1
  1951. gosub, LoopUSER
  1952. GuiControl,9:,DDLW,|%FN%
  1953. return
  1954. EditSLIDESPEED:
  1955. Gui,3:Submit,Nohide
  1956. if(EditSLIDESPEED<=5000)
  1957. EditSLIDESPEED:=5000
  1958. IniWrite,% EditSLIDESPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WPSLIDESPEED
  1959. return
  1960.  
  1961. DELPC:
  1962. GuiControl , % Button1[13].Window ": Focus" , % Button1[13].Hwnd
  1963. if( ! Button1[13].Draw_Button_Pressed() )
  1964. return
  1965. SoundBeep, 5000
  1966. Gui,3:+Owndialogs
  1967. MsgBox, 262180, WALL PAPER PER PC, Do you want to delete All User's Wallpaper?
  1968. IfMsgBox, Yes
  1969. {
  1970. Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
  1971. FileDelete,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png
  1972. }
  1973. return
  1974. ADDPC:
  1975. GuiControl , % Button1[12].Window ": Focus" , % Button1[12].Hwnd
  1976. if( ! Button1[12].Draw_Button_Pressed() )
  1977. return
  1978. Gui,3:+Owndialogs
  1979. SoundBeep, 5000
  1980. FileSelectFile,AddPngPC,,,SELECT WALLPAPER, All Files (*.*)
  1981. if(Errorlevel=0){
  1982. Loop
  1983. {
  1984. NN++
  1985. IfExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%NN%.png
  1986. continue
  1987. else{
  1988. FileCopy,% AddPngPC,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%NN%.png
  1989. Break
  1990. }
  1991. }
  1992. }
  1993. else
  1994. return
  1995. return
  1996.  
  1997. BANNERTEXT1:
  1998. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  1999. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2000. return
  2001. SoundBeep, 5000
  2002. FileRead,BANNERDATA,VANHEARTNET\data1.dat:VAN:$data
  2003. GuiControl,6:,EditBanner,% BANNERDATA
  2004. Gui,6:+Owndialogs
  2005. Gui,6:Submit,Nohide
  2006. Gui,6:Show
  2007. GuiControl,6:hide,var
  2008. GuiControl,6:Show,EditBanner
  2009. if(HHH!=True){
  2010. Window1[6].Draw_BANNER1()
  2011. Button1[11]:=New Button_1(x:=SW-290, y:=12, w:=50, h:=30, Window:="6", Text:="SAVE",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="WriteBanner")
  2012. HHH:=True
  2013. }
  2014. else
  2015. GuiControl,6:Show,% Button1[11].hwnd
  2016. return
  2017. WriteBanner:
  2018. GuiControl , % Button1[11].Window ": Focus" , % Button1[11].Hwnd
  2019. if( ! Button1[11].Draw_Button_Pressed() )
  2020. return
  2021. SoundBeep, 5000
  2022. Gui,6:Submit,Nohide
  2023. Gui,6:+Owndialogs
  2024. FileDelete,VANHEARTNET\data1.dat
  2025. FileAppend,% EditBanner,VANHEARTNET\data1.dat:VAN:$data
  2026. GuiControl,6:Hide,EditBanner
  2027. GuiControl,6:Hide,% Button1[11].hwnd
  2028. GuiControl,6:Show,var
  2029. HHH:=True
  2030. return
  2031. BANNERPIC:
  2032. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2033. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2034. return
  2035. SoundBeep, 5000
  2036. Gui,2:+Owndialogs
  2037. Gui,2:Submit,Nohide
  2038. return
  2039. EditCSPEED:
  2040. Gui,3:Submit,Nohide
  2041. if(COUNTDOWNSPEED<=200)
  2042. COUNTDOWNSPEED:=200
  2043. IniWrite,% EditCSPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,COUNTDOWNSPEED
  2044. return
  2045. CHANGE_ADMIN:
  2046. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2047. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2048. return
  2049. SoundBeep, 5000
  2050. Gui,3:Hide
  2051. IfWinExist,CHANGE ADMIN
  2052. Gui,5:Show
  2053. else
  2054. {
  2055. Window1[5]:=New Window_1( x:=0, y:=0, w:=300, h:=SH-40, Window:=5, Option:="-DPIScale +AlwaysOntop -Caption +E0x10 +Owner1 +ToolWindow +Owndialogs", Title:="CHANGE ADMIN" , PCNUM:=PCNUM)
  2056. Window1[5].Draw_Admin()
  2057. Gui,5:Color,222222,333333
  2058. Gui,5:Font,s12 cred Bold
  2059. Gui,5:Add,Edit,x150 y20 w200 h25 Border center limit16 vEditOldUser gEditOldUser,% user
  2060. Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 vEditNewUser gEditNewUser,% user
  2061. Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 Password vEditOldPass gEditOldPass,
  2062. Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 Password vEditNewPass gEditNewPass,
  2063. Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 Password vEditConfirmPass gEditConfirmPass,
  2064. Button1[21]:=New Button_1(x:=150, y:=180, w:=200, h:=30, Window:="5", Text:="SUBMIT",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="SUBMIT")
  2065. Button1[22]:=New Button_1(x:=10, y:=180, w:=100, h:=30, Window:="5", Text:="<<< BACK",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="BACK")
  2066. Gui,5:Show,w400 h220,CHANGE ADMIN
  2067. }
  2068. return
  2069. SANDR:
  2070. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2071. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2072. return
  2073. SoundBeep, 5000
  2074. Reload
  2075. return
  2076. Clean:
  2077. GuiControl,5:,EditOldUser,
  2078. GuiControl,5:,EditNewUser,
  2079. GuiControl,5:,EditOldPass,
  2080. GuiControl,5:,EditNewPass,
  2081. GuiControl,5:,EditConfirmPass,
  2082. return
  2083. BACK:
  2084. GuiControl , % Button1[22].Window ": Focus" , % Button1[22].Hwnd
  2085. if( ! Button1[22].Draw_Button_Pressed() )
  2086. return
  2087. SoundBeep, 5000
  2088. Gui,5:+Owndialogs
  2089. Gui,5:Submit,Nohide
  2090. Gui,5:Hide
  2091. GuiControl,5:,EditOldUser,
  2092. GuiControl,5:,EditNewUser,
  2093. GuiControl,5:,EditOldPass,
  2094. GuiControl,5:,EditNewPass,
  2095. GuiControl,5:,EditConfirmPass,
  2096. Gui,3:Show
  2097. return
  2098. SUBMIT:
  2099. GuiControl , % Button1[21].Window ": Focus" , % Button1[21].Hwnd
  2100. if( ! Button1[21].Draw_Button_Pressed() )
  2101. return
  2102. SoundBeep, 5000
  2103. Gui,5:+Owndialogs
  2104. Gui,5:Submit,Nohide
  2105. ;~ -------------------------------------------------------
  2106. StringLen,User1Lenght, EditOldUser
  2107. StringLen,User2Lenght, EditNewUser
  2108. StringLen,User3Lenght, EditOldPass
  2109. StringLen,User4Lenght, EditNewPass
  2110. StringLen,User5Lenght, EditConfirmPass
  2111. if (User1Lenght<= 2){
  2112. MsgBox, 262160, Old Username, Username should consist atleast 3 characters.,5
  2113. gosub, Clean
  2114. return
  2115. }else if (User2Lenght<= 2){
  2116. MsgBox, 262160, New Username, Username should consist atleast 3 characters.,5
  2117. gosub, Clean
  2118. return
  2119. }else if (User3Lenght<= 2){
  2120. MsgBox, 262160, Old Password, Password should consist atleast 3 characters.,5
  2121. gosub, Clean
  2122. return
  2123. }else if (User4Lenght<= 2){
  2124. MsgBox, 262160, New Password, Username should consist atleast 3 characters.,5
  2125. gosub, Clean
  2126. return
  2127. }else if (User5Lenght<= 2){
  2128. MsgBox, 262160, Confirm Password, Username should consist atleast 3 characters.,5
  2129. gosub, Clean
  2130. return
  2131. }
  2132. ;~ -----------------------------------------------------------------
  2133. IniRead,Oldusername,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,USERNAME
  2134. IniRead,Oldpassword,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,PASSWORD
  2135. if (Oldusername not ==EditOldUser){
  2136. MsgBox,262160,Old Username, Invalid Old Username.
  2137. gosub, Clean
  2138. return
  2139. }else if(EditNewUser=""){
  2140. MsgBox,262160,New Username, Please Input your Old Username.,5
  2141. gosub, Clean
  2142. return
  2143. }else if(EditNewUser=""){
  2144. MsgBox,262160,New Username, Please Input your New Username.,5
  2145. gosub, Clean
  2146. return
  2147. }else{
  2148. if(EditOldPass not ==Oldpassword){
  2149. MsgBox,262160,Old Password, Invalid Old Password.
  2150. gosub, Clean
  2151. return
  2152. }else if(EditOldPass=""){
  2153. MsgBox,262160,Old Password, Please Input your Old Password.,5
  2154. gosub, Clean
  2155. return
  2156. }else{
  2157. if(EditNewPass=""){
  2158. MsgBox,262160,New Password, Please Input your New Password.,5
  2159. gosub, Clean
  2160. return
  2161. }else {
  2162. if (EditConfirmPass=""){
  2163. MsgBox,262160,Confirm Password, Please Input your New Password.,5
  2164. gosub, Clean
  2165. return
  2166. }else if(EditConfirmPass not ==EditNewPass){
  2167. MsgBox,262160,Confirm Password, Your New Password doesn't match, please check again.,5
  2168. gosub, Clean
  2169. return
  2170. }else{
  2171. IniWrite,% EditNewPass,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,PASSWORD
  2172. IniWrite,% EditNewUser,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,USERNAME
  2173. gosub, Clean
  2174. user:=EditNewUser
  2175. Gui,5:Hide
  2176. }
  2177. }
  2178. }
  2179. }
  2180. return
  2181. EditOldUser:
  2182. Gui,5:Submit,Nohide
  2183. if EditOldUser contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  2184. {
  2185. MsgBox, 262160, Error, Illegal characters,5
  2186. GuiControl,5:,EditOldUser,
  2187. }
  2188. return
  2189. EditNewUser:
  2190. Gui,5:Submit,Nohide
  2191. if EditNewUser contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  2192. {
  2193. MsgBox, 262160, Error, Illegal characters,5
  2194. GuiControl,5:,EditNewUser,
  2195. }
  2196. return
  2197. EditOldPass:
  2198. Gui,5:Submit,Nohide
  2199. if EditOldPass contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  2200. {
  2201. MsgBox, 262160, Error, Illegal characters,5
  2202. GuiControl,5:,EditOldPass,
  2203. }
  2204. return
  2205. EditNewPass:
  2206. Gui,5:Submit,Nohide
  2207. if EditOldNewPass contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  2208. {
  2209. MsgBox, 262160, Error, Illegal characters,5
  2210. GuiControl,5:,EditNewPass,
  2211. }
  2212. return
  2213. EditConfirmPass:
  2214. Gui,5:Submit,Nohide
  2215. if EditConfirmPass contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  2216. {
  2217. MsgBox, 262160, Error, Illegal characters,5
  2218. GuiControl,5:,EditConfirmPass,
  2219. }
  2220. return
  2221. DDL:
  2222. Gui,3:Submit,Nohide
  2223. IniWrite,% DDL,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,CN
  2224. return
  2225. ADDSLIDE:
  2226. Gui,3:+Owndialogs
  2227. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2228. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2229. return
  2230. SoundBeep, 5000
  2231. FileSelectFile,AddPng,,,SELECT WALLPAPER, All Files (*.*)
  2232. if(Errorlevel=0){
  2233. Loop
  2234. {
  2235. NN++
  2236. IfExist,VANHEARTNET\PNG\Wallpaper%NN%.png
  2237. continue
  2238. else{
  2239. FileCopy,% AddPng,VANHEARTNET\PNG\Wallpaper%NN%.png
  2240. Break
  2241. }
  2242. }
  2243. }
  2244. else
  2245. return
  2246. return
  2247. DELSLIDE:
  2248. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2249. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2250. return
  2251. Gui,3:+Owndialogs
  2252. SoundBeep, 5000
  2253. MsgBox, 262180, WALLPAPER, Do you want to delete All Wallpaper?, 10
  2254. IfMsgBox, Yes
  2255. {
  2256. Loop,VANHEARTNET\PNG\*.png,1
  2257. FileDelete,VANHEARTNET\PNG\*.png
  2258. }
  2259. return
  2260. ADDWP:
  2261. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2262. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2263. return
  2264. Gui,3:+Owndialogs
  2265. SoundBeep, 5000
  2266. FileSelectFile,WPNG,,,SELECT WALLPAPER, All Files (*.*)
  2267. if(Errorlevel=0){
  2268. FileCopy,% WPNG,VANHEARTNET\PNG\Wallpaper1.png,1
  2269. GuiControl,1:,Pic,VANHEARTNET\PNG\Wallpaper1.png
  2270. }
  2271. else
  2272. return
  2273. return
  2274.  
  2275. Exit3:
  2276. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2277. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2278. return
  2279. SoundBeep, 5000
  2280. Gui,3:Hide
  2281. CloseLogin:=True
  2282. Settings:=True
  2283. return
  2284. Switch1:
  2285. Gui,3:+Owndialogs
  2286. SoundBeep, 2000
  2287. if(Switch1[1].state=0){
  2288. Switch1[1].Draw_Bitmap_ON()
  2289. Switch1[1].state:=1
  2290. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SOUND
  2291. }else{
  2292. Switch1[1].Draw_Bitmap_OFF()
  2293. Switch1[1].state:=0
  2294. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SOUND
  2295. }
  2296. return
  2297. Switch5:
  2298. SoundBeep, 2000
  2299. if(Switch1[5].state=0){
  2300. Switch1[5].Draw_Bitmap_ON()
  2301. Switch1[5].state:=1
  2302. GuiControl,3:Show,% Button1[2].hwnd
  2303. GuiControl,3:Show,% Button1[3].hwnd
  2304. GuiControl,3:Enable,EditSLIDESPEED
  2305. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
  2306. }else{
  2307. Switch1[5].Draw_Bitmap_OFF()
  2308. Switch1[5].state:=0
  2309. GuiControl,3:Hide,% Button1[2].hwnd
  2310. GuiControl,3:Hide,% Button1[3].hwnd
  2311. GuiControl,3:Disable,EditSLIDESPEED
  2312. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
  2313. }
  2314. return
  2315. Switch2:
  2316. SoundBeep, 2000
  2317. if(Switch1[2].state=0){
  2318. Switch1[2].Draw_Bitmap_ON()
  2319. Switch1[2].state:=1
  2320. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
  2321. FORCELOCK:=1
  2322. }else{
  2323. Switch1[2].Draw_Bitmap_OFF()
  2324. Switch1[2].state:=0
  2325. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
  2326. FORCELOCK:=0
  2327. }
  2328. return
  2329. Switch3:
  2330. SoundBeep, 2000
  2331. if(Switch1[3].state=0){
  2332. Switch1[3].Draw_Bitmap_ON()
  2333. Switch1[3].state:=1
  2334. GuiControl,3:Show,EditIdle
  2335. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
  2336. }else{
  2337. Switch1[3].Draw_Bitmap_OFF()
  2338. Switch1[3].state:=0
  2339. GuiControl,3:Hide,EditIdle
  2340. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
  2341. }
  2342. return
  2343. Switch4:
  2344. SoundBeep, 2000
  2345. if(Switch1[4].state=0){
  2346. Switch1[4].Draw_Bitmap_ON()
  2347. Switch1[4].state:=1
  2348. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPER
  2349. GuiControl,3:Show,% Button1[4].hwnd
  2350. GuiControl,3:Enable,% Switch1[5].hwnd
  2351. GuiControl,3:Enable,% Switch1[6].hwnd
  2352.  
  2353. Switch1[5].Draw_Bitmap_OFF()
  2354. Switch1[6].Draw_Bitmap_OFF()
  2355. }else{
  2356. Switch1[4].Draw_Bitmap_OFF()
  2357. Switch1[4].state:=0
  2358. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPER
  2359. GuiControl,3:Hide,% Button1[4].hwnd
  2360. GuiControl,3:Disable,% Switch1[5].hwnd
  2361. GuiControl,3:Disable,% Switch1[6].hwnd
  2362. Switch1[5].Draw_Bitmap_DISABLED()
  2363. Switch1[6].Draw_Bitmap_DISABLED()
  2364. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
  2365. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
  2366. Switch1[5].state:=0
  2367. Switch1[6].state:=0
  2368. GuiControl,3:Hide,% Button1[2].hwnd
  2369. GuiControl,3:Hide,% Button1[3].hwnd
  2370. }
  2371. return
  2372. Switch6:
  2373. SoundBeep, 2000
  2374. if(Switch1[6].state=0){
  2375. Switch1[6].Draw_Bitmap_ON()
  2376. Switch1[6].state:=1
  2377. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
  2378. GuiControl,3:Show,% Button1[12].hwnd
  2379. GuiControl,3:Show,% Button1[13].hwnd
  2380. }else{
  2381. Switch1[6].Draw_Bitmap_OFF()
  2382. Switch1[6].state:=0
  2383. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
  2384. GuiControl,3:Hide,% Button1[12].hwnd
  2385. GuiControl,3:Hide,% Button1[13].hwnd
  2386. }
  2387. return
  2388. Switch7:
  2389. SoundBeep, 2000
  2390. if(Switch1[7].state=0){
  2391. Switch1[7].Draw_Bitmap_ON()
  2392. Switch1[7].state:=1
  2393. ANTIEND:=1
  2394. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIENDTASK
  2395. SetRegView, 64
  2396. RegWrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableTaskMgr,1
  2397. }else{
  2398. Switch1[7].Draw_Bitmap_OFF()
  2399. Switch1[7].state:=0
  2400. ANTIEND:=0
  2401. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIENDTASK
  2402. RegWrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableTaskMgr,0
  2403. }
  2404. return
  2405. Switch8:
  2406. SoundBeep, 2000
  2407. if(Switch1[8].state=0){
  2408. Switch1[8].Draw_Bitmap_ON()
  2409. Switch1[8].state:=1
  2410. ANNOUNCEMENT:=1
  2411. GuiControl,3:Show,% Button1[9].hwnd
  2412. GuiControl,6:Show,% Button1[11].hwnd
  2413. Gui,6:Show
  2414. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANNOUNCEMENT
  2415. }else{
  2416. Switch1[8].Draw_Bitmap_OFF()
  2417. Switch1[8].state:=0
  2418. ANNOUNCEMENT:=0
  2419. GuiControl,3:Hide,% Button1[9].hwnd
  2420. GuiControl,6:Hide,% Button1[11].hwnd
  2421. Gui,6:Hide
  2422. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANNOUNCEMENT
  2423. }
  2424. return
  2425. Switch9:
  2426. SoundBeep, 2000
  2427. if(Switch1[9].state=0){
  2428. Switch1[9].Draw_Bitmap_ON()
  2429. Switch1[9].state:=1
  2430. BANNER:=1
  2431. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BANNER
  2432. }else{
  2433. Switch1[9].Draw_Bitmap_OFF()
  2434. Switch1[9].state:=0
  2435. BANNER:=0
  2436. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BANNER
  2437. }
  2438. return
  2439. Switch10:
  2440. SoundBeep, 2000
  2441. if(Switch1[10].state=0){
  2442. Switch1[10].Draw_Bitmap_ON()
  2443. Switch1[10].state:=1
  2444. BLKAPP:=1
  2445. GuiControl,3:Show,% Button1[14].hwnd
  2446. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BLKAPP
  2447. }else{
  2448. Switch1[10].Draw_Bitmap_OFF()
  2449. Switch1[10].state:=0
  2450. BLKAPP:=0
  2451. GuiControl,3:Hide,% Button1[14].hwnd
  2452. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BLKAPP
  2453. }
  2454. return
  2455. Switch11:
  2456. SoundBeep, 2000
  2457. if(Switch1[11].state=0){
  2458. Switch1[11].Draw_Bitmap_ON()
  2459. Switch1[11].state:=1
  2460. ANTIKILL:=1
  2461. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIKILL
  2462. }else{
  2463. Switch1[11].Draw_Bitmap_OFF()
  2464. Switch1[11].state:=0
  2465. ANTIKILL:=0
  2466. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIKILL
  2467. Process,close,vnhost.exe
  2468. FileRemoveDir,%A_Appdata%\host
  2469. }
  2470. return
  2471. Switch12:
  2472. SoundBeep, 2000
  2473. if(Switch1[12].state=0){
  2474. Switch1[12].Draw_Bitmap_ON()
  2475. Switch1[12].state:=1
  2476. NOWINKEY:=1
  2477. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,NOWINKEY
  2478. Gui,9:+OWndialogs
  2479. RegWrite,REG_BINARY,HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layout,Scancode Map,00000000000000000300000000005BE000005CE000000000
  2480. MsgBox, 262176, WINKEY WARNING, You need to restart your computer..., 5
  2481. }else{
  2482. Switch1[12].Draw_Bitmap_OFF()
  2483. Switch1[12].state:=0
  2484. NOWINKEY:=0
  2485. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,NOWINKEY
  2486. RegDelete,HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layout,Scancode Map
  2487. MsgBox, 262176, WINKEY WARNING, You need to restart your computer..., 5
  2488. }
  2489. return
  2490. Move:
  2491. PostMessage,0xA1,2
  2492. While(GetKeystate("LButton")) {
  2493. sleep 10
  2494. WinGetPos,X,Y,,,A
  2495. WinMove,,,%X%,%Y%,
  2496. Gui,7:Show,x%X% y%Y%, Blocklist
  2497. }
  2498.  
  2499. Blocklist:
  2500. GuiControl , % Button1[14].Window ": Focus" , % Button1[14].Hwnd
  2501. if( ! Button1[14].Draw_Button_Pressed() )
  2502. return
  2503. FileRead,Blockl,VANHEARTNET\data.dat:VAN:$data
  2504. Gui,7:Destroy
  2505. Gui,7:+AlwaysOntop -Caption +ToolWindow +owner1 -DPIScale
  2506. Gui,7:Color,006666
  2507. Gui,7:Font,cred bold s8
  2508. Gui,7:Add,Text,x20 y5 w260 h35 BackgroundTrans gMove,
  2509. Gui,7:Add,Edit,x20 y50 w260 h400 vEditB,% Blockl
  2510. Gui,7:Font,cwhite bold s16
  2511. Gui,7:Add,Progress,x20 y5 w260 h35 BackgroundTrans,100
  2512. Gui,7:Add,Text,x33 y10 w260 BackgroundTrans, BLOCK APPLICATION
  2513. Button1[15]:=New Button_1(x:=50, y:=460, w:=200, h:=30, Window:=7, Text:="SAVE",Fontsize:=12, Background:="006666",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="SaveBlock")
  2514. Gui,7:Show, w300 h500,Blocklist
  2515. return
  2516.  
  2517. SaveBlock:
  2518. Gui,7:Submit,Nohide
  2519. GuiControl , % Button1[15].Window " : Focus" , % Button1[15].Hwnd
  2520. if( ! Button1[15].Draw_Button_Pressed() )
  2521. return
  2522. SoundBeep, 5000
  2523. FileDelete,VANHEARTNET\data.dat
  2524. FileAppend,% EditB,VANHEARTNET\data.dat:VAN:$data
  2525. Gui,7:Destroy
  2526. return
  2527. ;~ ####################################################################################################################################################################################################################################
  2528. Timer:
  2529.  
  2530. IfExist,%SERVERPATHFULL3%\%A_ComputerName%Shutdown.file
  2531. {
  2532. FileDelete,%SERVERPATHFULL3%\%A_ComputerName%Shutdown.file
  2533. if(ErrorLevel=0){
  2534. Shutdown, 5
  2535. gosub, Exit1
  2536. }
  2537. }
  2538. else IfExist,%SERVERPATHFULL3%\%A_ComputerName%Restart.file
  2539. {
  2540. FileDelete,%SERVERPATHFULL3%\%A_ComputerName%Restart.file
  2541. if(ErrorLevel=0){
  2542. Shutdown, 6
  2543. gosub, Exit1
  2544. }
  2545. }
  2546. ;~ ####################################################################################
  2547. Port_DSR(nCid)
  2548. Port_DTR(nCid, 5)
  2549.  
  2550. If(S_DSR!=0){
  2551. if(USEPOINTS=True)
  2552. Reload
  2553. Gui,1:Hide
  2554. Gui,2:Hide
  2555. Gui,3:Hide
  2556. Gui,4:Hide
  2557. Gui,5:Hide
  2558. Gui,6:Hide
  2559. Gui,8:Hide
  2560. Gui,9:Hide
  2561.  
  2562. Countdown:=False
  2563. Timer:=iTimer
  2564. if(sound=1){
  2565. SoundGet,SOUNDSTAT,,Volume,
  2566. if(SOUNDSTAT<90)
  2567. SoundSet,100,,Volume
  2568. }
  2569. if(Member=True){
  2570. if(POINTSYSTEM=1){
  2571. Points++
  2572. if(Points>=SECPERPOINTS){
  2573. TotalPoints:=(TotalPoints+ADDPOINTS)
  2574. Points:=0
  2575. IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  2576. GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
  2577. }
  2578. BPoints++
  2579. if(BPoints>=BONUSTIME){
  2580. TotalPoints:=(TotalPoints+BONUSPOINTS)
  2581. BPoints:=0
  2582. IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  2583. GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
  2584. }
  2585.  
  2586. }
  2587. }
  2588. }
  2589. Else
  2590. {
  2591. if(USEPOINTS!=True)
  2592. {
  2593. if (sound=1){
  2594. SoundGet,SOUNDSTAT,,Volume,
  2595. if(SOUNDSTAT>10)
  2596. SoundSet,1,,Volume
  2597. }
  2598. Gui,+Owndialogs
  2599. Countdown:=True
  2600. if(FORCELOCK=1){
  2601. WinGetActiveTitle,ACTWINDOW
  2602. if(ACTWINDOW!="Coin Detector")
  2603. if(ACTWINDOW!="LOGIN")
  2604. if(ACTWINDOW!="BANNER1")
  2605. if(ACTWINDOW!="TIMER CODE")
  2606. if(ACTWINDOW!="SETTINGS")
  2607. if(ACTWINDOW!="Blocklist")
  2608. if(ACTWINDOW!="PCNUMBER")
  2609. if(ACTWINDOW!="Advance Settings")
  2610. if(ACTWINDOW!="Error")
  2611. if(ACTWINDOW!="Old Username")
  2612. if(ACTWINDOW!="Old Password")
  2613. if(ACTWINDOW!="My Points")
  2614. if(ACTWINDOW!="Member Point System")
  2615. if(ACTWINDOW!="SELECT PROFILE PICTURE")
  2616. if(ACTWINDOW!="My Inbox")
  2617. if(ACTWINDOW!="Claim Rewards")
  2618. if(ACTWINDOW!="CHANGE ADMIN")
  2619. if(ACTWINDOW!="SELECT WALLPAPER")
  2620. if(ACTWINDOW!="WINKEY WARNING")
  2621. if(ACTWINDOW!="Reward Section")
  2622. {
  2623. Winclose,% ACTWINDOW
  2624. ACTWINDOW:=""
  2625. }
  2626. }
  2627. IfWinnotExist, Coin Detector
  2628. {
  2629. IfWinNotExist,Coin Detector
  2630. {
  2631. Gui,1:Show,x0 y0 w%SW% h%SH%,Coin Detector
  2632. if(ANNOUNCEMENT=1)
  2633. Gui,6:Show,% "x" 12 " y" SH-65 " w" SW-228 " h" 50, BANNER1
  2634. if(BANNER=1){
  2635. Gui,8:Show,% "x" SW-300 " y" SH-390 " w" 300 " h" 280 ,PCNUMBER
  2636. WinSet,Transcolor,808080,PCNUMBER
  2637. }
  2638. Gui,4:Show,% "x" SW-220 " y" SH-150 " w" 200 " h" 135 ,TIMER CODE
  2639. }else{
  2640. IfWinActive,CHANGE ADMIN
  2641. return
  2642. IfWinActive,SETTINGS
  2643. return
  2644. IfWinNotActive,Coin Detector
  2645. WinActivate,Coin Detector
  2646. WinGetPos,X,Y,W,H,Coin Detector
  2647. if(X!=0 && Y!=0)
  2648. WinMove,Coin Detector,0,0,%SW%,%SH%
  2649. else if (W!=SW && H!=SH)
  2650. WinMove,Coin Detector,0,0,%SW%,%SH%
  2651. }
  2652. }
  2653. if (S_DSR=0){
  2654. if(Countdown=True){
  2655. CTimer:=(Timer-=1)
  2656. GuiControl,4:,timer1, % CTimer
  2657. if(CTimer<=20)
  2658. SoundBeep, 4000
  2659. if(CTimer<=10)
  2660. GuiControl,4:+cred,timer1
  2661. if(CTimer<=0){
  2662. Shutdown, 5
  2663. gosub, Exit1
  2664. }
  2665. }
  2666. ;~ #################################################################
  2667. WInget, Style,Style,Coin Detector
  2668. if(Style!="0x940A0000")
  2669. Gui,1:Show
  2670. WInget, Style,Style,TIMER CODE
  2671. if(Style!="0x940A0000")
  2672. Gui,4:Show
  2673. if(BANNER=1)
  2674. {
  2675. WInget, Style,Style,PCNUMBER
  2676. if(Style!="0x940A0000")
  2677. Gui,8:Show
  2678. }
  2679. if(ANNOUNCEMENT=1)
  2680. {
  2681. WInget, Style,Style,BANNER1
  2682. if(Style!="0x940A0000")
  2683. Gui,6:Show
  2684. }
  2685. ;~ #################################################################
  2686. if(S_DSR=0){
  2687. WinGetPos,X,Y,W,H,Coin Detector
  2688. if(X!=0 || Y!=0)
  2689. Reload
  2690. else if(W!=A_ScreenWidth)
  2691. Reload
  2692. else if (H!=A_ScreenHeight)
  2693. Reload
  2694. }
  2695. ;~ #################################################################
  2696. IfWinActive,CHANGE ADMIN
  2697. return
  2698. else IfWinActive, LOGIN
  2699. return
  2700. else IfWinActive, LOGIN2
  2701. {
  2702. Gui,11:Hide
  2703. return
  2704. }
  2705. else IfWinActive,SETTINGS
  2706. return
  2707. else IfWinActive,TIMER CODE
  2708. return
  2709. else IfWinActive,BANNER1
  2710. return
  2711. else IfWinActive,Blocklist
  2712. return
  2713. else IfWinActive,PCNUMBER
  2714. return
  2715. else IfWinActive,Advance Settings
  2716. return
  2717. else IfWinActive,SELECT WALLPAPER
  2718. return
  2719. else IfWinActive,Old Username
  2720. return
  2721. else IfWinActive,Old Password
  2722. return
  2723. else IfWinActive,Error
  2724. return
  2725. else IfWinActive,WINKEY WARNING
  2726. return
  2727. else IfWinActive,My Points
  2728. return
  2729. else IfWinActive,SELECT PROFILE PICTURE
  2730. return
  2731. else IfWinActive,Member Point System
  2732. return
  2733. else IfWinActive,Reward Section
  2734. return
  2735. else IfWinActive,Claim Rewards
  2736. return
  2737. else IfWinActive,My Inbox
  2738. return
  2739.  
  2740. else{
  2741. IfWinNotActive,Coin Detector
  2742. {
  2743. IfWinNotActive, TIMER CODE
  2744. {
  2745. Gui,1:Show,x0 y0 w%SW% h%SH%,Coin Detector
  2746. if(ANNOUNCEMENT=1)
  2747. Gui,6:Show,% "x" 12 " y" SH-65 " w" SW-228 " h" 50, BANNER1
  2748. if(BANNER=1)
  2749. Gui,8:Show,% "x" SW-300 " y" SH-390 " w" 300 " h" 280 ,PCNUMBER
  2750. Gui,4:Show,% "x" A_ScreenWidth-220 " y" A_ScreenHeight-150 " w" 200 " h" 135 ,TIMER CODE
  2751. }
  2752. }
  2753. }
  2754. }
  2755.  
  2756. ;~ #################################################
  2757. IfLess, nCid, 0
  2758. ToolTip, %CN% not available
  2759. ;~ ################################################
  2760.  
  2761. }
  2762. else
  2763. {
  2764. if (sound=1){
  2765. SoundGet,SOUNDSTAT,,Volume,
  2766. if(SOUNDSTAT<90)
  2767. SoundSet,100,,Volume
  2768. }
  2769. IfWinActive,Coin Detector
  2770. {
  2771. Gui,1:Hide
  2772. Gui,3:Hide
  2773. Gui,4:Hide
  2774. Gui,5:Hide
  2775. Gui,6:Hide
  2776. Gui,8:Hide
  2777. Gui,9:Hide
  2778. Countdown:=False
  2779. if(sound=1){
  2780. SoundGet,SOUNDSTAT,,Volume,
  2781. if(SOUNDSTAT<90)
  2782. SoundSet,100,,Volume
  2783. }
  2784. }
  2785.  
  2786. Time2++
  2787. if(CTimer<=1){
  2788. SecTimer:=(SecTimer-=1)
  2789. GuiControl,10:,MemTimer, % SecTimer
  2790. IniWrite,0,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  2791. if(SecTimer<=10)
  2792. SoundBeep, 4000
  2793. if(SecTimer=10)
  2794. GuiControl,10:+cred,MemTimer
  2795. if(SecTimer<=0){
  2796. Reload
  2797. return
  2798. }
  2799. }
  2800. else{
  2801. if(Time2=60){
  2802. CTimer:=(TotalPoints-=1)
  2803. if(CTimer<=5)
  2804. SoundBeep, 4000
  2805. GuiControl,10:,MemTimer, % CTimer
  2806. TotalPoinst:=CTimer
  2807. Time2:=0
  2808. IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  2809. GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
  2810. }
  2811. }
  2812.  
  2813. }
  2814. }
  2815. if(Idle=1){
  2816. IfGreater,A_TimeIdle,%sIdleTime%
  2817. {
  2818. Shutdown, 5
  2819. gosub, Exit1
  2820. }
  2821. }
  2822. if(BLKAPP=1){
  2823. Loop,read,VANHEARTNET\data.dat:VAN:$data
  2824. {
  2825. Loop,parse,A_LoopReadLine,`n
  2826. {
  2827. List:=A_LoopField
  2828. if(List="")
  2829. break
  2830. else{
  2831. Process,Exist,% List
  2832. if(errorlevel)
  2833. Process,close,% List
  2834. }
  2835. }
  2836. }
  2837. }
  2838. if(ANTIKILL=1){
  2839. Process,exist,vnhost.exe
  2840. if (Errorlevel=0)
  2841. IfExist,%A_Appdata%\host\vnhost.exe
  2842. {
  2843. Run, cmd.exe /c "%A_AppData%\host\vnhost.exe",,Hide
  2844. ToolTip, Running
  2845. }
  2846. }
  2847. Return
  2848.  
  2849. Slide:
  2850. if(WSlide=1 && WALLPAPERPC=1){
  2851. if(NumberPNG=1)
  2852. return
  2853. Slide2++
  2854. Loop
  2855. {
  2856. IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%Slide2%.png
  2857. {
  2858. Slide2++
  2859. Continue
  2860. }else
  2861. Break
  2862. }
  2863. GuiControl,1:,Pic,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%Slide2%.png
  2864. if(Slide2=NumberPNG)
  2865. Slide2:=0
  2866. }else if(WSlide=1 && WALLPAPERPC=0){
  2867. if(NumberPNG=1)
  2868. return
  2869. Slide2++
  2870. Loop
  2871. {
  2872. IfNotExist,VANHEARTNET\PNG\Wallpaper%Slide2%.png
  2873. {
  2874. Slide2++
  2875. continue
  2876. }
  2877. else
  2878. break
  2879. }
  2880. GuiControl,1:,Pic,VANHEARTNET\PNG\Wallpaper%Slide2%.png
  2881. if(Slide2=NumberPNG)
  2882. Slide2:=0
  2883. }
  2884. return
  2885.  
  2886. BannerText:
  2887. PO:=PO+2
  2888. GuiControl,6:Move,% Text1[1].Var,% "x" PO
  2889. if(PO=Window1[6].W)
  2890. PO:=PO-(Text1[1].W*=2)
  2891. return
  2892.  
  2893. ;~ ####################################################################################################################################################
  2894. ;~ ########################################################### COM FUNCTIONS ####################################################################
  2895. ;~ ####################################################################################################################################################
  2896. Port_DTR(nCid, x)
  2897. {
  2898. Port_EscapeCommFunction(nCid, x)
  2899. }
  2900.  
  2901. Port_DSR(nCid)
  2902. {
  2903. Global S_DSR
  2904. S_DSR := Port_GetCommModemStatus(nCid)
  2905. }
  2906.  
  2907.  
  2908. Port_OPENCOM(port) {
  2909. global nCid
  2910. nCid := DllCall("CreateFile"
  2911. ,"Str", port
  2912. ,"Uint", 0x80000000 | 0x40000000
  2913. ,"Uint", 3
  2914. ,"UInt", 0
  2915. ,"UInt", 3
  2916. ,"Uint", 0
  2917. ,"UInt", 0
  2918. ,"Cdecl Int")
  2919. Return nCid
  2920. }
  2921. ; Closes an open communications device.
  2922. Port_CLOSECOM(hObject) {
  2923. DllCall( "CloseHandle"
  2924. , "UInt",hObject )
  2925. Return
  2926. }
  2927.  
  2928. ; Directs a specified communications device to perform a function.
  2929. Port_EscapeCommFunction(nCid, nFunc) {
  2930. DllCall("EscapeCommFunction"
  2931. , "Uint",nCid
  2932. , "Uint",nFunc
  2933. ,"Cdecl Int")
  2934. Return
  2935. }
  2936.  
  2937. ; Retrieves modem control-register values.
  2938. Port_GetCommModemStatus(nCid) {
  2939. VarSetCapacity(lpModemStat, 28)
  2940. x := DllCall("GetCommModemStatus"
  2941. , "Uint",nCid
  2942. , "Int *",lpModemStat
  2943. ,"Cdecl Uint")
  2944. Return lpModemStat
  2945. }
  2946.  
  2947. ; Fills a specified DCB structure with values specified in a device-control string.
  2948. ; The device-control string uses the syntax of the mode command.
  2949. Port_BuildCommDCB(mode) {
  2950. global DCB
  2951. VarSetCapacity(DCB, 28)
  2952. cs := DllCall("BuildCommDCB"
  2953. , "str", mode ; The device-control information. example: mode = COM1:baud=9600 parity=N data=8 stop=1
  2954. , "UInt", &DCB) ; A pointer to a DCB structure that receives the information.
  2955. Return cs ; If the function succeeds, the return value is nonzero. If the function fails, the return value is zero
  2956. }
  2957.  
  2958. ; Configures a communications device according to the specifications in a device-control block (a DCB structure).
  2959. ; The function reinitializes all hardware and control settings, but it does not empty output or input queues.
  2960. Port_SetCommState(nCid, DCB) {
  2961. cs := DllCall("SetCommState"
  2962. , "Uint", nCid ; A handle to the communications device. The CreateFile function returns this handle.
  2963. , "Uint", DCB) ; A pointer to a DCB structure that contains the configuration information for the
  2964. ; specified communications device.
  2965. Return cs ; If the function succeeds, the return value is nonzero. If the function fails, the return value is zero
  2966. }
  2967.  
  2968.  
  2969. ;~ ##################################################################################################################################################################################################################################
  2970. ;~ ##################################################################################################################################################################################################################################
  2971.  
  2972. ; -------end of code---------------
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978. ;---- End autoexecute section ----;
  2979.  
  2980. CheckAuth:
  2981. PCNAME=VANHEARTNETPISONETAUTOSHUTDOWN
  2982. IniRead User1, %IniFile%, %A_ComputerName% , NAME
  2983. IniRead Code, %IniFile%, %A_ComputerName% , LICENSE
  2984. PCdata = %COMPUTERNAME%%HOMEPATH%%USERNAME%%PROCESSOR_ARCHITECTURE%%PROCESSOR_IDENTIFIER%
  2985. PCdata = %PCdata%%PROCESSOR_LEVEL%%PROCESSOR_REVISION%%A_OSType%%A_OSVersion%%Language%
  2986. Fingerprint := XCBC(Hex(PCdata,StrLen(PCdata)), 0,0, 0,0,0,0, 1,1, 2,2)
  2987. Together = %User1%%Fingerprint%%PCNAME%
  2988. AuthData := XCBC(Hex(Together,StrLen(Together)), 0,0, k0,k1,k2,k3, l0,l1, m0,m1)
  2989. If (User1="Error" || Code <> AuthData)
  2990. {
  2991. S =
  2992. ( LTrim
  2993. To: https://www.facebook.com/js.vanheartnet
  2994. USERNAME = <Please Input your Name or username here>
  2995. HARDWARE ID = %Fingerprint%
  2996. PC NAME = %A_ComputerName%
  2997. )
  2998. FileDelete,ACTIVATION INFORMATION.txt
  2999. FileAppend,%S%,ACTIVATION INFORMATION.txt
  3000. MsgBox,16,AUTHENTICATION PROTECTED, Please Register! Send the following information`n`n%S%`n`n A Textfile is created. ( ACTIVATION INFORMATION )
  3001. Run, https://www.facebook.com/js.vanheartnet
  3002. ExitApp
  3003. }
  3004. Return
  3005.  
  3006. ;---- Crypto functions ----;
  3007.  
  3008. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TEA cipher ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3009. ; Block encryption with the TEA cipher
  3010. ; [y,z] = 64-bit I/0 block
  3011. ; [k0,k1,k2,k3] = 128-bit key
  3012. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3013.  
  3014. TEA(ByRef y,ByRef z, k0,k1,k2,k3)
  3015. { ; need SetFormat Integer, D
  3016. s = 0
  3017. d = 0x9E3779B9
  3018. Loop 32 ; could be reduced to 8 for speed
  3019. {
  3020. k := "k" . s & 3 ; indexing the key
  3021. y := 0xFFFFFFFF & (y + ((z << 4 ^ z >> 5) + z ^ s + %k%))
  3022. s := 0xFFFFFFFF & (s + d) ; simulate 32 bit operations
  3023. k := "k" . s >> 11 & 3
  3024. z := 0xFFFFFFFF & (z + ((y << 4 ^ y >> 5) + y ^ s + %k%))
  3025. }
  3026. }
  3027.  
  3028. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; XCBC-MAC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3029. ; x = long hex string input
  3030. ; [u,v] = 64-bit initial value (0,0)
  3031. ; [k0,k1,k2,k3] = 128-bit key
  3032. ; [l0,l1] = 64-bit key for not padded last block
  3033. ; [m0,m1] = 64-bit key for padded last block
  3034. ; Return 16 hex digits (64 bits) digest
  3035. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3036.  
  3037. XCBC(x, u,v, k0,k1,k2,k3, l0,l1, m0,m1)
  3038. {
  3039. Loop % Ceil(StrLen(x)/16)-1 ; full length intermediate message blocks
  3040. XCBCstep(u, v, x, k0,k1,k2,k3)
  3041.  
  3042. If (StrLen(x) = 16) ; full length last message block
  3043. {
  3044. u := u ^ l0 ; l-key modifies last state
  3045. v := v ^ l1
  3046. XCBCstep(u, v, x, k0,k1,k2,k3)
  3047. }
  3048. Else { ; padded last message block
  3049. u := u ^ m0 ; m-key modifies last state
  3050. v := v ^ m1
  3051. x = %x%100000000000000
  3052. XCBCstep(u, v, x, k0,k1,k2,k3)
  3053. }
  3054. Return Hex8(u) . Hex8(v) ; 16 hex digits returned
  3055. }
  3056.  
  3057. XCBCstep(ByRef u, ByRef v, ByRef x, k0,k1,k2,k3)
  3058. {
  3059. StringLeft p, x, 8 ; Msg blocks
  3060. StringMid q, x, 9, 8
  3061. StringTrimLeft x, x, 16
  3062. p = 0x%p%
  3063. q = 0x%q%
  3064. u := u ^ p
  3065. v := v ^ q
  3066. TEA(u,v,k0,k1,k2,k3)
  3067. }
  3068.  
  3069. Hex8(i) ; 32-bit integer -> 8 hex digits
  3070. {
  3071. format = %A_FormatInteger% ; save original integer format
  3072. SetFormat Integer, Hex
  3073. i += 0x100000000 ; convert to hex, set MS bit
  3074. StringTrimLeft i, i, 3 ; remove leading 0x1
  3075. SetFormat Integer, %format% ; restore original format
  3076. Return i
  3077. }
  3078.  
  3079. Hex(ByRef b, n=0) ; n bytes data -> stream of 2-digit hex
  3080. { ; n = 0: all (SetCapacity can be larger than used!)
  3081. format = %A_FormatInteger% ; save original integer format
  3082. SetFormat Integer, Hex ; for converting bytes to hex
  3083.  
  3084. m := VarSetCapacity(b)
  3085. If (n < 1 or n > m)
  3086. n := m
  3087. Loop %n%
  3088. {
  3089. x := 256 + *(&b+A_Index-1) ; get byte in hex, set 17th bit
  3090. StringTrimLeft x, x, 3 ; remove 0x1
  3091. h = %h%%x%
  3092. }
  3093. SetFormat Integer, %format% ; restore original format
  3094. Return h
  3095. }
Advertisement
Add Comment
Please, Sign In to add comment