vanheartnet

Game Points 3.2

Feb 29th, 2020 (edited)
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.63 KB | None | 0 0
  1. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  2. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  3. ;@Ahk2Exe-Set FileDescription, Game Points
  4. ;@Ahk2Exe-Set FileVersion, 3.2.1.0
  5. ;@Ahk2Exe-SetInternalName Customer Game Points
  6. ;@Ahk2Exe-SetName GPoints
  7. ;@Ahk2Exe-SetOrigFileName Customer Game Points
  8. ;@Ahk2Exe-Set ProductName, Game Points
  9. ;@Ahk2Exe-Set ProductVersion, 3.2.1.0
  10. ;@Ahk2Exe-Set Description, GamePoints
  11. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  12. ;@Ahk2Exe-SetMainIcon icon.ico
  13. ;@Ahk2Exe-AddResource Icon.ico, 160 ; Replaces 'H on blue'
  14. ;@Ahk2Exe-AddResource Icon.ico, 206 ; Replaces 'S on green'
  15. ;@Ahk2Exe-AddResource Icon.ico, 207 ; Replaces 'H on red'
  16. ;@Ahk2Exe-AddResource Icon.ico, 208 ; Replaces 'S on red'
  17.  
  18. #SingleInstance, Force
  19. #NoEnv
  20. #Persistent
  21. SetBatchLines, 20ms
  22. SetWorkingDir, %A_ScriptDir%
  23. SetTitleMatchMode,1
  24. Menu,tray, NoStandard
  25. Menu,Tray,Add,Open Gpoints,Open_Gpoints
  26. Menu,tray,add,
  27. Menu,Tray,Add,Exit
  28. StringCaseSense, On
  29. ;~ -------------------------Performance----------------
  30. #MaxHotkeysPerInterval 99000000
  31. #HotkeyInterval 99000000
  32. #KeyHistory 0
  33. ListLines Off
  34. Process, Priority, , A
  35. SetKeyDelay, -1, -1
  36. SetMouseDelay, -1
  37. SetDefaultMouseSpeed, 0
  38. SetWinDelay, -1
  39. SetControlDelay, -1
  40. SendMode Input
  41.  
  42. global PATH1
  43. Banner := False
  44. PosButtInbox:=230
  45.  
  46. MemPass := False
  47.  
  48. IfNotExist,%A_Temp%\GPP
  49. FileCreateDir,%A_Temp%\GPP
  50. FileInstall,VANHEARTNET\GPBackground.png,%A_Temp%\GPP\GPBackground.png,1
  51. ;~ ------------------------------------------------------------------------------------------------------------
  52.  
  53. IfExist,VANHEARTNET\gpPath.dat:VAN:$DATA
  54. {
  55. FileRead,PATH1,VANHEARTNET\gpPath.dat:VAN:$DATA
  56. if (PATH1="ERROR" or PATH1="")
  57. {
  58.  
  59. MsgBox, 262176, ERROR, Please run the Admin control Panel first before running GPoints.
  60. ExitApp
  61.  
  62. }
  63. else IfNotExist,% PATH1
  64. {
  65. MsgBox, 262176, ERROR, Please run the Admin control Panel first before running GPoints.
  66. ExitApp
  67. }
  68. }
  69. else
  70. {
  71. MsgBox, 262176, ERROR, Please run the Admin control Panel first before running GPoints.
  72. ExitApp
  73. }
  74. ;~ ---------------------------------------------------------------------------------------------------------------
  75. IFNotExist,%PATH1%\DATA\PNG
  76. {
  77. FileCreateDir,%PATH1%\DATA\PNG
  78. WALLPAPER = %A_Temp%\GPP\GPBackground.png
  79.  
  80. }
  81. else
  82. {
  83. ifExist,%PATH1%\DATA\PNG\GPBackground.png
  84. {
  85. WALLPAPER = %PATH1%\DATA\PNG\GPBackground.png
  86. }
  87. else
  88. {
  89. WALLPAPER = %A_Temp%\GPP\GPBackground.png
  90. }
  91. }
  92. IfNotExist, data
  93. {
  94. FileCreateDir, data
  95. }
  96. IfNotExist,%PATH1%\\Rewards
  97. {
  98. FileCreateDir,%PATH1%\\Rewards
  99. FileSetAttrib,+H,%PATH1%\\Rewards
  100. }
  101. IfExist,%PATH1%\DATA\Startprogram
  102. {
  103. IfExist,%PATH1%\DATA\Startprogram\Run.bat
  104. {
  105. Run,%PATH1%\DATA\Startprogram\Run.bat
  106. }
  107. }
  108. else
  109. {
  110. FileCreateDir,%PATH1%\DATA\Startprogram
  111. }
  112. IniRead,TimeLess,%PATH1%\DATA\Config.ini:VAN:$DATA,TIMERCOUNTDOWN,TimeRequiredCount
  113. if (TimeLess="ERROR") or (TimeLess="")
  114. {
  115. Iniwrite,2,%PATH1%\DATA\Config.ini:VAN:$DATA,TIMERCOUNTDOWN,TimeRequiredCount
  116. TimeLess := 2
  117. }
  118. IfExist,%PATH1%\DATA\Ban.dat
  119. FileRead,BANNERTEXT,%PATH1%\DATA\Ban.dat:VAN:$DATA
  120. ;~ ---------------------------------------Reward Requirements---------------------
  121. Gosub, Read_Rewards
  122. ;~ ---------------------------------------------------------------
  123. ;~ -------------------MAIN------------
  124. Gui, 1:Color,222222,White
  125. Gui, 1:Add,Picture,x0 y95 w800 h300 vPic_Background,% WALLPAPER
  126. Gui, 1:Submit,Nohide
  127. Gui,1:+OwnDialogs
  128. Gui, 1:show, w800 h500, GPoints
  129. Gui, Font, s10, Verdana Bold
  130. Gui, 1:Add, text, x20 y400 cRed vInvalid, Invalid username or password.
  131. Gui, 1:Add, text, x20 y400 cRed vInvalidOnline, Account is Online.
  132. GuiControl,Hide,InvalidOnline
  133. GuiControl,+BackgroundTrans,Invalid
  134. GuiControl,Hide,Invalid
  135. Gui, 1:Add, button, x28 y460 w120 h30 Default +Border vButton_Gui2 gButton_Login,LOGIN
  136. Gui, 1:Add, button, x210 y460 w120 h30 +Border vButton_Reg gButton_Reg,REGISTER
  137. Gui, 1:Add, Edit, limit16 x20 y420 w140 h30 vUser_Name,
  138. Gui, 1:Add, Edit, limit16 x200 y420 w140 h30 vPassword1,
  139. GuiControl,1:+Password, Password1
  140. Gui, Font, s35 , Arial bold
  141. Gui, 1:Add, text, cff0000 x80 y35 w615 h50 vTitle,CUSTOMER GAME POINTS
  142. Gui, 1:Add, Button, x19 y419 w320 h70 +Border vButton_Mini gButton_Minimize, START
  143. GuiControl,Hide,Button_Mini
  144. Gui, Font, s24 , Arial bold
  145. Gui, 1:Add, Button, x580 y419 w200 h70 +Border vButton_LO gButton_LogOut,LOG OUT
  146. GuiControl,Hide,Button_LO
  147. Gui, Font, s16 , Arial bold
  148. Gui, 1:Add,Button, x360 y419 w200 h70 +Border vButton_Monitor gMonitor_Online, Member Online
  149. GuiControl,Hide,Button_Monitor
  150. Gui, Font, s10 , Time New Roman
  151. Gui, 1:Add,Button, x360 y419 w200 h32 +Border vButton_Status gMember_Status, MyRewards
  152. GuiControl,Hide,Button_Status
  153. Gui, 1:Add,Button, x360 y+5 w200 h32 +Border vBTN_ChangePass gButton_ChangePass, Change Password
  154. GuiControl,Hide,BTN_ChangePass
  155. Gui, 1:Add, Groupbox, x2 y385 w795 h112 vGroup_box,
  156. Gui, font, s8, Time New Roman
  157. Gosub, Announcement_title
  158. Gosub, Announce_ment
  159. ;~ ------------------------Online-------------------
  160.  
  161. ;~ ----------------------REGISTER-----------
  162. Gui,3:Color,222222
  163. Gui,3:+AlwaysOnTop
  164. Gui,3:Font, cffff00 s14, Times New Roman Bold
  165. Gui,3:Add, Text, x170 y22,Username
  166. Gui,3:Add, Text, x170 y65,Password
  167. Gui,3:Add, Text, x170 y105,Confirm Password
  168. Gui,3:Add, Edit, cBlack Limit16 x20 y20 w140 h30 vUserNameReg,
  169. Gui,3:Add, Edit, cBlack Limit16 x20 y60 w140 h30 vPasswordReg,
  170. Gui,3:Add, Edit, cBlack Limit16 x20 y100 w140 h30 vPasswordConfirm,
  171. Gui,3:Add, button, x20 y+10 w140 Default +Border vButton_Submit gButton_Sub,Submit
  172. GuiControl,3:+Password, PasswordConfirm
  173. GuiControl,3:+Password, PasswordReg
  174. ;~ ---------------------------------REWARDS--------------------
  175. Gui,4:Color, white, lime
  176. Gui,4:+AlwaysOnTop
  177. Gui,4:Font, Arial Black Bold
  178.  
  179. IfNotExist, %PATH1%\DATA\PNG\Reward1.png
  180. Gui,4:Add, Picture, x2 y1 w200 h100 +Border vReward1,VANHEARTNET\RewardSample.png
  181. else
  182. Gui,4:Add, Picture, x2 y1 w200 h100 +Border vReward1,%PATH1%\DATA\PNG\Reward1.png
  183. IfNotExist, %PATH1%\DATA\PNG\Reward2.png
  184. Gui,4:Add, Picture, x+10 w200 h100 +Border vReward2,VANHEARTNET\RewardSample.png
  185. else
  186. Gui,4:Add, Picture, x+10 w200 h100 +Border vReward2,%PATH1%\DATA\PNG\Reward2.png
  187. IfNotExist, %PATH1%\DATA\PNG\Reward3.png
  188. Gui,4:Add, Picture, x+10 w200 h100 +Border vReward3,VANHEARTNET\RewardSample.png
  189. else
  190. Gui,4:Add,Picture, x+10 w200 h100 +Border vReward3, %PATH1%\DATA\PNG\Reward3.png
  191. IfNotExist, %PATH1%\DATA\PNG\Reward4.png
  192. Gui,4:Add, Picture, x2 y160 w200 h100 +Border vReward4,VANHEARTNET\RewardSample.png
  193.  
  194. else
  195. Gui,4:Add,Picture, x2 y160 w200 h100 +Border vReward4, %PATH1%\DATA\PNG\Reward4.png
  196. IfNotExist, %PATH1%\DATA\PNG\Reward5.png
  197. Gui,4:Add, Picture, x+10 w200 h100 +Border vReward5,VANHEARTNET\RewardSample.png
  198. else
  199. Gui,4:Add,Picture, x+10 w200 h100 +Border vReward5, %PATH1%\DATA\PNG\Reward5.png
  200. IfNotExist, %PATH1%\DATA\PNG\Reward6.png
  201. Gui,4:Add, Picture, x+10 w200 h100 +Border vReward6,VANHEARTNET\RewardSample.png
  202. else
  203. Gui,4:Add,Picture, x+10 w200 h100 +Border vReward6, %PATH1%\DATA\PNG\Reward6.png
  204. IfNotExist, %PATH1%\DATA\PNG\Reward7.png
  205. Gui,4:Add, Picture, x2 y330 w200 h100 +Border vReward7,VANHEARTNET\RewardSample.png
  206. else
  207. Gui,4:Add,Picture, x2 y330 w200 h100 +Border vReward7, %PATH1%\DATA\PNG\Reward7.png
  208. IfNotExist, %PATH1%\DATA\PNG\Reward8.png
  209. Gui,4:Add, Picture, x+10 w200 h100 +Border vReward8,VANHEARTNET\RewardSample.png
  210. else
  211. Gui,4:Add,Picture, x+10 w200 h100 +Border vReward8, %PATH1%\DATA\PNG\Reward8.png
  212. IfNotExist, %PATH1%\DATA\PNG\Reward9.png
  213. Gui,4:Add, Picture, x+10 w200 h100 +Border vReward9,VANHEARTNET\RewardSample.png
  214. else
  215. Gui,4:Add,Picture, x+10 w200 h100 +Border vReward9, %PATH1%\DATA\PNG\Reward9.png
  216.  
  217. ;~ ----------------------------------Reward Text---------------------
  218.  
  219. Gui,4:Add,Text, x2 y110 w200 h15 +Center vTextreward1, %Rw1%
  220. Gui,4:Add,Text, x+10 y110 w200 h15 +Center vTExtReward2, %Rw2%
  221. Gui,4:Add,Text, x+10 y110 w200 h15 +Center vTExtReward3, %Rw3%
  222. Gui,4:Add,Text, x2 y270 w200 h15 +Center vTextreward4, %Rw4%
  223. Gui,4:Add,Text, x+10 y270 w200 h15 +Center vTextreward5, %Rw5%
  224. Gui,4:Add,Text, x+10 y270 w200 h15 +Center vTextreward6, %Rw6%
  225. Gui,4:Add,Text, x2 y440 w200 h15 +Center vTextreward7, %Rw7%
  226. Gui,4:Add,Text, x+10 y440 w200 h15 +Center vTextreward8, %Rw8%
  227. Gui,4:Add,Text, x+10 y440 w200 h15 +Center vTextreward9, %Rw9%
  228.  
  229. ;~ -------------------------------Reward Button Redeem------------------------
  230.  
  231. Gui,4:Add,Button, x75 y130 +Border w60 h20 vButtonRedeem1 gButton_Redeem1, Redeem
  232. Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedeem2 gButton_Redeem2, Redeem
  233. Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedeem3 gButton_Redeem3, Redeem
  234. Gui,4:Add,Button, x75 y290 +Border w60 h20 vButtonRedeem4 gButton_Redeem4, Redeem
  235. Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedee5 gButton_Redeem5, Redeem
  236. Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedee6 gButton_Redeem6, Redeem
  237. Gui,4:Add,Button, x75 +Border w60 h20 vButtonRedee7 gButton_Redeem7, Redeem
  238. Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedee8 gButton_Redeem8, Redeem
  239. Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedee9 gButton_Redeem9, Redeem
  240. ;~ ------------------------------------------BUTTON POSITIONS INBOX AND TOURNAMENT--------------
  241. IniRead,InboxTourPos,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,Tournament
  242. if(InboxTourPos="ERROR") or (InboxTourPos="")
  243. {
  244. IniWrite,0,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,Tournament
  245. MsgBox,, ERROR, ERROR Please Check the Path Location
  246. ExitApp
  247. }
  248. else If (InboxTourPos==1)
  249. {
  250. PosButtInbox:=80
  251. Gui,4:Add,Button, x350 y500 +Border w200 h40 vButtonRegisterTour gButton_RegTour, JOIN TOURNAMENT
  252. }
  253. else if (InboxTourPos==0)
  254. {
  255. PosButtInbox:=230
  256. }
  257. ;~ -----------------------------------------------------------------------------------------------
  258. Gui,4:Add,Button, x%PosButtInbox% y500 +Border w200 h40 vButtonRedeem gButton_Redeem, MyRewards Inbox
  259. ;~ ------------------------------------------------------------MY Inventory---------------
  260.  
  261.  
  262. YD := (A_ScreenHeight-480)
  263.  
  264. Gui,5:font,s16 Arial Black Bold
  265. Gui,5:+Delimiter*
  266. Gui,5:Color, 222222,White
  267. Gui,5:+AlwaysonTop
  268. Gui,5:font,s12 Arial
  269. Gui,5:Add,ListBox,x1 y1 w248 h370 vList1,
  270. Gui,5:font,s16 Calibri bold
  271. Gui,5:Add,Button,x2 y+2 w246 h40 gButton_Redeem, Refresh
  272.  
  273. ;~ ---------------------------------------CHANGE PASSWORD----------------------------------------------------
  274. Gui,6:Color,222222
  275. Gui,6:+AlwaysOnTop
  276. Gui,6:Font, cffff00 s14, Times New Roman Bold
  277. Gui,6:Add, Text, x170 y22,Old Password
  278. Gui,6:Add, Text, x170 y65,New Password
  279. Gui,6:Add, Text, x170 y105,Confirm Password
  280. Gui,6:Add, Edit, cBlack Limit16 x20 y20 w140 h30 vOldPassword,
  281. Gui,6:Add, Edit, cBlack Limit16 x20 y60 w140 h30 vNewPassword,
  282. Gui,6:Add, Edit, cBlack Limit16 x20 y100 w140 h30 vConfirmPassword,
  283. Gui,6:Add, button, x20 y+10 w140 Default +Border vButton_Submit2 gButton_Sub2,Submit
  284. GuiControl,6:+Password, OldPassword
  285. GuiControl,6:+Password, NewPassword
  286. GuiControl,6:+Password, ConfirmPassword
  287. ;~ -------------------------Display Total UpTime------------------
  288. IfExist,%PATH1%\DATA\PNG\BANNER.png
  289. {
  290. Gui,1:Add, Picture, x0 y0 w400 h40 BackgroundTrans vVAN,%PATH1%\DATA\PNG\BANNER.png
  291. Banner := True
  292. }
  293. else IfExist,%PATH1%\DATA\Ban.dat:VAN:$DATA
  294. {
  295. Gui,1:Add,Text,x750 y395 cRed vVAN2,% BANNERTEXT
  296. Banner := True
  297. }
  298. else
  299. {
  300. Banner:=False
  301. }
  302. While (MemPass=False && Banner=True)
  303. {
  304.  
  305. Sleep,10
  306. XV++
  307. BTX--
  308.  
  309. GuiControl,1:move,VAN,x%XV%
  310. GuiControl,1:move,VAN2,x%BTX%
  311. if(XV=800)
  312. {
  313. XV := -380
  314. }
  315. if (BTX=-800)
  316. BTX := 780
  317. if (MemPass = True)
  318. {
  319. GuiControl,1:Hide,VAN
  320. GuiControl,1:Hide,VAN2
  321. break
  322. }
  323. }
  324. return
  325. ;~ -------------------------------------------------Label-----------------
  326. Button_Sub:
  327. Gui,3:Submit,Nohide
  328. StringLen,UserLenght, UserNameReg
  329. StringLen,PasswordLenght, PasswordReg
  330. If (UserNameReg=="")
  331. {
  332. Gui,+OwnDialogs
  333. MsgBox, 262160,Error, Please Input User Name
  334. }
  335. Else if(PasswordReg=="")
  336. {
  337. Gui,+OwnDialogs
  338. MsgBox, 262160,Error, Please Input Password
  339. }
  340. Else if(PasswordConfirm=="")
  341. {
  342. Gui,+OwnDialogs
  343. MsgBox, 262160,Error,Please Confirm your Password
  344. }
  345. Else if(PasswordReg not ==PasswordConfirm)
  346. {
  347. Gui,+OwnDialogs
  348. MsgBox, 262160,Error,Password not match!
  349. GuiControl,,UserNameReg
  350. GuiControl,,PasswordReg
  351. GuiControl,,PasswordConfirm
  352. }
  353. ;~ ---------------------------------------------------------ILLEGAL CHARACTER-----------------------------------------
  354. else if UserNameReg contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`"
  355. {
  356. MsgBox, 262160, Error, Illegal characters
  357. }
  358. else if PasswordReg contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`"
  359. {
  360. MsgBox, 262160, Error, Illegal characters
  361. }
  362. else if PasswordConfirm contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`"
  363. {
  364. MsgBox, 262160, Error, Illegal characters
  365. }
  366. ;~ ------------------------------------------------------MINIMUM CHARACTERS----------------------------------------------------------------
  367. else if (UserLenght<= 2)
  368. {
  369. MsgBox, 262160, Warning, Username should consist atleast 3 characters.
  370. }
  371. else if (PasswordLenght<= 2)
  372. {
  373. MsgBox, 262160, Warning, Password should consist atleast 3 characters.
  374. }
  375. ;~ -------------------------------------------------------------------------------------------------------------------------------
  376. else IfExist,%PATH1%\\GPoints\%UserNameReg%
  377. {
  378. Gui,+OwnDialogs
  379. MsgBox, 262160,Error,The Username is Already Taken Please Choose Different Username!
  380. GuiControl,,UserNameReg
  381. GuiControl,,PasswordReg
  382. GuiControl,,PasswordConfirm
  383. }
  384.  
  385. else
  386. {
  387. IfNotExist,%PATH1%\\GPoints\%UserNameReg%
  388. {
  389. FileCreateDir,%PATH1%\\GPoints\%UserNameReg%
  390. IniWrite,%A_MM%/%A_DD%/%A_YYYY%,%PATH1%\\GPoints\%UserNameReg%\info.ini:VAN:$DATA,Registered,Date
  391. IniWrite,%PasswordReg%,%PATH1%\\GPoints\%UserNameReg%\info.ini:VAN:$DATA,Account,Password
  392. Iniwrite,0,%PATH1%\\GPoints\%UserNameReg%\info.ini:VAN:$DATA,TOTAL,Points
  393. IniWrite,%A_YYYY%%A_MM%%A_DD%,%PATH1%\GPoints\%UserNameReg%\info.ini:VAN:$DATA,Last Date Registered, Count
  394. Iniwrite,0,%PATH1%\GPoints\%UserNameReg%\info.ini:VAN:$DATA,Accumulated Points, Total ;>>>>>>>>>>>>>>>>dec01
  395. FileSetAttrib,+H,%PATH1%\\GPoints\%UserNameReg%\info.ini:VAN:$DATA,1
  396. FileSetAttrib,+H,%PATH1%\\GPoints\%UserNameReg%
  397. Gui,+OwnDialogs
  398. MsgBox, 262208,Complete, Success! `nThank You, Please Enjoy.
  399. GuiControl,1:,User_Name
  400. GuiControl,1:,Password1
  401. GuiControl,3:,UserNameReg
  402. GuiControl,3:,PasswordReg
  403. GuiControl,3:,PasswordConfirm
  404. GuiControl,1:hide,Invalid
  405. GuiControl,1:hide,InvalidOnline
  406. Gui,3:Hide
  407. Gui,1:show
  408. }
  409. }
  410.  
  411. return
  412.  
  413. Button_Sub2:
  414. Gui,6:Submit,Nohide
  415. StringLen,NewPasswordLenght, NewPassword
  416. If (OldPassword=="")
  417. {
  418. Gui,+OwnDialogs
  419. MsgBox, 262160,Error, Please Input your current Password
  420. }
  421. Else If (NewPassword=="")
  422. {
  423. Gui,+OwnDialogs
  424. MsgBox, 262160,Error, Please Input your New Password
  425. }
  426. Else if (ConfirmPassword=="")
  427. {
  428. Gui,+OwnDialogs
  429. MsgBox, 262160,Error, Please Input Confirm your New Password
  430. }
  431. Else If (OldPassword not ==MyPassword)
  432. {
  433. Gui,+OwnDialogs
  434. Msgbox,262160,Error, Please Enter the correct Password
  435. }
  436. Else If (NewPassword not == ConfirmPassword)
  437. {
  438. Gui,+OwnDialogs
  439. MsgBox,262160,Error, New Password does not Match!
  440. }
  441. Else If (NewPassword==MyPassword)
  442. {
  443. Gui,+OwnDialogs
  444. MsgBox,262160,Error, Please choose different Password
  445. }
  446. ;~ ------------------------------------------------ILLEGAL CHARACTERS---------------------------------------------
  447. else if OldPassword contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`"
  448. {
  449. MsgBox, 262160, Error, Illegal characters
  450. }
  451. else if NewPassword contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`"
  452. {
  453. MsgBox, 262160, Error, Illegal characters
  454. }
  455. ;~ ----------------------------------------------MINIMUM CHARACTERS--------------------------------------------------------------
  456. else if (NewPasswordLenght<= 2)
  457. {
  458. MsgBox, 262160, Warning, Password should consist atleast 3 characters.
  459. }
  460. ;~ -----------------------------------------------------------------------------------------------------------------
  461. else
  462. {
  463. IniWrite,%NewPassword%,%PATH1%\\GPoints\%User_Name%\info.ini:VAN:$DATA,Account,Password
  464. Gui,+OwnDialogs
  465. MsgBox,262208,Success,Your Password has been Changed!
  466. GuiControl,,OldPassword
  467. GuiControl,,NewPassword
  468. GuiControl,,ConfirmPassword
  469. Gui,6:Hide
  470. Gui,1:Show
  471. }
  472. return
  473.  
  474. Button_ChangePass:
  475. Gui,1:Hide
  476. Gui,6:Show,w350 h200, Change Password
  477. GuiControl,,OldPassword
  478. GuiControl,,NewPassword
  479. GuiControl,,ConfirmPassword
  480. Iniread,MyPassword,%PATH1%\\GPoints\%User_Name%\info.ini:VAN:$DATA,Account,Password
  481. return
  482.  
  483.  
  484. Button_Login:
  485. Gui,1:Submit,Nohide
  486. Admin := False
  487. If (User_Name=="admin")
  488. {
  489. if (Password1=="adminVANHEARTNET")
  490. {
  491. Admin := true
  492. GuiControl,Show,Button_Mini
  493. GuiControl,Show,Button_LO
  494. GuiControl,Show,Button_Monitor
  495. Guicontrol,hide,Button_Gui2
  496. Guicontrol,hide,Button_Reg
  497. Guicontrol,hide,User_Name
  498. Guicontrol,hide,Password1
  499. GuiControl,Hide,Invalid
  500. GuiControl,Hide,About
  501. GuiControl,Hide,About1
  502. Gui, Font, s16 , Times new Roman bold
  503. Guicontrol,hide,Pic_Background
  504. Gui, 1:Add, Text, x5 y1 cffff00 +BackgroundTrans,Administrator : Welcome %User_Name%
  505. Guicontrol,Show,Pic_Background
  506. }
  507. else
  508. {
  509. GuiControl,1:hide,InvalidOnline
  510. GuiControl,1:Hide,VAN2
  511. GuiControl,Show,Invalid
  512. }
  513. ;~ -------------------------------Admin Controls-------------------------------------
  514.  
  515. }
  516. ;~ ---------------------------------------NO Account----------------------
  517. Else IfNotExist,%PATH1%\GPoints\%User_Name%
  518. {
  519. GuiControl,1:hide,InvalidOnline
  520. GuiControl,1:Hide,VAN2
  521. GuiControl,Show,Invalid
  522. GuiControl,,User_Name
  523. GuiControl,,Password1
  524. }
  525. Else if (User_Name=="")
  526. {
  527. GuiControl,1:hide,InvalidOnline
  528. GuiControl,1:Hide,VAN2
  529. GuiControl,Show,Invalid
  530. GuiControl,,User_Name
  531. GuiControl,,Password1
  532. }
  533.  
  534. ;~ ----------------------------------------------------------------------------
  535. else
  536. {
  537. IfNotExist,%PATH1%\\GPoints
  538. {
  539. FileCreateDir,%PATH1%\\GPoints
  540. FileSetAttrib,+H,%PATH1%
  541. }
  542.  
  543. Iniread,Password_Ini,%PATH1%\\GPoints\%User_Name%\info.ini:VAN:$DATA,Account,Password
  544. Loop,%PATH1%\\GPoints\*.*,2
  545. {
  546. User = "%User_Name%"
  547. Loops = "%A_LoopFileName%"
  548. PC = "%A_ComputerName%"
  549. MemPass := false
  550. IfExist,%PATH1%\Online\%User_Name%
  551. {
  552.  
  553. GuiControl,1:hide,Invalid
  554. GuiControl,1:Hide,VAN2
  555. GuiControl,Show,InvalidOnline
  556. GuiControl,,User_Name
  557. GuiControl,,Password1
  558. gosub, Delete_Online
  559. }
  560. Else IF (User==Loops)
  561. {
  562. if(Password1==Password_Ini)
  563. {
  564. MemPass := True
  565. GuiControl,Show,Button_Mini
  566. GuiControl,Show,Button_LO
  567. GuiControl,Hide,Invalid
  568. GuiControl,Hide,InvalidOnline
  569. Guicontrol,hide,Button_Gui2
  570. Guicontrol,hide,Button_Reg
  571. Guicontrol,hide,User_Name
  572. Guicontrol,hide,Password1
  573. GuiControl,Show,Button_Status
  574. GuiControl,Show,BTN_ChangePass
  575. Gui, Font, s12 , Century Gothic Bold
  576. GuiControl,Hide,About
  577. GuiControl,Hide,About1
  578. Gosub,LogIn_Add
  579. Gui, 1:Add, Text, x5 y1 cLime +BackgroundTrans, Welcome Member : %User_Name%
  580. Iniread,MyPoints,%PATH1%\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
  581. Gui, 1:Add, Text, x640 y1 w150 h23 caqua +BackgroundTrans vTotalP, GPoints : %MyPoints%
  582. Guicontrol,Show,Pic_Background
  583. IniWrite,%A_ComputerName%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,COMPUTER,PC
  584. IniWrite,%A_MM%/%A_DD%/%A_Year%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Date
  585. IniWrite,%A_Hour%:%A_Min%:%A_Sec%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Time
  586. IniWrite,%A_Hour%:%A_Min%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Mins
  587. IniWrite,%A_YYYY%%A_MM%%A_DD%%A_Hour%%A_Min%%A_Sec%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Minsec
  588. FileCreateDir,%PATH1%\Online\%User_Name%
  589. ;~ ---------------------------------LOG CHECK--------------------------------
  590. IniWrite,%A_Hour%%A_Min%%A_Sec%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-Check,Date
  591. IniWrite,%A_YYYY%%A_MM%%A_DD%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Time,Count
  592. Gosub, ACTReg ;>>>>>>>>>>>dec01
  593. ;~ ----------------------------------------------MyReward-------------------------------------------------
  594. if (MyPoints="ERROR" or MyPoints="")
  595. {
  596. IniWrite,0,%PATH1%\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
  597. MyPoints :=0
  598. }
  599. ;~ -----NOTE<<<<<<<<<<<<<<<<<<<<<<<<<
  600. ;ADD DELIMITER ONLY AT THE BEGINING OF THE TEXTFILE TO READ TO DISPLAY ALL THE TEXT
  601. ;ADD DELIMITER AT THE BEGINNING OF EVERY WORD INSIDE OF THE TEXTFILE TO DISPLAY ONLY THE LAST WORD IN TEXTFILE
  602. IfNotExist,%PATH1%\GPoints\%User_Name%\MyRewards.file
  603. {
  604. FileAppend,*,%PATH1%\GPoints\%User_Name%\MyRewards.file:VAN:$DATA
  605. }
  606. ;~ ------------------------------------------------------------DISABLE TOURNAMENT BUTTON----------------------------------
  607. if (InboxTourPos==1)
  608. {
  609. FileRead,ParTCD,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
  610. IfInString,ParTCD,|%User_Name%|
  611. {
  612. GuiControl,4:Disable, ButtonRegisterTour
  613. GuiControl,4:,ButtonRegisterTour, PLAYER ACCEPTED
  614. }
  615. }
  616.  
  617. ;~ ---------------------------------------------------BOOST POINTS-----------------------------------------
  618. Iniread,Boost1,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime1
  619. If(Boost1="ERROR") or (Boost1="")
  620. {
  621. IniWrite,1,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime1
  622. }
  623. Iniread,Boost2,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime2
  624. If(Boost2="ERROR") or (Boost2="")
  625. {
  626. IniWrite,1,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime2
  627. }
  628. Iniread,Boost3,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime3
  629. If(Boost3="ERROR") or (Boost3="")
  630. {
  631. IniWrite,1,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime3
  632. }
  633. ;~ ------------------------------------------------------BOOST PROCESS-------------------------------------
  634. Iniread,Process1, %PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P1
  635. If(Process1="ERROR") or (Process1="")
  636. {
  637. IniWrite,Process1,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P1
  638. }
  639. IniRead,Process2,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P2
  640. If(Process2="ERROR") or (Process2="")
  641. {
  642. IniWrite,Process2,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P2
  643. }
  644. IniRead,Process3,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P3
  645. If(Process3="ERROR") or (Process3="")
  646. {
  647. IniWrite,Process3,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P3
  648. }
  649. Iniread,TimerCheck,%PATH1%\DATA\Config.ini:VAN:$DATA,TIMERCOUNTDOWN,SECONDS
  650. if (TimerCheck="ERROR") or (TimerCheck="")
  651. {
  652. IniWrite,900000,%PATH1%\DATA\Config.ini:VAN:$DATA,TIMERCOUNTDOWN,SECONDS
  653. TimerCheck := 900000
  654. }
  655. ;~ --------------------------------------------------------------------------------------------------------
  656. Iniread,IDLEMODE,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,IDLEMODE
  657. if (IDLEMODE="ERROR" or IDLEMODE="")
  658. {
  659. IniWrite,0,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,IDLEMODE
  660. IDLEMODE := 0
  661. }
  662. Else if (IDLEMODE==1)
  663. {
  664. Iniread,IDLETIME,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,IDLE
  665. if (IDLETIME="ERROR" or IDLETIME="")
  666. {
  667. IniWrite,1800000,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,IDLE
  668. IDLETIME := 1800000
  669. }
  670. }
  671. Else
  672. {
  673. IDLEMODE :=0
  674. }
  675.  
  676. ;~ ------------------------------------------------------------------------------------------------------------
  677. SetTimer,UsedTime,%TimerCheck%
  678. TM := 0
  679. UsedTime:
  680. ;~ ----------------------------------------------------------FORCE LOGOUT---------------------------------------
  681. IniRead,LOGPC,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,COMPUTER,PC
  682. If (LOGPC not == A_ComputerName)
  683. {
  684. ExitApp
  685. }
  686. Gosub, ShieldPointsCheckProcess
  687. if (TTodayProcess >= TimeLess)
  688. {
  689. ;~ -------------------------------------------------------------------------------------------------------------
  690. TM++
  691. Process,exist,%Process1%
  692. If (errorlevel)
  693. {
  694. TM := (TM+Boost1)
  695. }
  696. Else
  697. {
  698. Process,exist,%Process2%
  699. if (errorlevel)
  700. {
  701. TM := (TM+Boost2)
  702. }
  703. else
  704. {
  705. Process,exist,%Process3%
  706. if (errorlevel)
  707. {
  708. TM := (TM+Boost3)
  709. }
  710. }
  711. }
  712. }
  713.  
  714. Iniwrite, %TM%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
  715. TempoTOTALPoints := (TM+MyPoints)
  716. GuiControl,,TotalP,GPoints : %TempoTOTALPoints%
  717. if (EVENT=1)
  718. {
  719. TempoEVPoints := (TM+TOTPOINTREG)
  720. GuiControl,1:,EVPoints,EventPoints : %TempoEVPoints%
  721. }
  722.  
  723. ;~ --------------------------DETECT IDLE-----------------------------------------------------------
  724.  
  725. if (IDLEMODE==1)
  726. {
  727. IfGreater,A_TimeIdle,%IDLETIME%
  728. {
  729. Gosub, Button_LogOut
  730. Gosub, Delete_Online
  731.  
  732. }
  733.  
  734. }
  735.  
  736. return
  737. }
  738.  
  739. else
  740. {
  741. Gosub, Invalid
  742. }
  743. }
  744. else
  745. {
  746. Gosub,Invalid
  747. }
  748. }
  749. }
  750.  
  751. return
  752. ;~ ------------------------------------------------------------------------------------------------------------------------
  753.  
  754. LogIn_Add:
  755. IniRead,TotPoint,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
  756. IfExist,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA
  757. {
  758. IniRead,LastPoint,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
  759. }
  760. else
  761. {
  762. MyPoints := 0
  763. }
  764. If (LastPoint > 1)
  765. {
  766. PointAdd := (LastPoint+TotPoint)
  767. IniWrite, %PointAdd%,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
  768. }
  769. return
  770.  
  771. Button_Reg:
  772. Gui,1:Hide
  773. Gui,2:Hide
  774. Gui,3:Submit,Nohide
  775. Gui,3:Show,w350 h200, Register
  776. return
  777.  
  778. Button_Redeem:
  779. Gui,5:Submit,Nohide
  780. Gui,5:Show, x10 y%YD% w250 h410, Inbox
  781. Loop,read,%PATH1%\GPoints\%User_Name%\MyRewards.file:VAN:$DATA
  782. {
  783. ListReward2 := A_LoopReadLine
  784. {
  785. GuiControl,5:,List1,%ListReward2%
  786. }
  787. }
  788. return
  789.  
  790. Button_RegTour:
  791. Gui,+OwnDialogs
  792. MsgBox, 262180, Message, Do you want to use your G-points?
  793. IfMsgBox,Yes
  794. {
  795. IfNotExist,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
  796. {
  797. FileAppend,,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
  798. Gosub, Participants
  799. }
  800. else
  801. {
  802. Gosub, Participants
  803. }
  804. }
  805. else
  806. {
  807. MsgBox, 262192, Warning, No G-Points deducted!
  808. }
  809. return
  810.  
  811.  
  812. Button_Minimize:
  813. TrayTip, GPoints, Started!,,
  814. Gui,1:hide
  815. Gui,5:hide
  816. return
  817.  
  818. Button_LogOut:
  819. If (MemPass = True)
  820. {
  821. Gosub, Logout_Account
  822. Gosub, Delete_Online
  823. Gosub, ShieldPointsCheck
  824. MemPass := False
  825. Reload
  826.  
  827. }
  828. else if(Admin = true)
  829. {
  830. Reload
  831. }
  832. return
  833.  
  834. ;~ -----------------------REwards--------------------
  835. Member_Status:
  836. Gui,4:Submit,Nohide
  837. If (MemPass = True)
  838. {
  839.  
  840. Gui,1:Hide
  841. Gui,4:Show, w630 h550, Rewards
  842. ;~ ------------------------------------------------------
  843.  
  844. }
  845. Return
  846.  
  847. Not_Enough_Points:
  848. Gui,+OwnDialogs
  849. MsgBox, 262160, Message, You don't have enough GPoints!
  850. return
  851.  
  852. Button_Redeem1:
  853. Rewardnumber := "R1"
  854. RName := "R1.dat"
  855. Gosub, Read_Rewards
  856. Rewards = %RReward1%
  857. Gosub, Calculate_Rewards
  858. return
  859. Button_Redeem2:
  860. Rewardnumber := "R2"
  861. RName := "R2.dat"
  862. Gosub, Read_Rewards
  863. Rewards = %RReward2%
  864. Gosub, Calculate_Rewards
  865. return
  866. Button_Redeem3:
  867. Rewardnumber := "R3"
  868. RName := "R3.dat"
  869. Gosub, Read_Rewards
  870. Rewards = %RReward3%
  871. Gosub, Calculate_Rewards
  872. return
  873. Button_Redeem4:
  874. Rewardnumber := "R4"
  875. RName := "R4.dat"
  876. Gosub, Read_Rewards
  877. Rewards = %RReward4%
  878. Gosub, Calculate_Rewards
  879. return
  880. Button_Redeem5:
  881. Rewardnumber := "R5"
  882. RName := "R5.dat"
  883. Gosub, Read_Rewards
  884. Rewards = %RReward5%
  885. Gosub, Calculate_Rewards
  886. return
  887. Button_Redeem6:
  888. Rewardnumber := "R6"
  889. RName := "R6.dat"
  890. Gosub, Read_Rewards
  891. Rewards = %RReward6%
  892. Gosub, Calculate_Rewards
  893. return
  894. Button_Redeem7:
  895. Rewardnumber := "R7"
  896. RName := "R7.dat"
  897. Gosub, Read_Rewards
  898. Rewards = %RReward7%
  899. Gosub, Calculate_Rewards
  900. return
  901. Button_Redeem8:
  902. Rewardnumber := "R8"
  903. RName := "R8.dat"
  904. Gosub, Read_Rewards
  905. Rewards = %RReward8%
  906. Gosub, Calculate_Rewards
  907. return
  908. Button_Redeem9:
  909. Rewardnumber := "R9"
  910. RName := "R9.dat"
  911. Gosub, Read_Rewards
  912. Rewards = %RReward9%
  913. Gosub, Calculate_Rewards
  914. return
  915. Monitor_Online:
  916. Gui,1:Hide
  917. IfNotExist,GPoint Admin Panel12.ahk
  918. MsgBox,File is missing!
  919. else
  920. Run, GPoint Admin Panel12.ahk
  921. ExitApp
  922. return
  923.  
  924. ;~ ---------------------------Emergency Exit--------
  925.  
  926. Open_Gpoints:
  927. Gui,1:Show
  928. return
  929.  
  930. Delete_Online:
  931. FileRemoveDir,%PATH1%\Online\%User_Name%,1
  932. return
  933.  
  934. Invalid:
  935. GuiControl,1:Hide,VAN2
  936. GuiControl,1:hide,InvalidOnline
  937. GuiControl,Show,Invalid
  938. GuiControl,,User_Name
  939. GuiControl,,Password1
  940. return
  941.  
  942. Logout_Account:
  943. IF (MemPass = True)
  944. {
  945. IniWrite,%A_ComputerName%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,COMPUTER,PC
  946. IniWrite,%A_MM%/%A_DD%/%A_Year%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Date
  947. IniWrite,%A_Hour%:%A_Min%:%A_Sec%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Time
  948. IniWrite,%A_Hour%:%A_Min%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Mins
  949. IniWrite,%A_YYYY%%A_MM%%A_DD%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Time,Count
  950. IniWrite,%A_YYYY%%A_MM%%A_DD%%A_Hour%%A_Min%%A_Sec%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Minsec
  951. Gosub, ShieldPoints
  952. }
  953. return
  954.  
  955.  
  956. Announce_ment:
  957. IFExist, %PATH1%\DATA\Announcement.dat:VAN:$DATA
  958. {
  959. Fileread, Announcement, %PATH1%\DATA\Announcement.dat:VAN:$DATA
  960. if (Announcement="ERROR" or Announcement="")
  961. {
  962. Announcement := "`n `n `n -Created by : VANHEARTNET"
  963. }
  964. }
  965. else
  966. {
  967. FileAppend,`n`n`n-Created by: VANHEARTNET,%PATH1%\DATA\Announcement.dat:VAN:$DATA
  968. Announcement := "`n `n `n -Created by : VANHEARTNET"
  969. }
  970. Gui, 1:Add, text,cwhite x400 y430 w385 vAbout, %Announcement%
  971. return
  972.  
  973. Announcement_title:
  974. IFExist, %PATH1%\DATA\Announcement_Title.dat:VAN:$DATA
  975. {
  976. Fileread,AnnouncementTitle,%PATH1%\DATA\Announcement_Title.dat:VAN:$DATA
  977. if (AnnouncementTitle="ERROR" or AnnouncementTitle="")
  978. {
  979. FileAppend,GPOINTS,%PATH1%\DATA\Announcement_Title.dat:VAN:$DATA
  980. AnnouncementTitle := "GPOINTS"
  981. }
  982. }
  983. else
  984. {
  985. FileAppend,GPOINTS,%PATH1%\DATA\Announcement_Title.dat:VAN:$DATA
  986. AnnouncementTitle := "GPOINTS"
  987. }
  988. Gui, 1:Add, text,cLime x400 y414 w385 vAbout1,%AnnouncementTitle%
  989. return
  990.  
  991.  
  992. Read_Rewards:
  993. Iniread, User_GPoints,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
  994. Iniread,RReward1,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ1
  995. Iniread,RReward2,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ2
  996. Iniread,RReward3,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ3
  997. Iniread,RReward4,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ4
  998. Iniread,RReward5,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ5
  999. Iniread,RReward6,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ6
  1000. Iniread,RReward7,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ7
  1001. Iniread,RReward8,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ8
  1002. Iniread,RReward9,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ9
  1003.  
  1004. IniRead,Rw1,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R1
  1005. IniRead,Rw2,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R2
  1006. IniRead,Rw3,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R3
  1007. IniRead,Rw4,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R4
  1008. IniRead,Rw5,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R5
  1009. IniRead,Rw6,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R6
  1010. IniRead,Rw7,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R7
  1011. IniRead,Rw8,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R8
  1012. IniRead,Rw9,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R9
  1013.  
  1014. return
  1015.  
  1016. CopyRewards:
  1017. FileDelete,%PATH1%\Rewards\Temp\%RName%
  1018. FileAppend,%User_Name%|%1st%|%A_MM%-%A_DD%-%A_YYYY%|%A_Hour%:%A_Min%:%A_Sec%|%Rewardnumber%`n,%PATH1%\Rewards\Rdata\Redeemed.file:VAN:$DATA
  1019. FileAppend,%1st%`n,%PATH1%\GPoints\%User_Name%\MyRewards.file:VAN:$DATA
  1020. return
  1021.  
  1022. Calculate_Rewards:
  1023. IfNotExist, %PATH1%\Rewards\%RName%
  1024. {
  1025. IfNotExist, %PATH1%\Rewards\Temp\%RName%
  1026. {
  1027. MsgBox, 262160, ERROR, There is NO available Rewards`n`nPoints Refunded!
  1028. loop 10
  1029. FileAppend,EMPTY`n,%PATH1%\Rewards\%RName%:VAN:$DATA
  1030. return
  1031. }
  1032. else
  1033. {
  1034. FileMove,%PATH1%\Rewards\Temp\%RName%,%PATH1%\Rewards,1
  1035. return
  1036. }
  1037.  
  1038. }
  1039. If (User_GPoints>=Rewards)
  1040.  
  1041. {
  1042. Gui,+OwnDialogs
  1043. MsgBox, 262180,Message,Are you sure You want to use your points?
  1044. IfMsgBox Yes
  1045. {
  1046. Gui,4:Hide
  1047. ;~ ---------------------------INPUT PASSWORD---------------------------------
  1048. InputBox,InsertPass,Authentication,Please Enter your Password,Hide,180,120,
  1049. If (Errorlevel=0)
  1050. {
  1051. If (Password_Ini==InsertPass)
  1052. {
  1053.  
  1054. ;~ --------------------------------------------------------------------------
  1055.  
  1056. Deducted := (User_GPoints-Rewards)
  1057. IniWrite,%Deducted%,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
  1058. GuiControl,1:,TotalP,GPoints : %Deducted%
  1059. MyPoints := Deducted
  1060. Gui,+OwnDialogs
  1061. MsgBox,262208,Thank You!, Success!!!`n`nYour remaining Points is %Deducted%
  1062. Loop,%PATH1%\\Rewards\*.dat
  1063. {
  1064.  
  1065. fileName := A_LoopFileName
  1066. if (RName==fileName)
  1067. {
  1068. FileMove,%PATH1%\Rewards\%RName%,%PATH1%\Rewards\Temp,1
  1069. FileReadLine,1st,%PATH1%\Rewards\Temp\%RName%:VAN:$DATA,1
  1070. if (1st="")
  1071. {
  1072. IniWrite,% User_GPoints,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
  1073. GuiControl,1:,TotalP,GPoints : %User_GPoints%
  1074. MsgBox, 262160, Warning, There is an ERROR occured!`nThere is NO available Rewards`n`nPoints Refunded!
  1075. Gui,1:Show
  1076. return
  1077.  
  1078. }
  1079. else if (1st="EMPTY")
  1080. {
  1081. IniWrite,% User_GPoints,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
  1082. GuiControl,1:,TotalP,GPoints : %User_GPoints%
  1083. FileMove,%PATH1%\Rewards\Temp\%RName%,%PATH1%\Rewards,1
  1084. MsgBox, 262160, Warning, There is an ERROR occured!`nThere is NO available Rewards`n`nPoints Refunded!
  1085. Gui,1:Show
  1086. return
  1087. }
  1088. Loop,read,%PATH1%\Rewards\Temp\%RName%:VAN:$DATA
  1089. {
  1090. Loop,parse,A_LoopReadLine, `n
  1091. {
  1092. if (A_LoopField!=1st)
  1093. {
  1094. FileAppend,%A_LoopField%`n,%PATH1%\Rewards\%RName%:VAN:$DATA
  1095. }
  1096. }
  1097. }
  1098. }
  1099.  
  1100. }
  1101. Gui,+OwnDialogs
  1102. MsgBox, 262176, Message,Please copy the pin before pressing OK!`nPIN : %1st%`n`nYour Code will be sent to your Inbox...
  1103. Gui,4:Show
  1104. Gosub,Button_Redeem
  1105. Gosub, CopyRewards
  1106.  
  1107. }
  1108.  
  1109. else
  1110. {
  1111. Gui,+OwnDialogs
  1112. MsgBox,262160,Error, Wrong password!
  1113. Gui,4:Show
  1114. }
  1115. }
  1116. else
  1117. {
  1118. Gui,4:Show
  1119. }
  1120.  
  1121. }
  1122. else
  1123. {
  1124. Gui,4:Hide
  1125. Gui,+OwnDialogs
  1126. MsgBox,262208,Message,No Points Deducted!!!
  1127. Gui,4:Show
  1128. }
  1129. }
  1130. else
  1131. {
  1132. Gosub,Not_Enough_Points
  1133. }
  1134. return
  1135.  
  1136. ;~ -----------------------------------------TOTAL ACCUMULATED POINTS--------------------- >>>>>>>>>>>dec01
  1137. ACTReg:
  1138. Iniread,EVENT,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,EVENT
  1139. if (EVENT="ERROR" or EVENT="")
  1140. {
  1141. IniWrite,0,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,EVENT
  1142. EVENT:=0
  1143. }
  1144. Else if (EVENT==1)
  1145. {
  1146. IniRead,MemberEVPoints,%PATH1%\GPoints\%User_Name%\info.ini:VAN:$DATA,Accumulated Points, Total
  1147. if (MemberEVPoints="ERROR" or MemberEVPoints="")
  1148. {
  1149. MemberEVPoints := 0
  1150. Iniwrite,0,%PATH1%\GPoints\%User_Name%\info.ini:VAN:$DATA,Accumulated Points, Total
  1151. Gui, 1:Add, Text, x350 y1 w180 cYellow +BackgroundTrans vEVPoints, EventPoints : %MemberEVPoints%
  1152. }
  1153. else
  1154. {
  1155. Gui, 1:Add, Text, x350 y1 w180 cYellow +BackgroundTrans vEVPoints, EventPoints : %MemberEVPoints%
  1156. IniRead,ACCU,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
  1157. if (ACCU > 1)
  1158. {
  1159. TOTPOINTREG := (MemberEVPoints+ACCU)
  1160. IniWrite,%TOTPOINTREG%,%PATH1%\GPoints\%User_Name%\info.ini:VAN:$DATA,Accumulated Points, Total
  1161. GuiControl,1:,EVPoints,EventPoints : %TOTPOINTREG%
  1162.  
  1163. }
  1164. else
  1165. {
  1166. TOTPOINTREG = %MemberEVPoints%
  1167. GuiControl,1:,EVPoints,EventPoints : %TOTPOINTREG%
  1168. }
  1169.  
  1170. }
  1171. }
  1172. else
  1173. {
  1174. IniDelete,%PATH1%\GPoints\%User_Name%\info.ini:VAN:$DATA,Accumulated Points, Total
  1175. }
  1176.  
  1177. ;~ #########################################EVENT################################
  1178.  
  1179. return
  1180.  
  1181. Participants:
  1182. Gui,4:submit,nohide
  1183. FileRead,ParTC,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
  1184. If (ParTC="ERROR") or (ParTC="")
  1185. {
  1186. Iniread,ReqPoints,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,Tournament Points
  1187. If (MyPoints>=ReqPoints)
  1188. {
  1189. DeductTour := (MyPoints-ReqPoints)
  1190. IniWrite,%DeductTour%,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
  1191. MsgBox, 262208, Success, Thank You!`nYou can now Participate.
  1192. FileAppend,%User_Name%`n,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
  1193. GuiControl,4:Disable, ButtonRegisterTour
  1194. GuiControl,4:,ButtonRegisterTour,PLAYER ACCEPTED
  1195. }
  1196. else
  1197. {
  1198. MsgBox, 262192, Warning, Sorry, You do not have enough G-Points!
  1199. return
  1200. }
  1201. }
  1202. Else IfNotInString,ParTC,|%User_Name%|
  1203. {
  1204. Iniread,ReqPoints,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,Tournament Points
  1205. If (MyPoints>=ReqPoints)
  1206. {
  1207. DeductTour := (MyPoints-ReqPoints)
  1208. IniWrite,%DeductTour%,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
  1209. MsgBox, 262208, Success, Thank You!`nYou can now Participate.
  1210. FileAppend,|%User_Name%|`n,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
  1211. }
  1212. else
  1213. {
  1214. MsgBox, 262192, Warning, Sorry, You do not have enough G-Points!
  1215. return
  1216. }
  1217. }
  1218. else
  1219. {
  1220. MsgBox, 262160, Warning, You cannot Register twice!
  1221. }
  1222. return
  1223.  
  1224. ShieldPoints:
  1225. Iniread,ShieldDateLOGIN,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Date
  1226. Iniread,ShieldDateLOGOUT,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Date
  1227. if (ShieldDateLOGIN==ShieldDateLOGOUT)
  1228. {
  1229. Iniread,ShieldTimeIN,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Mins
  1230. Iniread,ShieldTimeOUT,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Mins
  1231. If(ShieldTimeIN==ShieldTimeOUT)
  1232. {
  1233. IniWrite,0,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
  1234. }
  1235. else if (ShieldTimeIN="ERROR") or (ShieldTimeIN="")
  1236. {
  1237. IniWrite,%A_Hour%:%A_Min%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Mins
  1238. }
  1239. else if (ShieldTimeOUT="ERROR") or (ShieldTimeOUT="")
  1240. {
  1241. IniWrite,%A_Hour%:%A_Min%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Mins
  1242. }
  1243. }
  1244. else
  1245. {
  1246. IniRead,LastPoint1,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
  1247. If (LastPoint1 > 1)
  1248. {
  1249. Gui,+OwnDialogs
  1250. MsgBox, 262208,Thank You!,%LastPoint1% points has been added to your Account!,5
  1251. }
  1252. }
  1253. return
  1254.  
  1255. ShieldPointsCheck:
  1256. TimeToday = %A_YYYY%%A_MM%%A_DD%%A_Hour%%A_Min%%A_Sec% ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>NOTE: ALWAYS COMPLETE FROM YEAR-SECS
  1257. IniRead,SpentTime,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Minsec
  1258. EnvSub, TimeSpent, DTime
  1259. TimeSpent -= DTime
  1260. TToday = %TimeToday%
  1261. TSpent = %SpentTime%
  1262. EnvSub, TToday, %TSpent%, Minutes
  1263. if (TToday <= TimeLess)
  1264. {
  1265. IniWrite,0,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
  1266. }
  1267. return
  1268.  
  1269. ShieldPointsCheckProcess:
  1270. TimeToday = %A_YYYY%%A_MM%%A_DD%%A_Hour%%A_Min%%A_Sec%
  1271. IniRead,SpentTimeProcess,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Minsec
  1272. EnvSub, TimeSpentProcess, DTimeProcess
  1273. TimeSpentProcess -= DTimeProcess
  1274. TTodayProcess = %TimeToday%
  1275. TSpentProcess = %SpentTimeProcess%
  1276. EnvSub, TTodayProcess, %TSpentProcess%, Minutes
  1277. return
  1278. ;~ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  1279.  
  1280. Exit:
  1281. GuiClose:
  1282. If (MemPass = True)
  1283. {
  1284.  
  1285. Gosub, Logout_Account
  1286. Gosub, Delete_online
  1287. Gosub, ExitOnly
  1288. }
  1289. Else if (Admin = True)
  1290. {
  1291. ExitApp
  1292. }
  1293. else
  1294. Gosub, ExitOnly
  1295. return
  1296.  
  1297. 3GuiClose:
  1298. GuiControl,3:,UserNameReg
  1299. GuiControl,3:,PasswordReg
  1300. GuiControl,3:,PasswordConfirm
  1301. Gui,3:Hide
  1302. Gui,1:Show
  1303. return
  1304.  
  1305. 4GuiClose:
  1306. Gui,4:Hide
  1307. Gui,1:Show
  1308. return
  1309.  
  1310. 5GuiClose:
  1311. Gui,5:Hide
  1312. ;~ Gui,4:Show
  1313. return
  1314.  
  1315. 6GuiClose:
  1316. GuiControl,,OldPassword
  1317. GuiControl,,NewPassword
  1318. GuiControl,,ConfirmPassword
  1319. Gui,6:Hide
  1320. Gui,1:Show
  1321. return
  1322.  
  1323.  
  1324. ExitOnly:
  1325. ExitApp
Add Comment
Please, Sign In to add comment