Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
- ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
- ;@Ahk2Exe-Set FileDescription, Game Points
- ;@Ahk2Exe-Set FileVersion, 3.2.1.0
- ;@Ahk2Exe-SetInternalName Customer Game Points
- ;@Ahk2Exe-SetName GPoints
- ;@Ahk2Exe-SetOrigFileName Customer Game Points
- ;@Ahk2Exe-Set ProductName, Game Points
- ;@Ahk2Exe-Set ProductVersion, 3.2.1.0
- ;@Ahk2Exe-Set Description, GamePoints
- ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
- ;@Ahk2Exe-SetMainIcon icon.ico
- ;@Ahk2Exe-AddResource Icon.ico, 160 ; Replaces 'H on blue'
- ;@Ahk2Exe-AddResource Icon.ico, 206 ; Replaces 'S on green'
- ;@Ahk2Exe-AddResource Icon.ico, 207 ; Replaces 'H on red'
- ;@Ahk2Exe-AddResource Icon.ico, 208 ; Replaces 'S on red'
- #SingleInstance, Force
- #NoEnv
- #Persistent
- SetBatchLines, 20ms
- SetWorkingDir, %A_ScriptDir%
- SetTitleMatchMode,1
- Menu,tray, NoStandard
- Menu,Tray,Add,Open Gpoints,Open_Gpoints
- Menu,tray,add,
- Menu,Tray,Add,Exit
- StringCaseSense, On
- ;~ -------------------------Performance----------------
- #MaxHotkeysPerInterval 99000000
- #HotkeyInterval 99000000
- #KeyHistory 0
- ListLines Off
- Process, Priority, , A
- SetKeyDelay, -1, -1
- SetMouseDelay, -1
- SetDefaultMouseSpeed, 0
- SetWinDelay, -1
- SetControlDelay, -1
- SendMode Input
- global PATH1
- Banner := False
- PosButtInbox:=230
- MemPass := False
- IfNotExist,%A_Temp%\GPP
- FileCreateDir,%A_Temp%\GPP
- FileInstall,VANHEARTNET\GPBackground.png,%A_Temp%\GPP\GPBackground.png,1
- ;~ ------------------------------------------------------------------------------------------------------------
- IfExist,VANHEARTNET\gpPath.dat:VAN:$DATA
- {
- FileRead,PATH1,VANHEARTNET\gpPath.dat:VAN:$DATA
- if (PATH1="ERROR" or PATH1="")
- {
- MsgBox, 262176, ERROR, Please run the Admin control Panel first before running GPoints.
- ExitApp
- }
- else IfNotExist,% PATH1
- {
- MsgBox, 262176, ERROR, Please run the Admin control Panel first before running GPoints.
- ExitApp
- }
- }
- else
- {
- MsgBox, 262176, ERROR, Please run the Admin control Panel first before running GPoints.
- ExitApp
- }
- ;~ ---------------------------------------------------------------------------------------------------------------
- IFNotExist,%PATH1%\DATA\PNG
- {
- FileCreateDir,%PATH1%\DATA\PNG
- WALLPAPER = %A_Temp%\GPP\GPBackground.png
- }
- else
- {
- ifExist,%PATH1%\DATA\PNG\GPBackground.png
- {
- WALLPAPER = %PATH1%\DATA\PNG\GPBackground.png
- }
- else
- {
- WALLPAPER = %A_Temp%\GPP\GPBackground.png
- }
- }
- IfNotExist, data
- {
- FileCreateDir, data
- }
- IfNotExist,%PATH1%\\Rewards
- {
- FileCreateDir,%PATH1%\\Rewards
- FileSetAttrib,+H,%PATH1%\\Rewards
- }
- IfExist,%PATH1%\DATA\Startprogram
- {
- IfExist,%PATH1%\DATA\Startprogram\Run.bat
- {
- Run,%PATH1%\DATA\Startprogram\Run.bat
- }
- }
- else
- {
- FileCreateDir,%PATH1%\DATA\Startprogram
- }
- IniRead,TimeLess,%PATH1%\DATA\Config.ini:VAN:$DATA,TIMERCOUNTDOWN,TimeRequiredCount
- if (TimeLess="ERROR") or (TimeLess="")
- {
- Iniwrite,2,%PATH1%\DATA\Config.ini:VAN:$DATA,TIMERCOUNTDOWN,TimeRequiredCount
- TimeLess := 2
- }
- IfExist,%PATH1%\DATA\Ban.dat
- FileRead,BANNERTEXT,%PATH1%\DATA\Ban.dat:VAN:$DATA
- ;~ ---------------------------------------Reward Requirements---------------------
- Gosub, Read_Rewards
- ;~ ---------------------------------------------------------------
- ;~ -------------------MAIN------------
- Gui, 1:Color,222222,White
- Gui, 1:Add,Picture,x0 y95 w800 h300 vPic_Background,% WALLPAPER
- Gui, 1:Submit,Nohide
- Gui,1:+OwnDialogs
- Gui, 1:show, w800 h500, GPoints
- Gui, Font, s10, Verdana Bold
- Gui, 1:Add, text, x20 y400 cRed vInvalid, Invalid username or password.
- Gui, 1:Add, text, x20 y400 cRed vInvalidOnline, Account is Online.
- GuiControl,Hide,InvalidOnline
- GuiControl,+BackgroundTrans,Invalid
- GuiControl,Hide,Invalid
- Gui, 1:Add, button, x28 y460 w120 h30 Default +Border vButton_Gui2 gButton_Login,LOGIN
- Gui, 1:Add, button, x210 y460 w120 h30 +Border vButton_Reg gButton_Reg,REGISTER
- Gui, 1:Add, Edit, limit16 x20 y420 w140 h30 vUser_Name,
- Gui, 1:Add, Edit, limit16 x200 y420 w140 h30 vPassword1,
- GuiControl,1:+Password, Password1
- Gui, Font, s35 , Arial bold
- Gui, 1:Add, text, cff0000 x80 y35 w615 h50 vTitle,CUSTOMER GAME POINTS
- Gui, 1:Add, Button, x19 y419 w320 h70 +Border vButton_Mini gButton_Minimize, START
- GuiControl,Hide,Button_Mini
- Gui, Font, s24 , Arial bold
- Gui, 1:Add, Button, x580 y419 w200 h70 +Border vButton_LO gButton_LogOut,LOG OUT
- GuiControl,Hide,Button_LO
- Gui, Font, s16 , Arial bold
- Gui, 1:Add,Button, x360 y419 w200 h70 +Border vButton_Monitor gMonitor_Online, Member Online
- GuiControl,Hide,Button_Monitor
- Gui, Font, s10 , Time New Roman
- Gui, 1:Add,Button, x360 y419 w200 h32 +Border vButton_Status gMember_Status, MyRewards
- GuiControl,Hide,Button_Status
- Gui, 1:Add,Button, x360 y+5 w200 h32 +Border vBTN_ChangePass gButton_ChangePass, Change Password
- GuiControl,Hide,BTN_ChangePass
- Gui, 1:Add, Groupbox, x2 y385 w795 h112 vGroup_box,
- Gui, font, s8, Time New Roman
- Gosub, Announcement_title
- Gosub, Announce_ment
- ;~ ------------------------Online-------------------
- ;~ ----------------------REGISTER-----------
- Gui,3:Color,222222
- Gui,3:+AlwaysOnTop
- Gui,3:Font, cffff00 s14, Times New Roman Bold
- Gui,3:Add, Text, x170 y22,Username
- Gui,3:Add, Text, x170 y65,Password
- Gui,3:Add, Text, x170 y105,Confirm Password
- Gui,3:Add, Edit, cBlack Limit16 x20 y20 w140 h30 vUserNameReg,
- Gui,3:Add, Edit, cBlack Limit16 x20 y60 w140 h30 vPasswordReg,
- Gui,3:Add, Edit, cBlack Limit16 x20 y100 w140 h30 vPasswordConfirm,
- Gui,3:Add, button, x20 y+10 w140 Default +Border vButton_Submit gButton_Sub,Submit
- GuiControl,3:+Password, PasswordConfirm
- GuiControl,3:+Password, PasswordReg
- ;~ ---------------------------------REWARDS--------------------
- Gui,4:Color, white, lime
- Gui,4:+AlwaysOnTop
- Gui,4:Font, Arial Black Bold
- IfNotExist, %PATH1%\DATA\PNG\Reward1.png
- Gui,4:Add, Picture, x2 y1 w200 h100 +Border vReward1,VANHEARTNET\RewardSample.png
- else
- Gui,4:Add, Picture, x2 y1 w200 h100 +Border vReward1,%PATH1%\DATA\PNG\Reward1.png
- IfNotExist, %PATH1%\DATA\PNG\Reward2.png
- Gui,4:Add, Picture, x+10 w200 h100 +Border vReward2,VANHEARTNET\RewardSample.png
- else
- Gui,4:Add, Picture, x+10 w200 h100 +Border vReward2,%PATH1%\DATA\PNG\Reward2.png
- IfNotExist, %PATH1%\DATA\PNG\Reward3.png
- Gui,4:Add, Picture, x+10 w200 h100 +Border vReward3,VANHEARTNET\RewardSample.png
- else
- Gui,4:Add,Picture, x+10 w200 h100 +Border vReward3, %PATH1%\DATA\PNG\Reward3.png
- IfNotExist, %PATH1%\DATA\PNG\Reward4.png
- Gui,4:Add, Picture, x2 y160 w200 h100 +Border vReward4,VANHEARTNET\RewardSample.png
- else
- Gui,4:Add,Picture, x2 y160 w200 h100 +Border vReward4, %PATH1%\DATA\PNG\Reward4.png
- IfNotExist, %PATH1%\DATA\PNG\Reward5.png
- Gui,4:Add, Picture, x+10 w200 h100 +Border vReward5,VANHEARTNET\RewardSample.png
- else
- Gui,4:Add,Picture, x+10 w200 h100 +Border vReward5, %PATH1%\DATA\PNG\Reward5.png
- IfNotExist, %PATH1%\DATA\PNG\Reward6.png
- Gui,4:Add, Picture, x+10 w200 h100 +Border vReward6,VANHEARTNET\RewardSample.png
- else
- Gui,4:Add,Picture, x+10 w200 h100 +Border vReward6, %PATH1%\DATA\PNG\Reward6.png
- IfNotExist, %PATH1%\DATA\PNG\Reward7.png
- Gui,4:Add, Picture, x2 y330 w200 h100 +Border vReward7,VANHEARTNET\RewardSample.png
- else
- Gui,4:Add,Picture, x2 y330 w200 h100 +Border vReward7, %PATH1%\DATA\PNG\Reward7.png
- IfNotExist, %PATH1%\DATA\PNG\Reward8.png
- Gui,4:Add, Picture, x+10 w200 h100 +Border vReward8,VANHEARTNET\RewardSample.png
- else
- Gui,4:Add,Picture, x+10 w200 h100 +Border vReward8, %PATH1%\DATA\PNG\Reward8.png
- IfNotExist, %PATH1%\DATA\PNG\Reward9.png
- Gui,4:Add, Picture, x+10 w200 h100 +Border vReward9,VANHEARTNET\RewardSample.png
- else
- Gui,4:Add,Picture, x+10 w200 h100 +Border vReward9, %PATH1%\DATA\PNG\Reward9.png
- ;~ ----------------------------------Reward Text---------------------
- Gui,4:Add,Text, x2 y110 w200 h15 +Center vTextreward1, %Rw1%
- Gui,4:Add,Text, x+10 y110 w200 h15 +Center vTExtReward2, %Rw2%
- Gui,4:Add,Text, x+10 y110 w200 h15 +Center vTExtReward3, %Rw3%
- Gui,4:Add,Text, x2 y270 w200 h15 +Center vTextreward4, %Rw4%
- Gui,4:Add,Text, x+10 y270 w200 h15 +Center vTextreward5, %Rw5%
- Gui,4:Add,Text, x+10 y270 w200 h15 +Center vTextreward6, %Rw6%
- Gui,4:Add,Text, x2 y440 w200 h15 +Center vTextreward7, %Rw7%
- Gui,4:Add,Text, x+10 y440 w200 h15 +Center vTextreward8, %Rw8%
- Gui,4:Add,Text, x+10 y440 w200 h15 +Center vTextreward9, %Rw9%
- ;~ -------------------------------Reward Button Redeem------------------------
- Gui,4:Add,Button, x75 y130 +Border w60 h20 vButtonRedeem1 gButton_Redeem1, Redeem
- Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedeem2 gButton_Redeem2, Redeem
- Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedeem3 gButton_Redeem3, Redeem
- Gui,4:Add,Button, x75 y290 +Border w60 h20 vButtonRedeem4 gButton_Redeem4, Redeem
- Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedee5 gButton_Redeem5, Redeem
- Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedee6 gButton_Redeem6, Redeem
- Gui,4:Add,Button, x75 +Border w60 h20 vButtonRedee7 gButton_Redeem7, Redeem
- Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedee8 gButton_Redeem8, Redeem
- Gui,4:Add,Button, x+150 +Border w60 h20 vButtonRedee9 gButton_Redeem9, Redeem
- ;~ ------------------------------------------BUTTON POSITIONS INBOX AND TOURNAMENT--------------
- IniRead,InboxTourPos,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,Tournament
- if(InboxTourPos="ERROR") or (InboxTourPos="")
- {
- IniWrite,0,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,Tournament
- MsgBox,, ERROR, ERROR Please Check the Path Location
- ExitApp
- }
- else If (InboxTourPos==1)
- {
- PosButtInbox:=80
- Gui,4:Add,Button, x350 y500 +Border w200 h40 vButtonRegisterTour gButton_RegTour, JOIN TOURNAMENT
- }
- else if (InboxTourPos==0)
- {
- PosButtInbox:=230
- }
- ;~ -----------------------------------------------------------------------------------------------
- Gui,4:Add,Button, x%PosButtInbox% y500 +Border w200 h40 vButtonRedeem gButton_Redeem, MyRewards Inbox
- ;~ ------------------------------------------------------------MY Inventory---------------
- YD := (A_ScreenHeight-480)
- Gui,5:font,s16 Arial Black Bold
- Gui,5:+Delimiter*
- Gui,5:Color, 222222,White
- Gui,5:+AlwaysonTop
- Gui,5:font,s12 Arial
- Gui,5:Add,ListBox,x1 y1 w248 h370 vList1,
- Gui,5:font,s16 Calibri bold
- Gui,5:Add,Button,x2 y+2 w246 h40 gButton_Redeem, Refresh
- ;~ ---------------------------------------CHANGE PASSWORD----------------------------------------------------
- Gui,6:Color,222222
- Gui,6:+AlwaysOnTop
- Gui,6:Font, cffff00 s14, Times New Roman Bold
- Gui,6:Add, Text, x170 y22,Old Password
- Gui,6:Add, Text, x170 y65,New Password
- Gui,6:Add, Text, x170 y105,Confirm Password
- Gui,6:Add, Edit, cBlack Limit16 x20 y20 w140 h30 vOldPassword,
- Gui,6:Add, Edit, cBlack Limit16 x20 y60 w140 h30 vNewPassword,
- Gui,6:Add, Edit, cBlack Limit16 x20 y100 w140 h30 vConfirmPassword,
- Gui,6:Add, button, x20 y+10 w140 Default +Border vButton_Submit2 gButton_Sub2,Submit
- GuiControl,6:+Password, OldPassword
- GuiControl,6:+Password, NewPassword
- GuiControl,6:+Password, ConfirmPassword
- ;~ -------------------------Display Total UpTime------------------
- IfExist,%PATH1%\DATA\PNG\BANNER.png
- {
- Gui,1:Add, Picture, x0 y0 w400 h40 BackgroundTrans vVAN,%PATH1%\DATA\PNG\BANNER.png
- Banner := True
- }
- else IfExist,%PATH1%\DATA\Ban.dat:VAN:$DATA
- {
- Gui,1:Add,Text,x750 y395 cRed vVAN2,% BANNERTEXT
- Banner := True
- }
- else
- {
- Banner:=False
- }
- While (MemPass=False && Banner=True)
- {
- Sleep,10
- XV++
- BTX--
- GuiControl,1:move,VAN,x%XV%
- GuiControl,1:move,VAN2,x%BTX%
- if(XV=800)
- {
- XV := -380
- }
- if (BTX=-800)
- BTX := 780
- if (MemPass = True)
- {
- GuiControl,1:Hide,VAN
- GuiControl,1:Hide,VAN2
- break
- }
- }
- return
- ;~ -------------------------------------------------Label-----------------
- Button_Sub:
- Gui,3:Submit,Nohide
- StringLen,UserLenght, UserNameReg
- StringLen,PasswordLenght, PasswordReg
- If (UserNameReg=="")
- {
- Gui,+OwnDialogs
- MsgBox, 262160,Error, Please Input User Name
- }
- Else if(PasswordReg=="")
- {
- Gui,+OwnDialogs
- MsgBox, 262160,Error, Please Input Password
- }
- Else if(PasswordConfirm=="")
- {
- Gui,+OwnDialogs
- MsgBox, 262160,Error,Please Confirm your Password
- }
- Else if(PasswordReg not ==PasswordConfirm)
- {
- Gui,+OwnDialogs
- MsgBox, 262160,Error,Password not match!
- GuiControl,,UserNameReg
- GuiControl,,PasswordReg
- GuiControl,,PasswordConfirm
- }
- ;~ ---------------------------------------------------------ILLEGAL CHARACTER-----------------------------------------
- else if UserNameReg contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`"
- {
- MsgBox, 262160, Error, Illegal characters
- }
- else if PasswordReg contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`"
- {
- MsgBox, 262160, Error, Illegal characters
- }
- else if PasswordConfirm contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`"
- {
- MsgBox, 262160, Error, Illegal characters
- }
- ;~ ------------------------------------------------------MINIMUM CHARACTERS----------------------------------------------------------------
- else if (UserLenght<= 2)
- {
- MsgBox, 262160, Warning, Username should consist atleast 3 characters.
- }
- else if (PasswordLenght<= 2)
- {
- MsgBox, 262160, Warning, Password should consist atleast 3 characters.
- }
- ;~ -------------------------------------------------------------------------------------------------------------------------------
- else IfExist,%PATH1%\\GPoints\%UserNameReg%
- {
- Gui,+OwnDialogs
- MsgBox, 262160,Error,The Username is Already Taken Please Choose Different Username!
- GuiControl,,UserNameReg
- GuiControl,,PasswordReg
- GuiControl,,PasswordConfirm
- }
- else
- {
- IfNotExist,%PATH1%\\GPoints\%UserNameReg%
- {
- FileCreateDir,%PATH1%\\GPoints\%UserNameReg%
- IniWrite,%A_MM%/%A_DD%/%A_YYYY%,%PATH1%\\GPoints\%UserNameReg%\info.ini:VAN:$DATA,Registered,Date
- IniWrite,%PasswordReg%,%PATH1%\\GPoints\%UserNameReg%\info.ini:VAN:$DATA,Account,Password
- Iniwrite,0,%PATH1%\\GPoints\%UserNameReg%\info.ini:VAN:$DATA,TOTAL,Points
- IniWrite,%A_YYYY%%A_MM%%A_DD%,%PATH1%\GPoints\%UserNameReg%\info.ini:VAN:$DATA,Last Date Registered, Count
- Iniwrite,0,%PATH1%\GPoints\%UserNameReg%\info.ini:VAN:$DATA,Accumulated Points, Total ;>>>>>>>>>>>>>>>>dec01
- FileSetAttrib,+H,%PATH1%\\GPoints\%UserNameReg%\info.ini:VAN:$DATA,1
- FileSetAttrib,+H,%PATH1%\\GPoints\%UserNameReg%
- Gui,+OwnDialogs
- MsgBox, 262208,Complete, Success! `nThank You, Please Enjoy.
- GuiControl,1:,User_Name
- GuiControl,1:,Password1
- GuiControl,3:,UserNameReg
- GuiControl,3:,PasswordReg
- GuiControl,3:,PasswordConfirm
- GuiControl,1:hide,Invalid
- GuiControl,1:hide,InvalidOnline
- Gui,3:Hide
- Gui,1:show
- }
- }
- return
- Button_Sub2:
- Gui,6:Submit,Nohide
- StringLen,NewPasswordLenght, NewPassword
- If (OldPassword=="")
- {
- Gui,+OwnDialogs
- MsgBox, 262160,Error, Please Input your current Password
- }
- Else If (NewPassword=="")
- {
- Gui,+OwnDialogs
- MsgBox, 262160,Error, Please Input your New Password
- }
- Else if (ConfirmPassword=="")
- {
- Gui,+OwnDialogs
- MsgBox, 262160,Error, Please Input Confirm your New Password
- }
- Else If (OldPassword not ==MyPassword)
- {
- Gui,+OwnDialogs
- Msgbox,262160,Error, Please Enter the correct Password
- }
- Else If (NewPassword not == ConfirmPassword)
- {
- Gui,+OwnDialogs
- MsgBox,262160,Error, New Password does not Match!
- }
- Else If (NewPassword==MyPassword)
- {
- Gui,+OwnDialogs
- MsgBox,262160,Error, Please choose different Password
- }
- ;~ ------------------------------------------------ILLEGAL CHARACTERS---------------------------------------------
- else if OldPassword contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`"
- {
- MsgBox, 262160, Error, Illegal characters
- }
- else if NewPassword contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`"
- {
- MsgBox, 262160, Error, Illegal characters
- }
- ;~ ----------------------------------------------MINIMUM CHARACTERS--------------------------------------------------------------
- else if (NewPasswordLenght<= 2)
- {
- MsgBox, 262160, Warning, Password should consist atleast 3 characters.
- }
- ;~ -----------------------------------------------------------------------------------------------------------------
- else
- {
- IniWrite,%NewPassword%,%PATH1%\\GPoints\%User_Name%\info.ini:VAN:$DATA,Account,Password
- Gui,+OwnDialogs
- MsgBox,262208,Success,Your Password has been Changed!
- GuiControl,,OldPassword
- GuiControl,,NewPassword
- GuiControl,,ConfirmPassword
- Gui,6:Hide
- Gui,1:Show
- }
- return
- Button_ChangePass:
- Gui,1:Hide
- Gui,6:Show,w350 h200, Change Password
- GuiControl,,OldPassword
- GuiControl,,NewPassword
- GuiControl,,ConfirmPassword
- Iniread,MyPassword,%PATH1%\\GPoints\%User_Name%\info.ini:VAN:$DATA,Account,Password
- return
- Button_Login:
- Gui,1:Submit,Nohide
- Admin := False
- If (User_Name=="admin")
- {
- if (Password1=="adminVANHEARTNET")
- {
- Admin := true
- GuiControl,Show,Button_Mini
- GuiControl,Show,Button_LO
- GuiControl,Show,Button_Monitor
- Guicontrol,hide,Button_Gui2
- Guicontrol,hide,Button_Reg
- Guicontrol,hide,User_Name
- Guicontrol,hide,Password1
- GuiControl,Hide,Invalid
- GuiControl,Hide,About
- GuiControl,Hide,About1
- Gui, Font, s16 , Times new Roman bold
- Guicontrol,hide,Pic_Background
- Gui, 1:Add, Text, x5 y1 cffff00 +BackgroundTrans,Administrator : Welcome %User_Name%
- Guicontrol,Show,Pic_Background
- }
- else
- {
- GuiControl,1:hide,InvalidOnline
- GuiControl,1:Hide,VAN2
- GuiControl,Show,Invalid
- }
- ;~ -------------------------------Admin Controls-------------------------------------
- }
- ;~ ---------------------------------------NO Account----------------------
- Else IfNotExist,%PATH1%\GPoints\%User_Name%
- {
- GuiControl,1:hide,InvalidOnline
- GuiControl,1:Hide,VAN2
- GuiControl,Show,Invalid
- GuiControl,,User_Name
- GuiControl,,Password1
- }
- Else if (User_Name=="")
- {
- GuiControl,1:hide,InvalidOnline
- GuiControl,1:Hide,VAN2
- GuiControl,Show,Invalid
- GuiControl,,User_Name
- GuiControl,,Password1
- }
- ;~ ----------------------------------------------------------------------------
- else
- {
- IfNotExist,%PATH1%\\GPoints
- {
- FileCreateDir,%PATH1%\\GPoints
- FileSetAttrib,+H,%PATH1%
- }
- Iniread,Password_Ini,%PATH1%\\GPoints\%User_Name%\info.ini:VAN:$DATA,Account,Password
- Loop,%PATH1%\\GPoints\*.*,2
- {
- User = "%User_Name%"
- Loops = "%A_LoopFileName%"
- PC = "%A_ComputerName%"
- MemPass := false
- IfExist,%PATH1%\Online\%User_Name%
- {
- GuiControl,1:hide,Invalid
- GuiControl,1:Hide,VAN2
- GuiControl,Show,InvalidOnline
- GuiControl,,User_Name
- GuiControl,,Password1
- gosub, Delete_Online
- }
- Else IF (User==Loops)
- {
- if(Password1==Password_Ini)
- {
- MemPass := True
- GuiControl,Show,Button_Mini
- GuiControl,Show,Button_LO
- GuiControl,Hide,Invalid
- GuiControl,Hide,InvalidOnline
- Guicontrol,hide,Button_Gui2
- Guicontrol,hide,Button_Reg
- Guicontrol,hide,User_Name
- Guicontrol,hide,Password1
- GuiControl,Show,Button_Status
- GuiControl,Show,BTN_ChangePass
- Gui, Font, s12 , Century Gothic Bold
- GuiControl,Hide,About
- GuiControl,Hide,About1
- Gosub,LogIn_Add
- Gui, 1:Add, Text, x5 y1 cLime +BackgroundTrans, Welcome Member : %User_Name%
- Iniread,MyPoints,%PATH1%\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
- Gui, 1:Add, Text, x640 y1 w150 h23 caqua +BackgroundTrans vTotalP, GPoints : %MyPoints%
- Guicontrol,Show,Pic_Background
- IniWrite,%A_ComputerName%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,COMPUTER,PC
- IniWrite,%A_MM%/%A_DD%/%A_Year%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Date
- IniWrite,%A_Hour%:%A_Min%:%A_Sec%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Time
- IniWrite,%A_Hour%:%A_Min%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Mins
- IniWrite,%A_YYYY%%A_MM%%A_DD%%A_Hour%%A_Min%%A_Sec%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Minsec
- FileCreateDir,%PATH1%\Online\%User_Name%
- ;~ ---------------------------------LOG CHECK--------------------------------
- IniWrite,%A_Hour%%A_Min%%A_Sec%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-Check,Date
- IniWrite,%A_YYYY%%A_MM%%A_DD%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Time,Count
- Gosub, ACTReg ;>>>>>>>>>>>dec01
- ;~ ----------------------------------------------MyReward-------------------------------------------------
- if (MyPoints="ERROR" or MyPoints="")
- {
- IniWrite,0,%PATH1%\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
- MyPoints :=0
- }
- ;~ -----NOTE<<<<<<<<<<<<<<<<<<<<<<<<<
- ;ADD DELIMITER ONLY AT THE BEGINING OF THE TEXTFILE TO READ TO DISPLAY ALL THE TEXT
- ;ADD DELIMITER AT THE BEGINNING OF EVERY WORD INSIDE OF THE TEXTFILE TO DISPLAY ONLY THE LAST WORD IN TEXTFILE
- IfNotExist,%PATH1%\GPoints\%User_Name%\MyRewards.file
- {
- FileAppend,*,%PATH1%\GPoints\%User_Name%\MyRewards.file:VAN:$DATA
- }
- ;~ ------------------------------------------------------------DISABLE TOURNAMENT BUTTON----------------------------------
- if (InboxTourPos==1)
- {
- FileRead,ParTCD,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
- IfInString,ParTCD,|%User_Name%|
- {
- GuiControl,4:Disable, ButtonRegisterTour
- GuiControl,4:,ButtonRegisterTour, PLAYER ACCEPTED
- }
- }
- ;~ ---------------------------------------------------BOOST POINTS-----------------------------------------
- Iniread,Boost1,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime1
- If(Boost1="ERROR") or (Boost1="")
- {
- IniWrite,1,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime1
- }
- Iniread,Boost2,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime2
- If(Boost2="ERROR") or (Boost2="")
- {
- IniWrite,1,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime2
- }
- Iniread,Boost3,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime3
- If(Boost3="ERROR") or (Boost3="")
- {
- IniWrite,1,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,BoostTime3
- }
- ;~ ------------------------------------------------------BOOST PROCESS-------------------------------------
- Iniread,Process1, %PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P1
- If(Process1="ERROR") or (Process1="")
- {
- IniWrite,Process1,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P1
- }
- IniRead,Process2,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P2
- If(Process2="ERROR") or (Process2="")
- {
- IniWrite,Process2,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P2
- }
- IniRead,Process3,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P3
- If(Process3="ERROR") or (Process3="")
- {
- IniWrite,Process3,%PATH1%\DATA\Config.ini:VAN:$DATA,PROCESS,P3
- }
- Iniread,TimerCheck,%PATH1%\DATA\Config.ini:VAN:$DATA,TIMERCOUNTDOWN,SECONDS
- if (TimerCheck="ERROR") or (TimerCheck="")
- {
- IniWrite,900000,%PATH1%\DATA\Config.ini:VAN:$DATA,TIMERCOUNTDOWN,SECONDS
- TimerCheck := 900000
- }
- ;~ --------------------------------------------------------------------------------------------------------
- Iniread,IDLEMODE,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,IDLEMODE
- if (IDLEMODE="ERROR" or IDLEMODE="")
- {
- IniWrite,0,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,IDLEMODE
- IDLEMODE := 0
- }
- Else if (IDLEMODE==1)
- {
- Iniread,IDLETIME,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,IDLE
- if (IDLETIME="ERROR" or IDLETIME="")
- {
- IniWrite,1800000,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,IDLE
- IDLETIME := 1800000
- }
- }
- Else
- {
- IDLEMODE :=0
- }
- ;~ ------------------------------------------------------------------------------------------------------------
- SetTimer,UsedTime,%TimerCheck%
- TM := 0
- UsedTime:
- ;~ ----------------------------------------------------------FORCE LOGOUT---------------------------------------
- IniRead,LOGPC,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,COMPUTER,PC
- If (LOGPC not == A_ComputerName)
- {
- ExitApp
- }
- Gosub, ShieldPointsCheckProcess
- if (TTodayProcess >= TimeLess)
- {
- ;~ -------------------------------------------------------------------------------------------------------------
- TM++
- Process,exist,%Process1%
- If (errorlevel)
- {
- TM := (TM+Boost1)
- }
- Else
- {
- Process,exist,%Process2%
- if (errorlevel)
- {
- TM := (TM+Boost2)
- }
- else
- {
- Process,exist,%Process3%
- if (errorlevel)
- {
- TM := (TM+Boost3)
- }
- }
- }
- }
- Iniwrite, %TM%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
- TempoTOTALPoints := (TM+MyPoints)
- GuiControl,,TotalP,GPoints : %TempoTOTALPoints%
- if (EVENT=1)
- {
- TempoEVPoints := (TM+TOTPOINTREG)
- GuiControl,1:,EVPoints,EventPoints : %TempoEVPoints%
- }
- ;~ --------------------------DETECT IDLE-----------------------------------------------------------
- if (IDLEMODE==1)
- {
- IfGreater,A_TimeIdle,%IDLETIME%
- {
- Gosub, Button_LogOut
- Gosub, Delete_Online
- }
- }
- return
- }
- else
- {
- Gosub, Invalid
- }
- }
- else
- {
- Gosub,Invalid
- }
- }
- }
- return
- ;~ ------------------------------------------------------------------------------------------------------------------------
- LogIn_Add:
- IniRead,TotPoint,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
- IfExist,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA
- {
- IniRead,LastPoint,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
- }
- else
- {
- MyPoints := 0
- }
- If (LastPoint > 1)
- {
- PointAdd := (LastPoint+TotPoint)
- IniWrite, %PointAdd%,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
- }
- return
- Button_Reg:
- Gui,1:Hide
- Gui,2:Hide
- Gui,3:Submit,Nohide
- Gui,3:Show,w350 h200, Register
- return
- Button_Redeem:
- Gui,5:Submit,Nohide
- Gui,5:Show, x10 y%YD% w250 h410, Inbox
- Loop,read,%PATH1%\GPoints\%User_Name%\MyRewards.file:VAN:$DATA
- {
- ListReward2 := A_LoopReadLine
- {
- GuiControl,5:,List1,%ListReward2%
- }
- }
- return
- Button_RegTour:
- Gui,+OwnDialogs
- MsgBox, 262180, Message, Do you want to use your G-points?
- IfMsgBox,Yes
- {
- IfNotExist,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
- {
- FileAppend,,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
- Gosub, Participants
- }
- else
- {
- Gosub, Participants
- }
- }
- else
- {
- MsgBox, 262192, Warning, No G-Points deducted!
- }
- return
- Button_Minimize:
- TrayTip, GPoints, Started!,,
- Gui,1:hide
- Gui,5:hide
- return
- Button_LogOut:
- If (MemPass = True)
- {
- Gosub, Logout_Account
- Gosub, Delete_Online
- Gosub, ShieldPointsCheck
- MemPass := False
- Reload
- }
- else if(Admin = true)
- {
- Reload
- }
- return
- ;~ -----------------------REwards--------------------
- Member_Status:
- Gui,4:Submit,Nohide
- If (MemPass = True)
- {
- Gui,1:Hide
- Gui,4:Show, w630 h550, Rewards
- ;~ ------------------------------------------------------
- }
- Return
- Not_Enough_Points:
- Gui,+OwnDialogs
- MsgBox, 262160, Message, You don't have enough GPoints!
- return
- Button_Redeem1:
- Rewardnumber := "R1"
- RName := "R1.dat"
- Gosub, Read_Rewards
- Rewards = %RReward1%
- Gosub, Calculate_Rewards
- return
- Button_Redeem2:
- Rewardnumber := "R2"
- RName := "R2.dat"
- Gosub, Read_Rewards
- Rewards = %RReward2%
- Gosub, Calculate_Rewards
- return
- Button_Redeem3:
- Rewardnumber := "R3"
- RName := "R3.dat"
- Gosub, Read_Rewards
- Rewards = %RReward3%
- Gosub, Calculate_Rewards
- return
- Button_Redeem4:
- Rewardnumber := "R4"
- RName := "R4.dat"
- Gosub, Read_Rewards
- Rewards = %RReward4%
- Gosub, Calculate_Rewards
- return
- Button_Redeem5:
- Rewardnumber := "R5"
- RName := "R5.dat"
- Gosub, Read_Rewards
- Rewards = %RReward5%
- Gosub, Calculate_Rewards
- return
- Button_Redeem6:
- Rewardnumber := "R6"
- RName := "R6.dat"
- Gosub, Read_Rewards
- Rewards = %RReward6%
- Gosub, Calculate_Rewards
- return
- Button_Redeem7:
- Rewardnumber := "R7"
- RName := "R7.dat"
- Gosub, Read_Rewards
- Rewards = %RReward7%
- Gosub, Calculate_Rewards
- return
- Button_Redeem8:
- Rewardnumber := "R8"
- RName := "R8.dat"
- Gosub, Read_Rewards
- Rewards = %RReward8%
- Gosub, Calculate_Rewards
- return
- Button_Redeem9:
- Rewardnumber := "R9"
- RName := "R9.dat"
- Gosub, Read_Rewards
- Rewards = %RReward9%
- Gosub, Calculate_Rewards
- return
- Monitor_Online:
- Gui,1:Hide
- IfNotExist,GPoint Admin Panel12.ahk
- MsgBox,File is missing!
- else
- Run, GPoint Admin Panel12.ahk
- ExitApp
- return
- ;~ ---------------------------Emergency Exit--------
- Open_Gpoints:
- Gui,1:Show
- return
- Delete_Online:
- FileRemoveDir,%PATH1%\Online\%User_Name%,1
- return
- Invalid:
- GuiControl,1:Hide,VAN2
- GuiControl,1:hide,InvalidOnline
- GuiControl,Show,Invalid
- GuiControl,,User_Name
- GuiControl,,Password1
- return
- Logout_Account:
- IF (MemPass = True)
- {
- IniWrite,%A_ComputerName%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,COMPUTER,PC
- IniWrite,%A_MM%/%A_DD%/%A_Year%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Date
- IniWrite,%A_Hour%:%A_Min%:%A_Sec%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Time
- IniWrite,%A_Hour%:%A_Min%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Mins
- IniWrite,%A_YYYY%%A_MM%%A_DD%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Time,Count
- IniWrite,%A_YYYY%%A_MM%%A_DD%%A_Hour%%A_Min%%A_Sec%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Minsec
- Gosub, ShieldPoints
- }
- return
- Announce_ment:
- IFExist, %PATH1%\DATA\Announcement.dat:VAN:$DATA
- {
- Fileread, Announcement, %PATH1%\DATA\Announcement.dat:VAN:$DATA
- if (Announcement="ERROR" or Announcement="")
- {
- Announcement := "`n `n `n -Created by : VANHEARTNET"
- }
- }
- else
- {
- FileAppend,`n`n`n-Created by: VANHEARTNET,%PATH1%\DATA\Announcement.dat:VAN:$DATA
- Announcement := "`n `n `n -Created by : VANHEARTNET"
- }
- Gui, 1:Add, text,cwhite x400 y430 w385 vAbout, %Announcement%
- return
- Announcement_title:
- IFExist, %PATH1%\DATA\Announcement_Title.dat:VAN:$DATA
- {
- Fileread,AnnouncementTitle,%PATH1%\DATA\Announcement_Title.dat:VAN:$DATA
- if (AnnouncementTitle="ERROR" or AnnouncementTitle="")
- {
- FileAppend,GPOINTS,%PATH1%\DATA\Announcement_Title.dat:VAN:$DATA
- AnnouncementTitle := "GPOINTS"
- }
- }
- else
- {
- FileAppend,GPOINTS,%PATH1%\DATA\Announcement_Title.dat:VAN:$DATA
- AnnouncementTitle := "GPOINTS"
- }
- Gui, 1:Add, text,cLime x400 y414 w385 vAbout1,%AnnouncementTitle%
- return
- Read_Rewards:
- Iniread, User_GPoints,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
- Iniread,RReward1,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ1
- Iniread,RReward2,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ2
- Iniread,RReward3,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ3
- Iniread,RReward4,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ4
- Iniread,RReward5,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ5
- Iniread,RReward6,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ6
- Iniread,RReward7,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ7
- Iniread,RReward8,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ8
- Iniread,RReward9,%PATH1%\DATA\Config.ini:VAN:$DATA,REWARDS,REQ9
- IniRead,Rw1,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R1
- IniRead,Rw2,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R2
- IniRead,Rw3,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R3
- IniRead,Rw4,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R4
- IniRead,Rw5,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R5
- IniRead,Rw6,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R6
- IniRead,Rw7,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R7
- IniRead,Rw8,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R8
- IniRead,Rw9,%PATH1%\DATA\Config.ini:VAN:$DATA,Reward text,R9
- return
- CopyRewards:
- FileDelete,%PATH1%\Rewards\Temp\%RName%
- 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
- FileAppend,%1st%`n,%PATH1%\GPoints\%User_Name%\MyRewards.file:VAN:$DATA
- return
- Calculate_Rewards:
- IfNotExist, %PATH1%\Rewards\%RName%
- {
- IfNotExist, %PATH1%\Rewards\Temp\%RName%
- {
- MsgBox, 262160, ERROR, There is NO available Rewards`n`nPoints Refunded!
- loop 10
- FileAppend,EMPTY`n,%PATH1%\Rewards\%RName%:VAN:$DATA
- return
- }
- else
- {
- FileMove,%PATH1%\Rewards\Temp\%RName%,%PATH1%\Rewards,1
- return
- }
- }
- If (User_GPoints>=Rewards)
- {
- Gui,+OwnDialogs
- MsgBox, 262180,Message,Are you sure You want to use your points?
- IfMsgBox Yes
- {
- Gui,4:Hide
- ;~ ---------------------------INPUT PASSWORD---------------------------------
- InputBox,InsertPass,Authentication,Please Enter your Password,Hide,180,120,
- If (Errorlevel=0)
- {
- If (Password_Ini==InsertPass)
- {
- ;~ --------------------------------------------------------------------------
- Deducted := (User_GPoints-Rewards)
- IniWrite,%Deducted%,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
- GuiControl,1:,TotalP,GPoints : %Deducted%
- MyPoints := Deducted
- Gui,+OwnDialogs
- MsgBox,262208,Thank You!, Success!!!`n`nYour remaining Points is %Deducted%
- Loop,%PATH1%\\Rewards\*.dat
- {
- fileName := A_LoopFileName
- if (RName==fileName)
- {
- FileMove,%PATH1%\Rewards\%RName%,%PATH1%\Rewards\Temp,1
- FileReadLine,1st,%PATH1%\Rewards\Temp\%RName%:VAN:$DATA,1
- if (1st="")
- {
- IniWrite,% User_GPoints,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
- GuiControl,1:,TotalP,GPoints : %User_GPoints%
- MsgBox, 262160, Warning, There is an ERROR occured!`nThere is NO available Rewards`n`nPoints Refunded!
- Gui,1:Show
- return
- }
- else if (1st="EMPTY")
- {
- IniWrite,% User_GPoints,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
- GuiControl,1:,TotalP,GPoints : %User_GPoints%
- FileMove,%PATH1%\Rewards\Temp\%RName%,%PATH1%\Rewards,1
- MsgBox, 262160, Warning, There is an ERROR occured!`nThere is NO available Rewards`n`nPoints Refunded!
- Gui,1:Show
- return
- }
- Loop,read,%PATH1%\Rewards\Temp\%RName%:VAN:$DATA
- {
- Loop,parse,A_LoopReadLine, `n
- {
- if (A_LoopField!=1st)
- {
- FileAppend,%A_LoopField%`n,%PATH1%\Rewards\%RName%:VAN:$DATA
- }
- }
- }
- }
- }
- Gui,+OwnDialogs
- MsgBox, 262176, Message,Please copy the pin before pressing OK!`nPIN : %1st%`n`nYour Code will be sent to your Inbox...
- Gui,4:Show
- Gosub,Button_Redeem
- Gosub, CopyRewards
- }
- else
- {
- Gui,+OwnDialogs
- MsgBox,262160,Error, Wrong password!
- Gui,4:Show
- }
- }
- else
- {
- Gui,4:Show
- }
- }
- else
- {
- Gui,4:Hide
- Gui,+OwnDialogs
- MsgBox,262208,Message,No Points Deducted!!!
- Gui,4:Show
- }
- }
- else
- {
- Gosub,Not_Enough_Points
- }
- return
- ;~ -----------------------------------------TOTAL ACCUMULATED POINTS--------------------- >>>>>>>>>>>dec01
- ACTReg:
- Iniread,EVENT,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,EVENT
- if (EVENT="ERROR" or EVENT="")
- {
- IniWrite,0,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,EVENT
- EVENT:=0
- }
- Else if (EVENT==1)
- {
- IniRead,MemberEVPoints,%PATH1%\GPoints\%User_Name%\info.ini:VAN:$DATA,Accumulated Points, Total
- if (MemberEVPoints="ERROR" or MemberEVPoints="")
- {
- MemberEVPoints := 0
- Iniwrite,0,%PATH1%\GPoints\%User_Name%\info.ini:VAN:$DATA,Accumulated Points, Total
- Gui, 1:Add, Text, x350 y1 w180 cYellow +BackgroundTrans vEVPoints, EventPoints : %MemberEVPoints%
- }
- else
- {
- Gui, 1:Add, Text, x350 y1 w180 cYellow +BackgroundTrans vEVPoints, EventPoints : %MemberEVPoints%
- IniRead,ACCU,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
- if (ACCU > 1)
- {
- TOTPOINTREG := (MemberEVPoints+ACCU)
- IniWrite,%TOTPOINTREG%,%PATH1%\GPoints\%User_Name%\info.ini:VAN:$DATA,Accumulated Points, Total
- GuiControl,1:,EVPoints,EventPoints : %TOTPOINTREG%
- }
- else
- {
- TOTPOINTREG = %MemberEVPoints%
- GuiControl,1:,EVPoints,EventPoints : %TOTPOINTREG%
- }
- }
- }
- else
- {
- IniDelete,%PATH1%\GPoints\%User_Name%\info.ini:VAN:$DATA,Accumulated Points, Total
- }
- ;~ #########################################EVENT################################
- return
- Participants:
- Gui,4:submit,nohide
- FileRead,ParTC,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
- If (ParTC="ERROR") or (ParTC="")
- {
- Iniread,ReqPoints,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,Tournament Points
- If (MyPoints>=ReqPoints)
- {
- DeductTour := (MyPoints-ReqPoints)
- IniWrite,%DeductTour%,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
- MsgBox, 262208, Success, Thank You!`nYou can now Participate.
- FileAppend,%User_Name%`n,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
- GuiControl,4:Disable, ButtonRegisterTour
- GuiControl,4:,ButtonRegisterTour,PLAYER ACCEPTED
- }
- else
- {
- MsgBox, 262192, Warning, Sorry, You do not have enough G-Points!
- return
- }
- }
- Else IfNotInString,ParTC,|%User_Name%|
- {
- Iniread,ReqPoints,%PATH1%\DATA\Config.ini:VAN:$DATA,Settings,Tournament Points
- If (MyPoints>=ReqPoints)
- {
- DeductTour := (MyPoints-ReqPoints)
- IniWrite,%DeductTour%,%PATH1%\\GPoints\%User_Name%\Info.ini:VAN:$DATA,TOTAL,Points
- MsgBox, 262208, Success, Thank You!`nYou can now Participate.
- FileAppend,|%User_Name%|`n,%PATH1%\\Rewards\Participants.txt:VAN:$DATA
- }
- else
- {
- MsgBox, 262192, Warning, Sorry, You do not have enough G-Points!
- return
- }
- }
- else
- {
- MsgBox, 262160, Warning, You cannot Register twice!
- }
- return
- ShieldPoints:
- Iniread,ShieldDateLOGIN,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Date
- Iniread,ShieldDateLOGOUT,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Date
- if (ShieldDateLOGIN==ShieldDateLOGOUT)
- {
- Iniread,ShieldTimeIN,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Mins
- Iniread,ShieldTimeOUT,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Mins
- If(ShieldTimeIN==ShieldTimeOUT)
- {
- IniWrite,0,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
- }
- else if (ShieldTimeIN="ERROR") or (ShieldTimeIN="")
- {
- IniWrite,%A_Hour%:%A_Min%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Mins
- }
- else if (ShieldTimeOUT="ERROR") or (ShieldTimeOUT="")
- {
- IniWrite,%A_Hour%:%A_Min%,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-OUT,Mins
- }
- }
- else
- {
- IniRead,LastPoint1,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
- If (LastPoint1 > 1)
- {
- Gui,+OwnDialogs
- MsgBox, 262208,Thank You!,%LastPoint1% points has been added to your Account!,5
- }
- }
- return
- ShieldPointsCheck:
- TimeToday = %A_YYYY%%A_MM%%A_DD%%A_Hour%%A_Min%%A_Sec% ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>NOTE: ALWAYS COMPLETE FROM YEAR-SECS
- IniRead,SpentTime,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Minsec
- EnvSub, TimeSpent, DTime
- TimeSpent -= DTime
- TToday = %TimeToday%
- TSpent = %SpentTime%
- EnvSub, TToday, %TSpent%, Minutes
- if (TToday <= TimeLess)
- {
- IniWrite,0,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,Last Point, Count
- }
- return
- ShieldPointsCheckProcess:
- TimeToday = %A_YYYY%%A_MM%%A_DD%%A_Hour%%A_Min%%A_Sec%
- IniRead,SpentTimeProcess,%PATH1%\GPoints\%User_Name%\logs.ini:VAN:$DATA,LOG-IN,Minsec
- EnvSub, TimeSpentProcess, DTimeProcess
- TimeSpentProcess -= DTimeProcess
- TTodayProcess = %TimeToday%
- TSpentProcess = %SpentTimeProcess%
- EnvSub, TTodayProcess, %TSpentProcess%, Minutes
- return
- ;~ -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Exit:
- GuiClose:
- If (MemPass = True)
- {
- Gosub, Logout_Account
- Gosub, Delete_online
- Gosub, ExitOnly
- }
- Else if (Admin = True)
- {
- ExitApp
- }
- else
- Gosub, ExitOnly
- return
- 3GuiClose:
- GuiControl,3:,UserNameReg
- GuiControl,3:,PasswordReg
- GuiControl,3:,PasswordConfirm
- Gui,3:Hide
- Gui,1:Show
- return
- 4GuiClose:
- Gui,4:Hide
- Gui,1:Show
- return
- 5GuiClose:
- Gui,5:Hide
- ;~ Gui,4:Show
- return
- 6GuiClose:
- GuiControl,,OldPassword
- GuiControl,,NewPassword
- GuiControl,,ConfirmPassword
- Gui,6:Hide
- Gui,1:Show
- return
- ExitOnly:
- ExitApp
Add Comment
Please, Sign In to add comment