[REL][SOURCE]More HC presents[SOURCE][REL]
Hi, this is a very simple source code, but I want to post it :)
Whit this source you could give members more than only 12 HC presents...
Code:
hcpresent(0) = ReadINI("HC", "present1", SettingIni) 'read saved presents
hcpresent(1) = ReadINI("HC", "present2", SettingIni)
hcpresent(2) = ReadINI("HC", "present3", SettingIni)
hcpresent(3) = ReadINI("HC", "present4", SettingIni)
hcpresent(4) = ReadINI("HC", "present5", SettingIni)
hcpresent(5) = ReadINI("HC", "present6", SettingIni)
hcpresent(6) = ReadINI("HC", "present7", SettingIni)
hcpresent(7) = ReadINI("HC", "present8", SettingIni)
hcpresent(8) = ReadINI("HC", "present9", SettingIni)
hcpresent(9) = ReadINI("HC", "present10", SettingIni)
hcpresent(10) = ReadINI("HC", "present11", SettingIni)
hcpresent(11) = ReadINI("HC", "present12", SettingIni)
hcpresent(12) = ReadINI("HC", "present13", SettingIni)
hcpresent(13) = ReadINI("HC", "present14", SettingIni)
hcpresent(14) = ReadINI("HC", "present15", SettingIni)
If Val(hmonth) > 10 And Val(hmonth) <= 19 Then hmonth = Val(hmonth) - 9 'fix months who are highter than 10
If Val(hmonth) > 19 And Val(hmonth) <= 28 Then hmonth = Val(hmonth) - 18
PresentBoxContent = ""
ToGet = Split(hcpresent(hmonth), ";")
First = Split(hcpresent(hmonth), ";")(1)
For a = 1 To UBound(ToGet) 'start creating furni(s)
If Len(ToGet(a)) > 2 Then
If Left(ToGet(a), 4) = "door" Then 'teleporters
OldCount = Val(FSO.OpenTextFile(DBP & "furni\count.txt", ForReading).ReadAll)
TheCount1 = OldCount + 1
TheCount2 = TheCount1 + 1
FSO.OpenTextFile(DBP & "furni\count.txt", ForWriting).Write TheCount2
FSO.CopyFolder DBP & "buy_furni\club_furni\" & ToGet(a), DBP & "furni\" & TheCount1
FSO.CopyFolder DBP & "buy_furni\club_furni\" & ToGet(a), DBP & "furni\" & TheCount2
FSO.CreateTextFile (DBP & "furni\" & TheCount1 & "\destination.txt")
FSO.OpenTextFile(DBP & "furni\" & TheCount1 & "\destination.txt", ForWriting).Write TheCount2
FSO.CreateTextFile (DBP & "furni\" & TheCount2 & "\destination.txt")
FSO.OpenTextFile(DBP & "furni\" & TheCount2 & "\destination.txt", ForWriting).Write TheCount1
PresentBoxContent = TheCount1 & ";" & TheCount2 & ";"
Else 'no teleporters
OldCount = Val(FSO.OpenTextFile(DBP & "furni\count.txt", ForReading).ReadAll)
TheCount = OldCount + 1
FSO.OpenTextFile(DBP & "furni\count.txt", ForWriting).Write TheCount
FSO.CopyFolder DBP & "buy_furni\club_furni\" & ToGet(a), DBP & "furni\" & TheCount
PresentBoxContent = PresentBoxContent & TheCount & ";"
End If
End If
Next a
OldCount = Val(FSO.OpenTextFile(DBP & "furni\count.txt", ForReading).ReadAll) 'create the present
TheCount = OldCount + 1
FSO.OpenTextFile(DBP & "furni\count.txt", ForWriting).Write TheCount
FSO.CopyFolder DBP & "buy_furni\club_furni\present", DBP & "furni\" & TheCount
FSO.OpenTextFile(DBP & "furni\" & TheCount & "\inbox.txt", ForWriting).Write PresentBoxContent 'write content
FSO.OpenTextFile(DBP & "furni\" & TheCount & "\inboxid.txt", ForWriting).Write "3 " & First 'write "First present" for the Icon
Randomize Timer 'generate Present color
pnum = Int(7 * Rnd)
If pnum = 0 Then pnum = ""
PresentName = "present_gen" & pnum
FSO.OpenTextFile(DBP & "furni\" & TheCount & "\name.txt", ForWriting).Write PresentName
FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\hand.txt", ForAppending).Write ";" & TheCount
FSO.OpenTextFile(DBP & "furni\" & TheCount & "\var.txt", ForWriting).Write "H!" & locale("club_gift_name")
End Function
Public Function HClub_backuponly(ByVal Index As Integer, thmonth As String)
Dim hcpresent(0 To 10) As String
Dim Presents As String
Dim PresentBoxContent As String
Dim OldCount As String
Dim TheCount As String
Dim hmonth As String
hmonth = thmonth
hcpresent(0) = ";club_sofa" 'set presents
hcpresent(1) = ";aqua_chair;aqua_chair;aqua_chair;aqua_chair;aqua_table"
hcpresent(2) = ";mocchamaster"
hcpresent(3) = ";edicehc"
hcpresent(4) = ";hcamme"
hcpresent(5) = ";doorD"
hcpresent(6) = ";hcsohva"
hcpresent(7) = ";hc_lmp"
hcpresent(8) = ";hc_tbl"
hcpresent(9) = ";hc_chr"
hcpresent(10) = ";hc_dsk"
hcpresent(11) = ";YOUR_PRESENT_CODE"
hcpresent(12) = ";YOUR_PRESENT_CODE"
hcpresent(13) = ";YOUR_PRESENT_CODE"
hcpresent(14) = ";YOUR_PRESENT_CODE"
hcpresent(15) = ";YOUR_PRESENT_CODE"
Quote:
Originally Posted by
Nillus
It goes in modHabboClub.bas. =]
It'll make it able that you can have more than 12 Club Presents.
Waves'
Nillus
Nillus said where to put this source, DON'T EXCHANGE EVERYTHING INSIDE modHabboClub, than can you make your source stuck!!!
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
And where must that go, in source? :p
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
It would help to say where to ADD :/
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
Hmmm.. useful
Ill give it a try thanks
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
Easy, but code is the sort of thing that SHOULD be released on this forum. Keep it up. =D
Regards,
Alex
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
It goes in modHabboClub.bas. =]
It'll make it able that you can have more than 12 Club Presents.
Waves'
Nillus
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
I think its useless, any retro i know doesnt last more then 4 months without changing a server
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
Quote:
Originally Posted by
StickHotel
I think its useless, any retro i know doesnt last more then 4 months without changing a server
Thats What I Was Thinking, Let alone a Year.
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
Quote:
Originally Posted by
StickHotel
I think its useless, any retro i know doesnt last more then 4 months without changing a server
agreeedd but i think ill keep the sercer im using as we have to many regestered users and yer
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
Which is why we are constantly trying to develop a stable server release, so there's no need to change databases.
Regards,
Alex
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
Its still a usefull source
Re: [REL][SOURCE]More HC presents[SOURCE][REL]
Quote:
Originally Posted by
4rr0w5
It would help to say where to ADD :/
It would help if you actually knew how to code.