home *** CD-ROM | disk | FTP | other *** search
- dim Your_ID as string
- dim Your_Password as string
- dim Birthday as string
- dim League_Member as integer
- dim League_Member_Dues_AutoPay as integer
- dim League_Member_Dues_Paytime as string
- dim League_Member_Dues_Payto as string
- dim League_Member_Dues as integer
- dim League_Member_Brief as string
- dim Foundation_Wp as integer
- dim Foundation_Wp_AutoSave as integer
- dim Foundation_Wp_ID as string
- dim Foundation_Wp_Max as integer
- dim Foundation_Wp_Save as integer
- dim Foundation_Wp_Brief as String
- dim Xin_Liang_AutoSold as integer
- dim Xin_Liang_Max as integer
- dim Xin_Liang_Sold as integer
- dim Xyd_AutoSold as integer
- dim Xyd_AutoBuy as integer
- dim Xyd_Max as integer
- dim Xyd_Sold as integer
- dim Dun_Max as integer
- dim Xyd_Buy as integer
- dim Upload_Wanted as integer
- dim Upload_File_Name(6) as string
- dim Upload_File_Brief(6) as string
- dim Download_Wanted as integer
- dim Download_File_Area(6) as string
- dim Download_File_Name(6) as string
- dim Pkzip_Dir as string
- dim Temp_Dir as string
- dim Msg_Upload_Dir as string
- dim Msg_Download_Dir as string
-
- dim MsgPack_file_name as string
- dim DownLoad_Ok(6) as string
- dim Upload_Ok(6) as string
- dim DownLoad_File_Number as integer
- dim subject as string
-
- sub Read_Data
- dim Rectemp as string
- dim temp as string
- dim Item as string
- dim value as string
- open configscriptpath+"\westpont.ini" for input as #1
- read_next:
- receive #1,Rectemp
- temp=ltrim(rectemp)
- if instr(temp,"=")=0 or len(temp)=0 or left(temp,1)=chr(13) or left(temp,1)=";" then goto read_next
- if instr(temp,";")<>0 then temp=left(temp,instr(temp,";")-1)
- item=rtrim(left(temp,instr(temp,"=")-1))
- value=ltrim(rtrim(right(temp,len(temp)-instr(temp,"="))))
- if item="Your_ID" then Your_ID=value
- if item="Your_Password" then Your_Password=value
- if item="Birthday" then Birthday=value
- if item="League_Member" then League_Member=val(value)
- if item="League_Member_Dues_AutoPay" then League_Member_Dues_AutoPay=val(value)
- if item="League_Member_Dues_Paytime" then League_Member_Dues_Paytime=value
- if item="League_Member_Dues_Payto" then League_Member_Dues_Payto=value
- if item="League_Member_Dues" then League_Member_Dues=val(value)
- if item="League_Member_Brief" then League_Member_Brief=value
- if item="Foundation_Wp" then Foundation_Wp=val(value)
- if item="Foundation_Wp_AutoSave" then Foundation_Wp_AutoSave=val(value)
- if item="Foundation_Wp_ID" then Foundation_Wp_ID=value
- if item="Foundation_Wp_Max" then Foundation_Wp_Max=val(value)
- if item="Foundation_Wp_Save" then Foundation_Wp_Save=val(value)
- if item="Foundation_Wp_Brief" then Foundation_Wp_Brief=value
- if item="Xin_Liang_AutoSold" then Xin_Liang_AutoSold=val(value)
- if item="Xin_Liang_Max" then Xin_Liang_Max=val(value)
- if item="Xin_Liang_Sold" then Xin_Liang_Sold=val(value)
- if item="Xyd_AutoSold" then XYD_AutoSold=val(value)
- if item="Xyd_AutoBuy" then XYD_AutoBuy=val(value)
- if item="Xyd_Max" then XYD_Max=val(value)
- if item="Xyd_Sold" then XYD_Sold=val(value)
- if item="Dun_Max" then Dun_Max=val(value)
- if item="Xyd_Buy" then Xyd_Buy=val(value)
- if item="Upload_Wanted" then Upload_Wanted=val(value)
- if item="Upload_File1_Name" then Upload_File_Name(1)=value
- if item="Upload_File1_Brief" then Upload_File_Brief(1)=value
- if item="Upload_File2_Name" then Upload_File_Name(2)=value
- if item="Upload_File2_Brief" then Upload_File_Brief(2)=value
- if item="Upload_File3_Name" then Upload_File_Name(3)=value
- if item="Upload_File3_Brief" then Upload_File_Brief(3)=value
- if item="Upload_File4_Name" then Upload_File_Name(4)=value
- if item="Upload_File4_Brief" then Upload_File_Brief(4)=value
- if item="Upload_File5_Name" then Upload_File_Name(5)=value
- if item="Upload_File5_Brief" then Upload_File_Brief(5)=value
- if item="Upload_File6_Name" then Upload_File_Name(6)=value
- if item="Upload_File6_Brief" then Upload_File_Brief(6)=value
- if item="Download_Wanted" then Download_Wanted=val(value)
- if item="Download_File1_Area" then
- Download_File_Area(1)=value
- if value<>"" then Download_File_Number=Download_File_Number+1
- end if
- if item="Download_File1_Name" then Download_File_Name(1)=value
- if item="Download_File2_Area" then
- Download_File_Area(2)=value
- if value<>"" then Download_File_Number=Download_File_Number+1
- end if
- if item="Download_File2_Name" then Download_File_Name(2)=value
- if item="Download_File3_Area" then
- Download_File_Area(3)=value
- if value<>"" then Download_File_Number=Download_File_Number+1
- end if
- if item="Download_File3_Name" then Download_File_Name(3)=value
- if item="Download_File4_Area" then
- Download_File_Area(4)=value
- if value<>"" then Download_File_Number=Download_File_Number+1
- end if
- if item="Download_File4_Name" then Download_File_Name(4)=value
- if item="Download_File5_Area" then
- Download_File_Area(5)=value
- if value<>"" then Download_File_Number=Download_File_Number+1
- end if
- if item="Download_File5_Name" then Download_File_Name(5)=value
- if item="Download_File6_Area" then
- Download_File_Area(6)=value
- if value<>"" then Download_File_Number=Download_File_Number+1
- end if
- if item="Download_File6_Name" then Download_File_Name(6)=value
- if item="Pkzip_Dir" then Pkzip_Dir=value
- if item="Temp_Dir" then Temp_Dir=value
- if item="Msg_Upload_Dir" then Msg_Upload_Dir=value
- if item="Msg_Download_Dir" then Msg_Download_Dir=value
- if not eof(1) then goto Read_Next
- close #1
- end sub
-
- sub Sold_Xyd
- dim xyd_You_Have as integer
- xyd_You_Have=val(chr(screen(7,33))+chr(screen(7,34))+chr(screen(7,35)))
- if xyd_You_Have>=Xyd_Max then
- DELAY 0.1
- SEND "2";
- WAITFOR "╢α╔┘╕÷╨┼╙├╡π :"
- DELAY 0.1
- SEND str(Xyd_Sold)
- WAITFOR "╛═╛÷╢¿┬⌠┬≡? (Y/n)"
- DELAY 0.1
- SEND "y";
- WAITFOR "╢▄ "
- DELAY 0.1
- SEND
- WAITFOR "╖╓):"
- end if
- end sub
-
- sub Buy_Xyd
- dim dun_You_Have as integer
- dun_You_Have=val(chr(screen(6,57))+chr(screen(6,58))+chr(screen(6,59))+chr(screen(6,60)))
- if Dun_You_Have>=Dun_Max then
- SEND "b";
- WAITFOR "╥¬┬≥╢α╔┘╕÷╨┼╙├╡π :"
- DELAY 0.1
- SEND str(Xyd_Buy)
- WAITFOR "╛÷╢¿╥¬┬≥┬≡? (Y/n)"
- DELAY 0.1
- SEND "y";
- WAITFOR "): "
- end if
- end sub
-
- sub Sold_Xin_Liang
- dim xin_liang_You_Have as integer
- dim temp as string
- SEND "5";
- WAITFOR "╗╣─▄┬⌠"
- receive temp
- xin_liang_You_Have=val(ltrim(left(temp,5)))
- if xin_liang_You_Have>=Xin_Liang_Max then
- WAITFOR "╦π╥¬┬⌠│÷╢α╔┘╖Γ╨┼ :"
- delay 0.1
- SEND str(Xin_Liang_Sold)
- WAITFOR "╛═╛÷╢¿┬⌠┬≡? (Y/n)"
- delay 0.1
- SEND "y";
- WAITFOR "╢▄ "
- delay 0.1
- SEND
- WAITFOR "╖╓):"
- else
- delay 0.1
- SEND
- WAITFOR "╖╓):"
- end if
- end sub
-
- sub Saveto_Foundation_Wp
- dim dun_You_Have as integer
- dun_You_Have=val(chr(screen(6,57))+chr(screen(6,58))+chr(screen(6,59))+chr(screen(6,60)))
- if dun_You_Have>=Foundation_Wp_Max then
- DELAY 0.1
- SEND "t";
- WAITFOR "░╤╟«╫¬╡╜╦¡╡─╒╩╗º :"
- DELAY 0.1
- SEND Foundation_Wp_ID
- WAITFOR "╔┘╟«╡╜┤╦╚╦╡─╒╩╗º :"
- DELAY 0.1
- SEND Str(Foundation_Wp_Save)
- WAITFOR "╝≥╡Ñ╡─╕╜╤╘: "
- DELAY 0.1
- SEND Foundation_Wp_Brief
- WAITFOR Foundation_Wp_ID
- DELAY 0.1
- SEND
- WAITFOR "╖╓):"
- end if
- end sub
-
- sub Hand_In_League_Member_Dues
- dim dun_You_Have as integer
- dim Last_Dues_Month as integer
- dim Last_Dues_Year as integer
- dim This_Month as integer
- dim This_Year as integer
- dun_You_Have=val(chr(screen(6,57))+chr(screen(6,58))+chr(screen(6,59))+chr(screen(6,60)))
- if ltrim(League_Member_Dues_Paytime)<>"" then
- Last_Dues_Month=val(mid(League_Member_Dues_Paytime,4,2))
- Last_Dues_Year=val(left(League_Member_Dues_Paytime,2))
- end if
- This_Month=val(mid(date,4,2))
- This_Year=val(left(date,2))
-
- if Last_Dues_Month < This_Month+12*(This_Year-Last_Dues_Year) then
- if dun_You_Have>=League_Member_Dues then
- DELAY 0.1
- SEND "t";
- WAITFOR "░╤╟«╫¬╡╜╦¡╡─╒╩╗º :"
- DELAY 0.1
- SEND League_Member_Dues_Payto
- WAITFOR "╔┘╟«╡╜┤╦╚╦╡─╒╩╗º :"
- DELAY 0.1
- SEND Str(League_Member_Dues)
- WAITFOR "╝≥╡Ñ╡─╕╜╤╘: "
- DELAY 0.1
- SEND League_Member_Brief
- WAITFOR League_Member_Dues_Payto
- DELAY 0.1
- SEND
- WAITFOR "╖╓):"
- League_Member_Dues_Paytime=date
- end if
- end if
- end sub
-
- sub Xyd_Enough
- dim dun_You_Have as integer
- dim xyd_You_Have as integer
- dun_You_Have=val(chr(screen(6,57))+chr(screen(6,58))+chr(screen(6,59))+chr(screen(6,60)))
- xyd_You_Have=val(chr(screen(7,33))+chr(screen(7,34))+chr(screen(7,35)))
- if Xyd_You_Have<DownLoad_File_Number and Dun_You_Have>=5*(DownLoad_File_Number - Xyd_You_Have) then
- SEND "b";
- WAITFOR "╥¬┬≥╢α╔┘╕÷╨┼╙├╡π :"
- DELAY 0.1
- SEND str(DownLoad_File_Number - Xyd_You_Have)
- WAITFOR "╛÷╢¿╥¬┬≥┬≡? (Y/n)"
- DELAY 0.1
- SEND "y";
- WAITFOR "): "
- end if
- end sub
-
-
- sub Download_Start
- dim temp as string
- dim Count as integer
- SEND "f";
- WAITFOR "): "
-
- for Count=1 to 6
- if Download_File_Area(Count)="" then goto Next_Count
- SEND "a";
- WAITFOR "╝╠╨°(Y/n/=)?"
- SEND "y";
- WAITFOR "─·╧δ╤í╘±──╕÷╟°: "
- SEND Download_File_Area(Count)
- WAITFOR "): "
- SEND "d";
- WAITFOR "╬─╝■: "
- SEND Download_File_Name(Count)
- receive temp
- receive temp
- receive temp
- receive temp
- receive temp
- if len(temp) >= 4 then
- WAITFOR "(Yes/No/Quit): "
- SEND "y";
- WAITFOR "(Enter - ╝╠╨°):"
- SEND
- WAITFOR "┤½╦═╨¡╥Θ, (A)╖┼╞·: "
- SEND "s";
- WAITFOR "B00"
- DOWNLOAD "", Zmodem
- WAITFOR "): "
- DownLoad_OK(Count)=Chr(13)+Chr(10)+Download_File_Name(Count)+" ╬─╝■╧┬╘╪│╔╣ª! ┬╖╛╢╬¬ "+configdownloadpath+"\"+Download_File_Name(Count)
- Download_File_Area(Count)=""
- Download_File_Name(Count)=""
- else
- WAITFOR "╬─╝■: "
- send
- WAITFOR "): "
- DownLoad_OK(Count)=Chr(13)+Chr(10)+Download_File_Name(Count)+" ╬─╝■╧┬╘╪╩º░▄!"
- end if
- Next_Count:
- Next Count
-
- SEND "-";
- WAITFOR "): "
- end sub
-
- sub Upload_start
- dim temp as string
- dim Count as integer
- SEND "f";
- WAITFOR "): "
-
- for Count=1 to 6
- if Upload_File_Name(Count)="" then goto Next_Count
- SEND "u";
- WAITFOR "protocol, (A)bort: "
- SEND "s";
- WAITFOR ""
- UPLOAD Upload_File_Name(Count), Zmodem
- receive temp
- if instr(temp,"000") = 0 then
- delay 4
- SEND Upload_File_Brief(Count)
- WAITFOR "): "
- Upload_ok(Count)=Chr(13)+Chr(10)+Upload_File_Name(Count)+" ╬─╝■╔╧╘╪│╔╣ª!"
- Upload_File_Name(Count)=""
- Upload_File_Brief(Count)=""
- else
- SEND "";
- delay 0.1
- SEND "";
- delay 0.1
- SEND "";
- delay 0.1
- SEND "";
- delay 0.1
- SEND "";
- WAITFOR "): "
- Upload_ok(Count)=Chr(13)+Chr(10)+Upload_File_Name(Count)+" ╬─╝■╔╧╘╪╩º░▄!"
- end if
- Next_Count:
- next Count
-
- SEND "-";
- WAITFOR "): "
- end sub
-
-
- sub Money_Txt_Fix
- dim i as integer
- dim j as integer
- dim z as string*1
- dim lf as string*1
- Dim Count as integer
- lf=chr(10)
- open Temp_Dir+"\money.txt" for random as #1 len=1
- for i=1 to lof(1)
- get #1,i,z
- if z="┌" then
- get #1,i+1,z
- if z="─" then
- for j=0 to 17
- put #1,i-1+80*j,lf
- next j
- put #1,i-1+80*18-1,lf
- i=i-1+80*18-1
- end if
- end if
- next i
- for Count=1 to 6
- print #1,DownLoad_OK(Count)
- print #1,Upload_OK(Count)
- Next Count
- close #1
- end sub
-
- sub Write_TO_INI
- open configscriptpath+"\westpont.ini" for output as #1
- print #1,"Your_ID="+Your_ID
- print #1,"Your_Password="+Your_Password
- print #1,"Birthday="+Birthday
- print #1,"League_Member="+str(League_Member)
- print #1,"League_Member_Dues_AutoPay="+str(League_Member_Dues_AutoPay)
- print #1,"League_Member_Dues_Paytime="+League_Member_Dues_Paytime
- print #1,"League_Member_Dues_Payto="+League_Member_Dues_Payto
- print #1,"League_Member_Dues="+str(League_Member_Dues)
- print #1,"League_Member_Brief="+League_Member_Brief
- print #1,"Foundation_Wp="+str(Foundation_Wp)
- print #1,"Foundation_Wp_AutoSave="+str(Foundation_Wp_AutoSave)
- print #1,"Foundation_Wp_ID="+Foundation_Wp_ID
- print #1,"Foundation_Wp_Max="+str(Foundation_Wp_Max)
- print #1,"Foundation_Wp_Save="+str(Foundation_Wp_Save)
- print #1,"Foundation_Wp_Brief="+Foundation_Wp_Brief
- print #1,"Xin_Liang_AutoSold="+str(Xin_Liang_AutoSold)
- print #1,"Xin_Liang_Max="+str(Xin_Liang_Max)
- print #1,"Xin_Liang_Sold="+str(Xin_Liang_Sold)
- print #1,"Xyd_AutoSold="+str(Xyd_AutoSold)
- print #1,"Xyd_AutoBuy="+str(Xyd_AutoBuy)
- print #1,"Xyd_Max="+str(Xyd_Max)
- print #1,"Xyd_Sold="+str(Xyd_Sold)
- print #1,"Dun_Max="+str(Dun_Max)
- print #1,"Xyd_Buy="+str(Xyd_Buy)
- print #1,"Upload_Wanted="+str(Upload_Wanted)
- print #1,"Upload_File1_Name="+Upload_File_Name(1)
- print #1,"Upload_File1_Brief="+Upload_File_Brief(1)
- print #1,"Upload_File2_Name="+Upload_File_Name(2)
- print #1,"Upload_File2_Brief="+Upload_File_Brief(2)
- print #1,"Upload_File3_Name="+Upload_File_Name(3)
- print #1,"Upload_File3_Brief="+Upload_File_Brief(3)
- print #1,"Upload_File4_Name="+Upload_File_Name(4)
- print #1,"Upload_File4_Brief="+Upload_File_Brief(4)
- print #1,"Upload_File5_Name="+Upload_File_Name(5)
- print #1,"Upload_File5_Brief="+Upload_File_Brief(5)
- print #1,"Upload_File6_Name="+Upload_File_Name(6)
- print #1,"Upload_File6_Brief="+Upload_File_Brief(6)
- print #1,"Download_Wanted="+str(Download_Wanted)
- print #1,"Download_File1_Area="+Download_File_Area(1)
- print #1,"Download_File1_Name="+Download_File_Name(1)
- print #1,"Download_File2_Area="+Download_File_Area(2)
- print #1,"Download_File2_Name="+Download_File_Name(2)
- print #1,"Download_File3_Area="+Download_File_Area(3)
- print #1,"Download_File3_Name="+Download_File_Name(3)
- print #1,"Download_File4_Area="+Download_File_Area(4)
- print #1,"Download_File4_Name="+Download_File_Name(4)
- print #1,"Download_File5_Area="+Download_File_Area(5)
- print #1,"Download_File5_Name="+Download_File_Name(5)
- print #1,"Download_File6_Area="+Download_File_Area(6)
- print #1,"Download_File6_Name="+Download_File_Name(6)
- print #1,"Pkzip_Dir="+Pkzip_Dir
- print #1,"Temp_Dir="+Temp_Dir
- print #1,"Msg_Upload_Dir="+Msg_Upload_Dir
- print #1,"Msg_Download_Dir="+Msg_Download_Dir
- close #1
- end Sub
-
-
- timeout 100
-
- Read_Data
-
- del Temp_Dir+"\money.txt"
-
- if Upload_Wanted=0 and Download_Wanted=0 then
- dial Search "╬≈╡π"
- else
- if timer>=5*3600 and timer<= 13*3600 then
- dial Search "╬≈╡π"
- else
- dial search "╬≈╡π╢■╧▀"
- end if
- end if
- WAITFOR "West-Point"
- SEND "";
- WAITFOR "your full name: "
- SEND Your_ID
- WAITFOR "├▄┬δ: "
- SEND Your_Password
- WAITFOR " (Enter) ╝ⁿ╝╠╨° ..."
- when match "MM-DD-YY" do send Birthday
- SEND
- WAITFOR "╕°─·╡─╨┼╝■Y (Y/n)? "
- SEND "n";
- WAITFOR "▓Θ╨┬╜°╬─╝■N (y/N)? "
- SEND "n";
- WAITFOR "╝╠╨°(Y/n/=)?"
- SEND "n";
- WAITFOR "): "
- if exists(Msg_Upload_Dir+"\Westpont.new") then
- SEND "u";
- WAITFOR ""
- UPLOAD Msg_Upload_Dir+"\Westpont.new", Zmodem
- DEL Msg_Upload_Dir+"\Westpont.new"
- WAITFOR "): "
- end if
- SEND "d";
- WAITFOR "File Name:"
- receive MsgPack_file_name
- WAITFOR "B00"
- DOWNLOAD Msg_Download_Dir, Zmodem
- WAITFOR "): "
- SEND "k";
- WAITFOR "╖╓):",15
- capture Temp_Dir+"\money.txt"
- delay 1
- send
- WAITFOR "╖╓):"
-
- if Xyd_AutoSold=1 then Sold_Xyd
-
- if Xyd_AutoBuy=1 then Buy_Xyd
-
- if Xin_Liang_AutoSold=1 then Sold_Xin_Liang
-
- if Foundation_Wp_AutoSave=1 and Foundation_Wp=1 then SaveTo_Foundation_Wp
-
- if League_Member_Dues_AutoPay=1 and League_Member=1 then Hand_In_League_Member_Dues
-
- if Download_Wanted=1 then Xyd_Enough
-
- capture off
- delay 2
- SEND "-";
- WAITFOR "): "
- delay 0.5
- goto f
-
- catch Err_timeout
- f:
- if Upload_Wanted=1 then Upload_start
- if Download_Wanted=1 then Download_start
-
- Money_Txt_Fix
-
- delay 2
- if instr(MsgPack_file_name,"WESTPONT")<>0 then
- MsgPack_file_name=mid(MsgPack_file_name,instr(MsgPack_file_name,"WESTPONT"),12)
- shell Pkzip_Dir+"\pkzip -a "+Msg_Download_Dir+"\"+MsgPack_file_name+" "+Temp_Dir+"\money.txt"
- end if
- delay 1
- SEND "!";
- WAITFOR "): "
-
- Write_TO_INI
-
- delay 2
- SEND "!";
- del Temp_Dir+"\money.txt"
- system
-
-
-
-