Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub socket_Close(Index As Integer)
- If Index > 0 Then
- TimerUpdate(Index).Enabled = False
- TimerTeleport1(Index).Enabled = False
- TimerTeleport2(Index).Enabled = False
- TimerWave(Index).Enabled = False
- TimerTalk(Index).Enabled = False
- TimerGesture(Index).Enabled = False
- TimerDrink(Index).Enabled = False
- TimerVanish(Index).Enabled = False
- UseTimer(Index).Enabled = False
- TimerVote(Index).Enabled = False
- TimerDC(Index).Enabled = False
- 'client
- Client(Index).App = ""
- Client(Index).Name = ""
- Client(Index).Rank = 0
- Client(Index).Sex = ""
- Client(Index).Mission = ""
- Client(Index).Badge = ""
- Client(Index).BadgeOn = 0
- Client(Index).Rank = ""
- 'pet part
- Kamer = Client(Index).InRoom
- If Kamer > 0 Then
- InRoom = 0
- For b = 1 To frmMain.SockI
- If Client(b).InRoom = Kamer Then
- InRoom = InRoom + 1
- End If
- Next b
- If InRoom = 1 Then
- 'rollers
- splitP = Split(Replace(frmMain.LoadedRollers, ">", ""), "<")
- For b = 0 To UBound(splitP)
- If splitP(b) <> "" Then
- FType = FSO.OpenTextFile(DBP & "furni\" & splitP(b) & "\type.txt", ForReading).ReadAll
- FRoom = FSO.OpenTextFile(DBP & "furni\" & splitP(b) & "\inroom.txt", ForReading).ReadAll
- 'roller
- If FType = "roller" And FRoom = Kamer Then
- frmMain.LoadedRollers = Replace(frmMain.LoadedRollers, "<" & splitP(b) & ">", "")
- End If
- 'roller
- End If
- Next b
- 'rollers
- Hpets2 = ""
- splitP = Split(frmMain.Hpets, ";")
- For b = 0 To UBound(splitP)
- If splitP(b) <> "" Then
- If Pet(splitP(b)).InRoom = Kamer Then
- Unload frmMain.PetTimer(splitP(b))
- Nums = Replace(Nums, "<" & splitP(b) & ">", "")
- 'save status
- WriteINI "pet", "alive", Pet(splitP(b)).Alive, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "drinktimer", Pet(splitP(b)).DrinkTimer, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "eattimer", Pet(splitP(b)).EatTimer, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "sleep", Pet(splitP(b)).Sleep, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "sleeptimer", Pet(splitP(b)).SleepTimer, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "sleepduration", Pet(splitP(b)).SleepDuration, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "he", Pet(splitP(b)).He, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "look", Mid(Pet(splitP(b)).Look, 1, InStr(Pet(splitP(b)).Look, ",") - 1), DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "posx", Pet(splitP(b)).PosX, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "posy", Pet(splitP(b)).PosY, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "sit", Pet(splitP(b)).Sit, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "lay", Pet(splitP(b)).Lay, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "gesture", Pet(splitP(b)).Gesture, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "action", Pet(splitP(b)).Action, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- WriteINI "pet", "actiontype", Pet(splitP(b)).Actiontype, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
- 'save status
- Pet(splitP(b)).Name = ""
- Else
- Hpets2 = Hpets2 & splitP(b) & ";"
- End If
- End If
- Next b
- frmMain.Hpets = Hpets2
- End If
- 'pet part
- End If
- Nums = Replace(Nums, "<" & Client(Index).Num & ">", "")
- Client(Index).Num = 0
- Client(Index).InRoom = 0
- Client(Index).Sit = False
- Client(Index).RollerUpdate = False
- Client(Index).Lay = False
- Client(Index).Wave = False
- Client(Index).Dance = False
- Client(Index).Trading = False
- Client(Index).Update = False
- Client(Index).TelMove = False
- Client(Index).Teled = False
- Client(Index).DoDrink = False
- Client(Index).Dancetype = ""
- Client(Index).NoDrink = True
- Client(Index).UseItem = False
- Client(Index).Carrying = 0
- TimerVanish(Index).Enabled = False
- TimerDrink(Index).Enabled = False
- Client(Index).PosX = 0
- Client(Index).PosY = 0
- Client(Index).He = "0.0"
- Client(Index).DestX = 0
- Client(Index).DestY = 0
- Client(Index).TelX = 0
- Client(Index).TelY = 0
- Client(Index).TelHe = ""
- Client(Index).Look = ""
- Client(Index).Gesture = ""
- Client(Index).Talking = False
- Client(Index).HandPage = 0
- Client(Index).Publicname = ""
- Client(Index).Publicnum = 0
- If Client(Index).TradingWith <> "" Then
- Hab_AF "AF", Index
- Client(Index).TradingWith = ""
- End If
- 'client
- FreeSockets = FreeSockets & "<" & Index & ">"
- End If
- End Sub
- Private Sub socket_ConnectionRequest(Index As Integer, ByVal requestID As Long)
- If Index = 0 Then
- Dim NewI As Integer
- If FreeSockets = "" Then
- NewI = SockI + 1
- SockI = SockI + 1
- Load socket(NewI)
- Load TimerUpdate(NewI)
- Load TimerTeleport1(NewI)
- Load TimerTeleport2(NewI)
- Load TimerTeleport3(NewI)
- Load TimerVote(NewI)
- Load TimerWave(NewI)
- Load TimerTalk(NewI)
- Load TimerGesture(NewI)
- Load TimerDrink(NewI)
- Load TimerVanish(NewI)
- Load UseTimer(NewI)
- Load TimerDC(NewI)
- ReDim Preserve Client(NewI)
- Else
- NewI = Replace(Split(FreeSockets, ">")(0), "<", "")
- FreeSockets = Replace(FreeSockets, "<" & NewI & ">", "")
- Unload socket(NewI)
- Load socket(NewI)
- End If
- On Error Resume Next
- TimerUpdate(NewI).Enabled = True
- socket(NewI).Accept requestID
- socket(NewI).SendData "@@" & Chr(1)
- End If
- End Sub
- Private Sub socket_DataArrival(Index As Integer, ByVal bytesTotal As Long)
- On Error GoTo fuckyomom
- Dim info As String
- Dim Offset As Integer
- Dim TheNum As Integer
- Dim ToDo() As String
- Dim P As Integer
- Dim FindIt As String
- Dim NewInfo As String
- socket(Index).GetData info
- reloop:
- ReDim Preserve ToDo(Offset) As String
- TheNum = Decode(Mid(info, 1, 3))
- ToDo(Offset) = Mid(info, 4, TheNum)
- info = Right(info, Len(info) - TheNum - 3)
- Offset = Offset + 1
- If Len(info) >= 1 Then GoTo reloop
- For P = 0 To UBound(ToDo)
- NewInfo = ToDo(P)
- FindIt = Left(NewInfo, 2)
- '''''' CHECK FOR INFOBUS PACKETS THE ONLY WAY I KNOW HOW ''''''
- Dim counter1 As Integer
- Dim countervotes As Integer
- If NewInfo = "Ap1" Then
- counter1 = frmTab_publicroom_infobus.AnumA.Text
- countervotes = frmTab_publicroom_infobus.votestotal.Text
- countervotes = countervotes + 1
- counter1 = counter1 + 1
- frmTab_publicroom_infobus.AnumA.Text = counter1
- frmTab_publicroom_infobus.votestotal.Text = countervotes
- ElseIf NewInfo = "Ap2" Then
- counter2 = frmTab_publicroom_infobus.AnumB.Text
- countervotes = frmTab_publicroom_infobus.votestotal.Text
- countervotes = countervotes + 1
- counter2 = counter2 + 1
- frmTab_publicroom_infobus.AnumB.Text = counter2
- frmTab_publicroom_infobus.votestotal.Text = countervotes
- ElseIf NewInfo = "Ap3" Then
- counter3 = frmTab_publicroom_infobus.AnumC.Text
- countervotes = frmTab_publicroom_infobus.votestotal.Text
- countervotes = countervotes + 1
- counter3 = counter3 + 1
- frmTab_publicroom_infobus.AnumC.Text = counter3
- frmTab_publicroom_infobus.votestotal.Text = countervotes
- ElseIf NewInfo = "Ap4" Then
- counter4 = frmTab_publicroom_infobus.AnumD.Text
- countervotes = frmTab_publicroom_infobus.votestotal.Text
- countervotes = countervotes + 1
- counter4 = counter4 + 1
- frmTab_publicroom_infobus.AnumD.Text = counter4
- frmTab_publicroom_infobus.votestotal.Text = countervotes
- ElseIf NewInfo = "Ap5" Then
- counter5 = frmTab_publicroom_infobus.AnumE.Text
- countervotes = frmTab_publicroom_infobus.votestotal.Text
- countervotes = countervotes + 1
- counter5 = counter5 + 1
- frmTab_publicroom_infobus.AnumE.Text = counter5
- frmTab_publicroom_infobus.votestotal.Text = countervotes
- ElseIf NewInfo = "Ap6" Then
- counter6 = frmTab_publicroom_infobus.AnumF.Text
- countervotes = frmTab_publicroom_infobus.votestotal.Text
- countervotes = countervotes + 1
- counter6 = counter6 + 1
- frmTab_publicroom_infobus.AnumF.Text = counter6
- frmTab_publicroom_infobus.votestotal.Text = countervotes
- End If
- frmTab_publicroom_infobus.votestotal.Visible = True
- '''''' CHECK FOR INFOBUS PACKETS THE ONLY WAY I KNOW HOW ''''''
- BusLayout = ReadINI("config", "infobus_layout", DBP & "configuration\settings.ini")
- If NewInfo = "BVHPWI" Then
- Send Index, "C\HPWH" & locale("pub_categorie_staff") & "HIQlIIThe InfobusRCRLPWpark[g}Hhh_room_park_" & BusLayout & ",hh_room_parkHI"
- End If
- If NewInfo = "BVHSTI" Then
- Send Index, "C\HSTH" & locale("pub_categorie3") & "RAP|KQeI" & locale("pub_name_19") & "HRLSTrooftopYEjHhh_room_rooftopHIPFI" & locale("pub_name_20") & "JRGSThabburger'sYgiHhh_room_habburgerHIRII" & locale("pub_name_21") & "PAPJSTpizzeriaYliHhh_room_pizzaHIPKI" & locale("pub_name_23") & "HRLSTthe_dirty_duck_pubXgiHhh_room_pubHISGI" & locale("pub_name_22") & "HPJSTice_cafeYjiHhh_room_" & ReadINI("config", "cafe_layout", DBP & "configuration\settings.ini") & "HISFI" & locale("pub_name_24") & "HRGSThotel_kitchenXjiHhh_room_kitchenHI"
- End If
- If NewInfo = "BVHP`I" Then
- Send Index, "C\HP`H" & locale("pub_categorie4") & "HR[KSUI" & locale("pub_name_25") & "HPOP`club_mammothYviHhh_room_clubmammothHIPVI" & locale("pub_name_26") & "HRLP`orientZviHhh_room_orientHI"
- End If
- If NewInfo = "BVHPUI" Then
- Send Index, "C\HPUH" & locale("pub_categorie5") & "HPrKQCH" & locale("pub_categorie11") & "HP^PURJI" & locale("pub_name_29") & "HPTPUthe_chromide_clubXiiHhh_room_discoHI"
- End If
- If NewInfo = "BVHQCI" Then
- Send Index, "C\HQCH" & locale("pub_categorie11") & "HP^PUPGI" & locale("pub_name_27") & "HPOQCclub_massivaZmiHhh_room_barHIQGI" & locale("pub_name_28") & "HPOQCclub_massivaZmiIhh_room_barHI"
- End If
- If NewInfo = "BVHRcI" Then
- Send Index, "C\HRcH" & locale("pub_categorie6") & "RCR~KREI" & locale("pub_name_30") & "QARQRchabbo_lido[siHhh_room_pool,hh_people_poolHISEI" & locale("pub_name_32") & "QBPORcrooftop_rumbleYkiHhh_room_terrace,hh_paalu,hh_people_pool,hh_people_paaluHIQII" & locale("pub_name_33") & "HPORcparkYtiHhh_room_park_" & BusLayout & ",hh_room_parkHI"
- End If
- If NewInfo = "BVHQUI" Then
- Pub = "C\HQUH" & locale("pub_categorie1") & "SAPrKQJI" & locale("pub_name_6") & "SAPYQUtheatredromeZgiHhh_room_" & ReadINI("config", "theater_layout", DBP & "configuration\settings.ini") & "HIQEI" & locale("pub_name_11") & "HPOQUhabbo_cinemaYiiHhh_room_cinemaHIPEI" & locale("pub_name_12") & "HPJQUeric's_eaterieZiiHhh_room_ericsHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHSeI" Then
- Pub = "C\HSeH" & locale("pub_categorie7") & "H[]AKPfH" & locale("pub_categorie12") & "HSRSeQfH" & locale("pub_categorie13") & "HSRSeRfH" & locale("pub_categorie14") & "HSRSeSfH" & locale("pub_categorie15") & "HRLSeQgH" & locale("pub_categorie16") & "HPYSe"
- Send Index, Pub
- End If
- If NewInfo = "BVHPfI" Then
- Pub = "C\HPfH" & locale("pub_categorie7") & "HSRSeRgI" & locale("pub_categorie12") & " " & "1" & "HQFPfsw_lobby_beginner_0[GjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHISgI" & locale("pub_categorie12") & " " & "2" & "HQFPfsw_lobby_beginner_1XHjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHIPhI" & locale("pub_categorie12") & " " & "3" & "HQFPfsw_lobby_beginner_2YHjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHQfI" Then
- Pub = "C\HQfH" & locale("pub_categorie13") & "HSRSePjI" & locale("pub_categorie13") & " " & "1" & "HQFQfsw_lobby_amateur_0YJjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHIQjI" & locale("pub_categorie13") & " " & "2" & "HQFQfsw_lobby_amateur_1ZJjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHIRjI" & locale("pub_categorie13") & " " & "3" & "HQFQfsw_lobby_amateur_2[JjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHSfI" Then
- Pub = "C\HSfH" & locale("pub_categorie15") & "HRLSeRmI" & locale("pub_categorie15") & " " & "1" & "HQFSfsw_lobby_expert_0[MjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHISmI" & locale("pub_categorie15") & " " & "2" & "HQFSfsw_lobby_expert_1XNjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHSVI" Then
- Pub = "C\HSVH" & locale("pub_categorie8") & "KXMHKQWH" & locale("pub_name_7") & "IXzCSVRWH" & locale("pub_name_8") & "HX}ASVSWH" & locale("pub_name_9") & "HXKASVPXH" & locale("pub_name_10") & "JXKASV"
- Send Index, Pub
- End If
- If NewInfo = "BVHQWI" Then
- Pub1 = "C\HQWH" & locale("pub_name_7") & "HXzCSVSZI" & locale("pub_name_7") & " " & "1" & "HPYQWbb_lobby_beginner_0XyiHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIP[I" & locale("pub_name_7") & " " & "2" & "HPYQWbb_lobby_beginner_1YziHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIQ[I" & locale("pub_name_7") & " " & "3" & "HPYQWbb_lobby_beginner_2ZziHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIR[I" & locale("pub_name_7") & " " & "4" & "HPYQWbb_lobby_beginner_3[ziHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIS[I" & locale("pub_name_7") & " " & "5" & "HPYQWbb_lobby_beginner_4X{iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIP\I" & locale("pub_name_7") & " " & "6" & "HPYQWbb_lobby_beginner_5Y{iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIQ\I" & locale("pub_name_7") & " " & "7" & "HPYQWbb_lobby_beginner_6Z{iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesys"
- Pub2 = "HIR\I" & locale("pub_name_7") & " " & "8" & "HPYQWbb_lobby_beginner_7[{iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIS\I" & locale("pub_name_7") & " " & "9" & "HPYQWbb_lobby_beginner_8X|iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIP]I" & locale("pub_name_7") & " " & "10"
- Pub3 = "HPYQWbb_lobby_beginner_9Y|iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHI"
- Send Index, Pub1 & Pub2 & Pub3
- End If
- If NewInfo = "BVHPdI" Then
- Pub = "C\HPdH" & locale("pub_categorie9") & "IPrKQFI" & locale("pub_name_34") & " " & "1" & "IPYPdhallwayZtiHhh_room_hallwayHIRFI" & locale("pub_name_34") & " " & "2" & "HPYPdhallway_ii[tiHhh_room_hallwayHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHRGI" Then
- Pub = "C\HRGH" & locale("pub_categorie10") & "JPrKSCI" & locale("pub_name_35") & "IPJRGcunning_fox_gamehall[iiHhh_room_gamehall,hh_gamesHIPDI" & locale("pub_name_36") & "IPJRGcunning_fox_gamehall[iiIhh_room_gamehall,hh_gamesHIQDI" & locale("pub_name_37") & "HPJRGcunning_fox_gamehall[iiJhh_room_gamehall,hh_gamesHIRDI" & locale("pub_name_38") & "HPJRGcunning_fox_gamehall[iiKhh_room_gamehall,hh_gamesHISDI" & locale("pub_name_39") & "HPJRGcunning_fox_gamehall[iiPAhh_room_gamehall,hh_gamesHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHRWI" Then
- Pub = "C\HRWH" & locale("pub_name_8") & "HX}ASVQ]I" & locale("pub_name_8") & " " & "1" & "HPYRWbb_lobby_amateur_0ZyiHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIR]I" & locale("pub_name_8") & " " & "2" & "HPYRWbb_lobby_amateur_1Z|iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIS]I" & locale("pub_name_8") & " " & "3" & "HPYRWbb_lobby_amateur_2[|iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIP^I" & locale("pub_name_8") & " " & "4" & "HPYRWbb_lobby_amateur_3X}iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIQ^I" & locale("pub_name_8") & " " & "5" & "HPYRWbb_lobby_amateur_4Y}iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHSWI" Then
- Pub = "C\HSWH" & locale("pub_name_9") & "HXKASVR^I" & locale("pub_name_9") & " " & "1" & "HPYSWbb_lobby_intermediate_0[yiHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIS^I" & locale("pub_name_9") & " " & "2" & "HPYSWbb_lobby_intermediate_1Z}iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIP_I" & locale("pub_name_9") & " " & "3" & "HPYSWbb_lobby_intermediate_2[}iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHPXI" Then
- Pub = "C\HPXH" & locale("pub_name_10") & "HXKASVQ_I" & locale("pub_name_10") & " " & "1" & "HPYPXbb_lobby_expert_0XziHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIR_I" & locale("pub_name_10") & " " & "2" & "HPYPXbb_lobby_expert_1X~iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHIS_I" & locale("pub_name_10") & " " & "3" & "HPYPXbb_lobby_expert_2Y~iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHQgI" Then
- Pub = "C\HQgH" & locale("pub_categorie16") & "KPYSeSpI" & locale("pub_categorie16") & " " & "1" & "JQFQgsw_lobby_free_0XQjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHIPqI" & locale("pub_categorie16") & " " & "2" & "IQFQgsw_lobby_free_1YQjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHIQqI" & locale("pub_categorie16") & " " & "3" & "HQFQgsw_lobby_free_2ZQjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHIRqI" & locale("pub_categorie16") & " " & "4" & "HQFQgsw_lobby_free_3[QjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHRfI" Then
- Pub = "C\HRfH" & locale("pub_categorie14") & "HSRSePlI" & locale("pub_categorie14") & " " & "1" & "HQFRfsw_lobby_intermediate_0YLjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHIQlI" & locale("pub_categorie14") & " " & "2" & "HQFRfsw_lobby_intermediate_1ZLjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHIRlI" & locale("pub_categorie14") & " " & "3" & "HQFRfsw_lobby_intermediate_2[LjHhh_gamesys,hh_game_snowwar,hh_game_snowwar_room,hh_game_snowwar_uiHI"
- Send Index, Pub
- End If
- If NewInfo = "BVHRTI" Then
- Send Index, "C\HRTH" & locale("pub_categorie2") & "HPYKRBI" & locale("pub_name_15") & "HQFRTbasement_lobby[giHhh_room_floorlobbiesHIRHI" & locale("pub_name_16") & "HQFRTmain_lobby[fiHhh_room_lobbyHIPII" & locale("pub_name_17") & "HQFRTmedian_lobbyXhiHhh_room_floorlobbiesHISII" & locale("pub_name_18") & "HQFRTskylight_lobbyYhiHhh_room_floorlobbiesHI"
- End If
- If NewInfo = "AJJ100/DOOROPEN/TRUE" Then
- Number = ReadINI("config", "infobus_drink", DBP & "configuration\settings" & ".ini")
- WriteINI "config", "infobus_drink", Number + 1, DBP & "configuration\" & "\settings.ini"
- Client(Index).Carrying = Number
- Client(Index).Dance = True
- extbt = extbt & "drink " & Client(Index).Carrying & "/"
- Client(Index).DoDrink = False
- Client(Index).Update = True
- If Number = "25" Then
- WriteINI "config", "infobus_drink", "1", DBP & "configuration\" & "\settings.ini"
- End If
- End If
- If NewInfo = "AO10 0" Then
- Client(Index).Dancetype = "carryd Special Debbo" Or Client(Index).Dancetype = "carryd Sinas" Or Client(Index).Dancetype = "carryd cola" Or Client(Index).Dancetype = "carryd milk"
- Client(Index).Dance = True
- Client(Index).DoDrink = False
- Client(Index).Update = True
- End If
- If NewInfo = "BiH" Then
- If Client(Index).Publicnum = 30 Then
- Client(Index).Publicnum = 24
- Send Index, "AEbb_arena_1 11727"
- End If
- End If
- If NewInfo = Aj Then
- frmMain.socket(a).SendData "BK" & "Public room information:" & "<br>" & "Your name: " & Client(Index).Name & "<br>" & "Publicnumber: " & Client(Index).Publicnum & "<br>" & "PosX: " & Client(Index).PosX & "<br>" & "PosY: " & Client(Index).PosY & "<br>" & "He: " & Client(Index).He & Chr(1)
- End If
- If NewInfo = "Aj0ada%040d%270a00dadadad%090adad0a%04ds00sss000wwsa0s0ds00w0da0s00s%040wswwds0d00w00ds00sswws00ss00sd%040" Then
- Send Index, "AGdoor open "
- End If
- If NewInfo = "Bc" Then
- If Client(Index).Publicnum = 30 Then
- Send Index, "DuIY^Sb0507Xs05087s30115s30113s21101ee52a0c187e97b9c769f9eb54f0cd8eb"
- End If
- End If
- If NewInfo = "Bb" Then
- If Client(Index).Publicnum = 30 Then
- Send Index, "CkPDfieldTypeHJIIIIQAmaximumSimultaneousPowerupsHIJIIIRBpowerupCreateChanceHIRLIIIPYnumTeamsHJJIJIPAcoloringForOpponentTimePulsesHISCIIIPYgameLengthSecondsHIPmIHHallowedPowerupsII1,2,3HcleaningTilesTimePulsesHISCIIIPYpowerupCreateFirstTimePulsesHIHIHIPYsecondsUntilRestartHIRGIHHpowerupTimeToLivePulsesHIPOIQAIPYpowerupCreateIntervalPulsesHIPEIQAIPYstunTimePulsesHIRBIIIPYhighJumpsTimePulsesHISCIIIPYnameIJHsecondsUntilStartHISCIHH"
- End If
- End If
- If NewInfo = "Bj" Then
- If Client(Index).Publicnum = 30 Then
- Client(Index).Publicnum = 35
- Send Index, "AEbb_arena_1 11727"
- If Client(Index).Publicnum = 35 Then
- Client(Index).He = 2
- Packet = FSO.OpenTextFile(DBP & "pub\" & Client(Index).Publicnum & "\packet.txt", ForReading).ReadAll
- Send Index, Packet
- End If
- End If
- End If
- If NewInfo = "BcPD@IfieldTypeHI@[maximumSimultaneousPowerupsHJ@SpowerupCreateChanceHRL@HnumTeamsHJ@]coloringForOpponentTimePulsesHSC@QgameLengthSecondsHPm@OallowedPowerupsI@E1,2,3@WcleaningTilesTimePulsesHSC@\powerupCreateFirstTimePulsesHH@SsecondsUntilRestartHRG@WpowerupTimeToLivePulsesHPO@[powerupCreateIntervalPulsesHPE@NstunTimePulsesHRB@ShighJumpsTimePulsesHSC@DnameI@DTest@QsecondsUntilStartHSCH" Then
- Send Index, "CkPDfieldTypeHJIIIIQAmaximumSimultaneousPowerupsHIJIIIRBpowerupCreateChanceHIRLIIIPYnumTeamsHJJIJIPAcoloringForOpponentTimePulsesHISCIIIPYgameLengthSecondsHIPmIHHallowedPowerupsII1,2,3HcleaningTilesTimePulsesHISCIIIPYpowerupCreateFirstTimePulsesHIHIHIPYsecondsUntilRestartHIRGIHHpowerupTimeToLivePulsesHIPOIQAIPYpowerupCreateIntervalPulsesHIPEIQAIPYstunTimePulsesHIRBIIIPYhighJumpsTimePulsesHISCIIIPYnameIJHsecondsUntilStartHISCIHH"
- End If
- If NewInfo = "Bl" Then
- If Client(Index).Publicnum = 30 Then
- Client(Index).Publicnum = 35
- Send Index, "AEbb_arena_1 11727"
- Send Index, "ChHIHANA kom hier!|tieneke156IQARB2 vs 2 no stealajaxhulpKSBNo stealhcrulzzJPC\o/martintje0IQClolololllollollloolllolloll--haboofan--IRC\o/martintje0J"
- Send Index, "CtJHIPBQBJRAHMHJQDPEJHHMIPBQBIKHJXzBX[BIH"
- Send Index, "DuKX@Ys14024s31027s18025s18023c003ad1c73932884422bcf4b205db45dbQLAb0911Xs02134s36044s42014s141045a46fd0238a13b758ec2633310285559YKts20027s43017s26027914462c14f8963b1b0291e884ffcaae2"
- Send Index, "CtJHISAPBJHHMHJSCPEJRAHMISAPBIKHJXzBX^BIH"
- Send Index, "@ZRAhihi"
- Send Index, "CtJHISASAJHHMHJRCPEJRAHMISASAIKHJXzBZ_BIH"
- Send Index, "CiIHANA kom hier!|tieneke156IJItieneke156Ihappystar271,2,3,4,9"
- Send Index, "CqYX}H"
- Send Index, "@S"
- End If
- End If
- If 1 = 1 Then
- If frmMain.chckLog.Value = 1 Then
- 'If FindIt = "AK" Then Exta = " [" & Decode(Mid(NewInfo, 3, 2)) & " " & Decode(Mid(NewInfo, 5, 2)) & "]" Else Exta = ""
- frmMain.txtLog.Text = frmMain.txtLog.Text + vbCrLf + "[" & Index & "] ›› " & NewInfo
- frmMain.txtLog.SelStart = Len(frmMain.txtLog.Text)
- End If
- End If
- 'HANDLING
- Select Case FindIt
- Case "CD" 'Connection request answer
- Client(Index).Close = 0
- Case "CJ" 'things
- Hab_CJ NewInfo, Index
- Case "@D" 'login
- Hab_AtD NewInfo, Index
- Case "At" 'Lido booth
- Dim NewPool As String
- NewPool = (Mid(NewInfo, 3, 100))
- If NewPool = "" Then NewPool = "."
- FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\poolfigure.txt", ForWriting).Write NewPool
- Client(Index).PoolDat = NewPool
- If Client(Index).PosX = 17 And Client(Index).PosY = 11 And Client(Index).Publicnum = 25 Then 'in booth 1
- For a = 1 To frmMain.SockI
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = Client(Index).Publicnum Then
- frmMain.socket(a).SendData "@\" & "i:" & Client(Index).Num & Chr(13) & "n:" & Client(Index).Name & Chr(13) & "f:" & Client(Index).App & Chr(13) & "l:" & Client(Index).PosX & " " & Client(Index).PosY & " " & Client(Index).He & Chr(13) & "c:" & Client(Index).Mission & Chr(13) & "s:" & Client(Index).Sex & Chr(13) & "b:" & Client(Index).Badge & Chr(13) & "p:" & Client(Index).PoolDat & Chr(1)
- frmMain.socket(a).SendData "AGcurtains1 open" & Chr(1)
- End If
- Next a
- frmMain.Lido1.Text = "0"
- Client(Index).DestX = 19
- Client(Index).DestY = 11
- ElseIf Client(Index).PosX = 17 And Client(Index).PosY = 9 And Client(Index).Publicnum = 25 Then 'in booth 2
- For a = 1 To frmMain.SockI
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = Client(Index).Publicnum Then
- frmMain.socket(a).SendData "@\" & "i:" & Client(Index).Num & Chr(13) & "n:" & Client(Index).Name & Chr(13) & "f:" & Client(Index).App & Chr(13) & "l:" & Client(Index).PosX & " " & Client(Index).PosY & " " & Client(Index).He & Chr(13) & "c:" & Client(Index).Mission & Chr(13) & "s:" & Client(Index).Sex & Chr(13) & "b:" & Client(Index).Badge & Chr(13) & "p:" & Client(Index).PoolDat & Chr(1)
- frmMain.socket(a).SendData "AGcurtains2 open" & Chr(1)
- End If
- Next a
- Send Index, "Aa"
- frmMain.Lido2.Text = "0"
- Client(Index).DestX = 19
- Client(Index).DestY = 9
- ElseIf Client(Index).PosX = 8 And Client(Index).PosY = 0 And Client(Index).Publicnum = 27 Then 'in Rumble booth 1
- For a = 1 To frmMain.SockI
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = Client(Index).Publicnum Then
- frmMain.socket(a).SendData "@\" & "i:" & Client(Index).Num & Chr(13) & "n:" & Client(Index).Name & Chr(13) & "f:" & Client(Index).App & Chr(13) & "l:" & Client(Index).PosX & " " & Client(Index).PosY & " " & Client(Index).He & Chr(13) & "c:" & Client(Index).Mission & Chr(13) & "s:" & Client(Index).Sex & Chr(13) & "b:" & Client(Index).Badge & Chr(13) & "p:" & Client(Index).PoolDat & Chr(1)
- frmMain.socket(a).SendData "AGcurtains1 open" & Chr(1)
- End If
- Next a
- Send Index, "Aa"
- frmMain.Rumble1.Text = "0"
- Client(Index).DestX = "8"
- Client(Index).DestY = "2"
- ElseIf Client(Index).PosX = 9 And Client(Index).PosY = 0 And Client(Index).Publicnum = 27 Then 'in Rumble booth 2
- For a = 1 To frmMain.SockI
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = Client(Index).Publicnum Then
- frmMain.socket(a).SendData "@\" & "i:" & Client(Index).Num & Chr(13) & "n:" & Client(Index).Name & Chr(13) & "f:" & Client(Index).App & Chr(13) & "l:" & Client(Index).PosX & " " & Client(Index).PosY & " " & Client(Index).He & Chr(13) & "c:" & Client(Index).Mission & Chr(13) & "s:" & Client(Index).Sex & Chr(13) & "b:" & Client(Index).Badge & Chr(13) & "p:" & Client(Index).PoolDat & Chr(1)
- frmMain.socket(a).SendData "AGcurtains2 open" & Chr(1)
- End If
- Next a
- Send Index, "Aa"
- frmMain.Rumble2.Text = "0"
- Client(Index).DestX = "9"
- Client(Index).DestY = "2"
- End If
- If NewInfo = "B`H" Then
- If Client(Index).Publicnum = 30 Then
- Client(Index).Publicnum = 30
- Client(Index).Publicname = locale("pub_name_30")
- Client(Index).Hotelpos = "I" & Client(Index).Publicname
- Send Index, "AEbb_arena_1 11727"
- End If
- End If
- If Client(Index).Publicnum = 30 Then
- If NewInfo = "BeHI" Then
- Send Index, "ISO" & Client(Index).Name
- End If
- End If
- '------------------TRAX--------------
- Case "CZ" 'Save Trax
- Dim Tape As String
- Tape = (Mid(NewInfo, 5, 10000))
- FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForWriting).Write Tape
- audio = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForReading).ReadAll
- Send Index, "PAJIIQBIJKPAQARASAPBQBJPBQBPPQPRPSPPQQQRQSQPR" & audio & Chr(13)
- Send Index, "Dm" & "PAJIIQBIJKPAQARASAPBQBJPBQBPPQPRPSPPQQQRQSQPR" & audio & Chr(1)
- Case "C]" 'Turn Machine on
- audio = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForReading).ReadAll
- sendAll "Dl" & audio & "PR" & Chr(1), Client(Index).InRoom
- Case "CY" 'Open Editor and load
- If FSO.FileExists(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix") = False Then
- FSO.CreateTextFile DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix"
- FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForWriting).Write "sound_set 1"
- End If
- If FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForReading).ReadAll = "" Then
- FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForWriting).Write "sound_set 1"
- End If
- audio = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForReading).ReadAll
- Send Index, "Dm" & "PAPAIKQBSDPEQERESEPFQFRFSFJQAQBQIRISIPJQJRJSJPKQKKIQBIJKPAQARASAPBQBPARAQBRKSKPLQLRLSLPMQMRMDl" & audio & Chr(1)
- sendAll "Dl" & audio & "PR" & Chr(1), Client(Index).InRoom
- '------------------TRAX--------------
- Case "Ak"
- DiveX = (Mid(NewInfo, 3, 3))
- DiveY = (Mid(NewInfo, 6, 6))
- AGLoc = (Mid(NewInfo, 3, 10))
- frmMain.LidoCammed.Text = Client(Index).Num
- sendAllP "AGBIGSPLASH position " & AGLoc & Chr(1) & "AGcam1 transition cameraPan@rAGcam1 targetcamera " & frmMain.LidoCammed.Text & "", 36
- frmMain.TimerDiveGuard.Enabled = False
- frmMain.TimerLidoVote.Enabled = True
- frmMain.LastDiver.Text = Client(Index).Name
- frmMain.LastDiverNum.Text = Client(Index).Num
- Send Index, "AJ20" & Chr(1)
- Client(Index).Dance = True
- Client(Index).Dancetype = "Swim"
- Client(Index).Dives = False
- Client(Index).PosX = DiveX
- Client(Index).PosY = DiveY
- Client(Index).He = "0"
- Client(Index).DestX = "20"
- Client(Index).DestY = "19"
- ''''voting''''
- Case "Ah" 'lido voting
- WantedVote = (Mid(NewInfo, 3, 3))
- If Client(Index).Dancetype = "Swim" = False And Client(Index).Vote = False And frmMain.TimerVote(Index).Enabled = False Then
- Client(Index).DestX = Client(Index).PosX
- Client(Index).DestY = Client(Index).PosY
- Client(Index).Dancetype = "sign " & WantedVote & ""
- Client(Index).Dance = True
- Client(Index).Vote = True
- frmMain.TimerVote(Index).Enabled = True
- ElseIf Client(Index).Dancetype = "Swim" = True Then
- Client(Index).DestX = Client(Index).PosX
- Client(Index).DestY = Client(Index).PosY
- Client(Index).Dancetype = "swim/sign " & WantedVote & ""
- Client(Index).Dance = True
- If Client(Index).SwimVote = False Then
- Client(Index).SwimVote = True
- frmMain.TimerVote(Index).Enabled = True
- End If
- End If
- If frmMain.TimerLidoVote.Enabled = True And (Client(Index).HasVoted = False) And (Client(Index).Name = LastDiver.Text = False) Then 'add users vote to the voting
- If WantedVote = "1" Then UsersRating = "4"
- If WantedVote = "2" Then UsersRating = "5"
- If WantedVote = "3" Then UsersRating = "6"
- If WantedVote = "4" Then UsersRating = "7"
- If WantedVote = "5" Then UsersRating = "8"
- If WantedVote = "6" Then UsersRating = "9"
- If WantedVote = "7" Then UsersRating = "10"
- frmMain.LidoVoteSum.Text = frmMain.LidoVoteSum.Text + Val(UsersRating)
- frmMain.LidoTotalVotes.Text = frmMain.LidoTotalVotes.Text + Val(1)
- Client(Index).HasVoted = True
- End If
- Case "Ai" 'tickets
- Dim TicketDat As String
- Dim TicketReceiver As String
- TicketDat = (Mid(NewInfo, 1, 3))
- TicketReceiver = (Mid(NewInfo, 6, 20))
- If TicketDat = "AiI" Then
- PlusTickets = 2
- CostTickets = 1
- ElseIf TicketDat = "AiJ" Then
- PlusTickets = 20
- CostTickets = 6
- End If
- If FSO.FolderExists(DBP & "habbos\" & LCase(TicketReceiver)) Then 'buy tickets for the specified Habbi
- Credits = FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\credits.txt", ForReading).ReadAll
- tickets = FSO.OpenTextFile(DBP & "habbos\" & LCase(TicketReceiver) & "\tickets.txt", ForReading).ReadAll
- If Credits >= Val(CostTickets) Then
- MyCredits = Credits - CostTickets
- MyTickets = tickets + PlusTickets
- FSO.OpenTextFile(DBP & "habbos\" & LCase(TicketReceiver) & "\tickets.txt", ForWriting).Write MyTickets
- FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\credits.txt", ForWriting).Write MyCredits
- For a = 1 To frmMain.SockI
- If frmMain.socket(a).State = sckConnected Then frmMain.socket(a).SendData "A|" & FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(a).Name) & "\tickets.txt", ForReading).ReadAll & Chr(1)
- Next a
- Send Index, "@F" & MyCredits & ".0" & Chr(1)
- Else 'alert the buyer hasn't enough credits
- Send Index, "AD" & Chr(1)
- End If
- Else 'alert that the user isn't found
- Send Index, "BK" & locale(buytickets_notfound) & Chr(1)
- End If
- Case "Aj"
- DiveDat = (Mid(NewInfo, 2, 10000))
- sendAllP "AJ" & Client(Index).Num & Chr(13) & DiveDat, 36
- Case "@H" 'get info
- Hab_Ath NewInfo, Index
- Case "@L" 'console shit, WORK IN THIS!
- Hab_AtL NewInfo, Index
- Case "@Z" 'get hc days badge(s) etc
- Hab_AtZ NewInfo, Index
- Case "B~" 'buy hc
- Hab_Bgolf NewInfo, Index
- Case "@I" 'update id (get)
- Hab_Ati NewInfo, Index
- Case "@l" 'update id
- Hab_Atl2 NewInfo, Index
- Case "BA" 'voucher
- Hab_BA NewInfo, Index
- Case "@]" 'create private room
- Hab_Athaak NewInfo, Index
- Case "BY" 'change category
- Hab_BY NewInfo, Index
- Case "@P" 'room list by name
- Hab_AtP NewInfo, Index
- Case "@Q" 'room list by query
- Hab_AtQ NewInfo, Index
- Case "BW" 'room list home
- Hab_BW NewInfo, Index
- Case "@U" 'room info
- Hab_AtU NewInfo, Index
- Case "BX" 'modify room
- Hab_BX NewInfo, Index
- Case "@Y" 'modify room
- Hab_AtY NewInfo, Index
- Case "@X" 'modify room
- Hab_AtX NewInfo, Index
- Case "B[" 'remove all rights
- Hab_Bhaak NewInfo, Index
- Case "@W" 'remove guestroom
- Hab_AtW NewInfo, Index
- Case "@S" 'add room to favourites ( @SH)
- Hab_AtS NewInfo, Index
- Case "@T" 'delete room from favourites ( @TH)
- Hab_AtT NewInfo, Index
- Case "@R" 'get favourites ( @R@)
- Hab_AtR NewInfo, Index
- Case "Bv" 'enter room ?
- Hab_Bv NewInfo, Index
- Case "@B" 'enter room ?
- Hab_Atb NewInfo, Index
- Case "@y" 'enter pass for room
- Hab_Aty2 NewInfo, Index
- Case "@{" 'enter room ?
- Hab_Atlol NewInfo, Index
- frmMain.socket(Index).SendData furniture & Chr(1)
- socket(Index).SendData "DiH" & Chr(1)
- Case "CW"
- frmMain.socket(Index).SendData furniture
- Case "A" 'get transactions (not supported)
- Hab_Ablokje NewInfo, Index
- Case "A~" 'enter room ?
- Hab_Agolf NewInfo, Index
- Case "@" 'enter room ?
- Hab_Atblokje NewInfo, Index
- Case "A@" 'enter room ?
- Hab_Aat Index
- Case "@~" 'public room data
- Hab_Atgolf NewInfo, Index
- Case "AO" 'look
- Hab_AO NewInfo, Index
- Case "AK" 'walk
- Hab_AK NewInfo, Index
- Case "B^" 'badge select
- Hab_Bdak NewInfo, Index
- Case "A]" 'dance
- Hab_Ahaak NewInfo, Index
- Case "A^" 'wave
- Hab_Adak NewInfo, Index
- Case "AX" 'stop something
- Hab_AX NewInfo, Index
- Case "A`" 'give rights
- Hab_Astreep NewInfo, Index
- Case "Aa" 'remove rights
- Hab_Aa NewInfo, Index
- Case "A_" 'kick
- Hab_Alaag NewInfo, Index
- Case "@u" 'leave room ?
- Hab_Kick Index
- Case "As" 'click door
- Hab_As NewInfo, Index
- Case "@w" 'shout
- Hab_Atw2 NewInfo, Index
- Case "@t" 'talk
- Hab_Att2 NewInfo, Index
- Case "@x" 'whisper
- Hab_Atx2 NewInfo, Index
- Case "AA" 'hand stuff
- Hab_AA2 NewInfo, Index
- Case "AB" 'floor & wallpaper
- Hab_AB NewInfo, Index
- Case "AZ" 'put down furni
- Hab_AZ NewInfo, Index
- Case "AC" 'pick up furni
- Hab_AC NewInfo, Index
- Case "AI" 'move/rotate furni
- Hab_AI NewInfo, Index
- Case "AJ" 'turn on /off
- Hab_AJ NewInfo, Index
- Case "AM" 'turn off dice
- Hab_AM NewInfo, Index
- Case "AL" 'turn on
- Hab_AL NewInfo, Index
- Case "AN" 'open present
- Hab_AN NewInfo, Index
- Case "AQ" 'walk in teleport
- Hab_AQ NewInfo, Index
- Case "@\" 'teleport
- Hab_AtSlash NewInfo, Index
- Case "AR" 'flash teleport
- Hab_AR NewInfo, Index
- Case "@v" 'enter room with teleport
- Hab_Atv NewInfo, Index
- Case "AS" 'open stickie
- Hab_AS2 NewInfo, Index
- Case "AT" 'edit stickie
- Hab_AT NewInfo, Index
- Case "AU" 'delete stickie
- Hab_AU NewInfo, Index
- Case "AG" 'start trade
- Hab_AG NewInfo, Index
- Case "AF" 'stop trade
- Hab_AF NewInfo, Index
- Case "AH" 'add item to trade
- Hab_AH NewInfo, Index
- Case "AE" 'accept trade
- Hab_AE NewInfo, Index
- Case "AD" 'unaccept trade
- Hab_AD NewInfo, Index
- Case "AP" 'carry something
- Hab_AP NewInfo, Index
- Case "Ae" 'open cato
- Hab_Ae2 NewInfo, Index
- Case "Af" 'open cato page
- Hab_Af2 NewInfo, Index
- Case "@q" 'get date
- Hab_Atq2 NewInfo, Index
- Case "Ad" 'buy stuff
- Hab_Ad2 NewInfo, Index
- Case "AW" 'carry item
- Hab_AW NewInfo, Index
- Case "AY" 'use item
- Hab_AY NewInfo, Index
- Case "@j" 'something for pets & registering
- Hab_Atj NewInfo, Index
- Case "B@" 'pet info
- Hab_Bat NewInfo, Index
- Case "Ab" 'door bell yes no
- Hab_Ab2 NewInfo, Index
- Case "BV" 'open category
- Hab_BV2 NewInfo, Index
- Case "CH" 'mod tool
- Hab_CH NewInfo, Index
- Case "AV" 'call for help
- Hab_AV NewInfo, Index
- Case "@p" 'pick call for help
- Hab_Atp2 NewInfo, Index
- Case "CF" 'assign call to mods or helpers
- Hab_CF NewInfo, Index
- Case "CG" 'reply to cfh
- Hab_CG NewInfo, Index
- Case "@k" 'register
- Hab_Atk NewInfo, Index
- Case "CK" 'Check Passwordlength
- Hab_CK NewInfo, Index
- Case "BU" 'change password
- Hab_Bu NewInfo, Index
- Case "CI" 'report message
- Hab_Ci NewInfo, Index
- Case "@d" 'change console Mission
- Hab_Atd2 NewInfo, Index
- Case "@i" 'Search User at console
- Hab_Ati2 NewInfo, Index
- Case "@O" 'Update Console
- Hab_Ato NewInfo, Index
- Case "@`" 'Delete Message
- Hab_Atquo NewInfo, Index
- Case "@_" 'Delete Staff Message
- Hab_Atquo NewInfo, Index
- Case "@g" 'Ask for Friend
- Hab_Atg NewInfo, Index
- Case "@f" 'Dont accept ask for Friend
- Hab_Atf NewInfo, Index
- Case "@e" 'Accept ask for Friend
- Hab_Ate NewInfo, Index
- Case "@h" 'Delete Friend
- Hab_Ath2 NewInfo, Index
- Case "@a" 'Send Console Message
- Hab_Ata NewInfo, Index
- Case "CV" ' Candle thing.. ;]
- wallID = Val(Mid(NewInfo, 5))
- cust = Split(NewInfo, wallID)(1)
- loca = FSO.OpenTextFile(DBP & "furni\" & wallID & "\loc.txt", ForReading).ReadAll
- Fname = FSO.OpenTextFile(DBP & "furni\" & wallID & "\name.txt", ForReading).ReadAll
- Fvar = FSO.OpenTextFile(DBP & "furni\" & wallID & "\var.txt", ForReading).ReadAll
- If Fvar = "3" Or Fvar = "2" Or Fvar = "H" Or Fvar = "J" Then
- FSO.OpenTextFile(DBP & "furni\" & wallID & "\var.txt", ForWriting).Write "I"
- sendAll "AU" & wallID & Chr(9) & " " & Fname & " " & loca & Chr(9) & "2" & Chr(1), (Client(Index).InRoom)
- ElseIf Fvar = "1" Or Fvar = "2" Or Fvar = "I" Then
- FSO.OpenTextFile(DBP & "\furni\" & wallID & "\var.txt", ForWriting).Write "J"
- sendAll "AU" & wallID & Chr(9) & " " & Fname & " " & loca & Chr(9) & "1" & Chr(1), (Client(Index).InRoom)
- End If
- Case "Ac" 'Delete Furni
- Hab_Ac2 NewInfo, Index
- Case "Bw" ' Habbo Exchange
- 'Hab_Bw2 NewInfo, Index
- FurniID = VL64Decode(Mid(NewInfo, 3))
- 'FID = Split(NewInfo, "Bw")(1)
- 'FID2 = VL64Decode(FID)
- 'frmMain.socket(Index).SendData "B! Furniture ID - " & FID & " " & FurniID & Chr(1)
- NewLijst = ";"
- Lijst2 = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\furni.txt", ForReading).ReadAll
- Lijst = Split(Lijst2, ";")
- For a = 0 To UBound(Lijst)
- If Lijst(a) <> "" And Lijst(a) <> FurniID Then NewLijst = NewLijst & ";" & Lijst(a)
- Next a
- NewLijst = Replace(NewLijst, ";;", ";")
- FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\furni.txt", ForWriting).Write NewLijst
- FurniType = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\type.txt", ForReading).ReadAll
- Custt = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\cust.txt", ForReading).ReadAll
- Fname = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\name.txt", ForReading).ReadAll
- loca = Split(FSO.OpenTextFile(DBP & "furni\" & FurniID & "\loc.txt", ForReading).ReadAll, " ")
- Innroom = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\inroom.txt", ForReading).ReadAll
- htmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\shtmp.txt").ReadAll
- Walkmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\walk.txt").ReadAll
- Doen = "O"
- Fvar = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\var.txt", ForReading).ReadAll
- 'roller
- If FurniType = "roller" Then
- frmMain.LoadedRollers = Replace(frmMain.LoadedRollers, "<" & FurniID & ">", "")
- FurniOP = ReadINI("furnies", loca(0) & "," & loca(1), DBP & "privaterooms\" & Innroom & "\rotation.txt")
- If FurniOP <> "" Then
- FurniTypeX = FSO.OpenTextFile(DBP & "furni\" & FurniOP & "\type.txt", ForReading).ReadAll
- If FurniTypeX = "sit" Then Doen = "S"
- If FurniTypeX = "bed" Then Doen = "L"
- If FurniTypeX = "solid" Then Doen = "X"
- If FurniTypeX = "door" Then
- If InStr(Fvar, "O") Then
- Doen = "D"
- Else
- Doen = "X"
- End If
- End If
- End If
- End If
- 'roller
- 'pet part
- If Fname = "nest" Then
- Hpets2 = ""
- splitP = Split(frmMain.Hpets, ";")
- For b = 0 To UBound(splitP)
- If splitP(b) <> "" Then
- If Pet(splitP(b)).FurniID = FurniID Then
- Unload frmMain.PetTimer(splitP(b))
- Nums = Replace(Nums, "<" & splitP(b) & ">", "")
- If Pet(splitP(b)).Actiontype = "pla" Then Pet(splitP(b)).Actiontype = ""
- 'save status
- WriteINI "pet", "alive", Pet(splitP(b)).Alive, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "drinktimer", Pet(splitP(b)).DrinkTimer, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "eattimer", Pet(splitP(b)).EatTimer, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "sleep", Pet(splitP(b)).Sleep, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "sleeptimer", Pet(splitP(b)).SleepTimer, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "sleepduration", Pet(splitP(b)).SleepDuration, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "he", Pet(splitP(b)).He, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "look", Mid(Pet(splitP(b)).Look, 1, InStr(Pet(splitP(b)).Look, ",") - 1), DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "posx", Pet(splitP(b)).PosX, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "posy", Pet(splitP(b)).PosY, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "sit", Pet(splitP(b)).Sit, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "lay", Pet(splitP(b)).Lay, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "gesture", Pet(splitP(b)).Gesture, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "action", Pet(splitP(b)).Action, DBP & "furni\" & FurniID & "\status.txt"
- WriteINI "pet", "actiontype", Pet(splitP(b)).Actiontype, DBP & "furni\" & FurniID & "\status.txt"
- 'save status
- Pet(splitP(b)).Name = ""
- sendAll "@]" & splitP(b) & Chr(1), (Client(Index).InRoom)
- Else
- Hpets2 = Hpets2 & splitP(b) & ";"
- End If
- End If
- Next b
- frmMain.Hpets = Hpets2
- End If
- 'pet part
- Fx = Val(loca(0))
- Fy = Val(loca(1))
- Dim Custsplit() As String
- Custsplit() = Split(Custt, "")
- Dim ForX As Integer, ForY As Integer
- If Val(loca(2)) = 0 Or Val(loca(2)) = 4 Then
- BijX = Val(Custsplit(0))
- BijY = Val(Custsplit(1))
- Else
- BijX = Val(Custsplit(1))
- BijY = Val(Custsplit(0))
- End If
- Walksplit = Split(Walkmp, Chr(13))
- For ForX = Fx To Fx + BijX - 1
- For ForY = Fy To Fy + BijY - 1
- If (FurniType <> "rug" And Mid(Split(Walkmp, Chr(13))(ForY), ForX + 1, 1) <> "R") Or FurniType = "roller" Then Walksplit(ForY) = Mid(Walksplit(ForY), 1, ForX) & Doen & Mid(Walksplit(ForY), ForX + 2)
- FSO.CopyFile DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt", DBP & "privaterooms\" & Client(Index).InRoom & "\rotationb.txt", True
- TopID = ReadINI("furnies", ForX & "," & ForY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
- If TopID = FurniID Then
- StackHere = ReadINI("stacked", ForX & "," & ForY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
- If StackHere <> "" Then
- WriteINI "furnies", ForX & "," & ForY, StackHere, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"
- WriteINI "stacked", ForX & "," & ForY, "", DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"
- If Mid(Split(Walkmp, Chr(13))(ForY), ForX + 1, 1) <> "R" Then Walksplit(ForY) = Mid(Walksplit(ForY), 1, ForX) & "X" & Mid(Walksplit(ForY), ForX + 2)
- Else
- WriteINI "furnies", ForX & "," & ForY, "", DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"
- End If
- Else
- FurniHere = ReadINI("stacked", ForX & "," & ForY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
- If FurniHere <> "" Then
- WriteINI "stacked", ForX & "," & ForY, "", DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"
- If Mid(Split(Walkmp, Chr(13))(ForY), ForX + 1, 1) <> "R" Then Walksplit(ForY) = Mid(Walksplit(ForY), 1, ForX) & "X" & Mid(Walksplit(ForY), ForX + 2)
- Else
- WriteINI "stacked", ForX & "," & ForY, "", DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"
- End If
- End If
- Next ForY
- Next ForX
- Walkmp = Join(Walksplit, Chr(13))
- FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\walk.txt", ForWriting).Write Walkmp
- 'make space
- NewLijst = ";"
- Lijst2 = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\furni.txt", ForReading).ReadAll
- Lijst = Split(Lijst2, ";")
- For a = 0 To UBound(Lijst)
- If Lijst(a) <> "" And Lijst(a) <> FurniID Then NewLijst = NewLijst & ";" & Lijst(a)
- Next a
- NewLijst = Replace(NewLijst, ";;", ";")
- FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\furni.txt", ForWriting).Write NewLijst
- FSO.OpenTextFile(DBP & "furni\" & FurniID & "\inroom.txt", ForWriting).Write 0
- Credits = FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\credits.txt", ForReading).ReadAll
- amount = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\name.txt", ForReading).ReadAll
- 'If FurniID = "P]" Then
- If amount = "CF_50_goldbar" Then
- NewCredits = Credits + 50 'CF_20_moneybag
- ElseIf amount = "CF_20_moneybag" Then
- NewCredits = Credits + 20
- ElseIf amount = "CF_10_coin_gold" Then
- NewCredits = Credits + 10
- ElseIf amount = "CF_5_coin_silver" Then
- NewCredits = Credits + 5
- ElseIf amount = "CF_1_coin_bronze" Then
- NewCredits = Credits + 1
- End If
- sendAll "A^" & FurniID & Chr(1), (Client(Index).InRoom)
- FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\credits.txt", ForWriting).Write NewCredits
- If socket(Index).State = sckConnected Then socket(Index).SendData "@F" & NewCredits & ".00" & Chr(1)
- FSO.DeleteFolder DBP & "furni\" & FurniID, True
- Case "CN"
- If socket(Index).State = sckConnected Then frmMain.socket(Index).SendData "DUIH" & Chr(1)
- 'some things that don't need a function
- Case "BC"
- If socket(Index).State = sckConnected Then socket(Index).SendData "CV" & Chr(1)
- Case "CE"
- If socket(Index).State = sckConnected Then socket(Index).SendData "DO" & Chr(1)
- Case "BR"
- If socket(Index).State = sckConnected Then socket(Index).SendData "CY1" & Chr(1)
- Case "@n"
- If socket(Index).State = sckConnected Then socket(Index).SendData "DO" & Chr(1)
- End Select
- 'HANDLING
- Next
- fuckyomom:
- End Sub
- Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyEscape Then
- If Text2.Visible = False Then
- Text2.Visible = True
- Else
- Text2.Visible = False
- End If
- End If
- If KeyCode = vbKeyReturn Then
- If Text2.Text = "´commands´" Then
- MsgBox "´showcfh´ - Shows the actual CFH PacketData" & vbNewLine & "´sendall´ [data] - Sends [data] to all connected Users" & vbNewLine & "´1´ - CharacterCode 1" & vbNewLine & "´2´ - CharacterCode 2" & vbNewLine & "´13´ - CharacterCode 13" & vbNewLine & "´dicetimers´ - Shows the running dices" & vbNewLine & "´showvars´ - Shows the loaded Filedata" & vbNewLine & "´loadedrollers´ - Shows the loaded rollers", vbInformation, "Server"
- Exit Sub
- End If
- If Text2.Text = "´showcfh´" Then
- Packet = "CALL FOR HELP STOREDDATA"
- For a = 1 To CFHs
- If Len(CFH(a).Text) > 1 Then
- Packet = Packet & vbNewLine & CFH(a).Text
- End If
- Next a
- Text2.Text = ""
- MsgBox Packet, vbInformation, "Server"
- Exit Sub
- End If
- If Text2.Text = "´dicetimers´" Then
- Text2.Text = ""
- MsgBox frmMain.dices, vbInformation, "Server"
- Exit Sub
- End If
- If Text2.Text = "´loadedrollers´" Then
- Text2.Text = ""
- MsgBox frmMain.LoadedRollers, vbInformation, "Server"
- Exit Sub
- End If
- If InStr(Text2.Text, "´sendall´") = 1 Then
- Packet = Mid(Text2.Text, InStr(Text2.Text, " ") + 1)
- Packet = Replace(Packet, "´1´", Chr(1))
- Packet = Replace(Packet, "´2´", Chr(2))
- Packet = Replace(Packet, "´13´", Chr(13))
- For a = 1 To SockI
- If socket(a).State = sckConnected Then
- socket(a).SendData Packet
- End If
- Next a
- Text2.Text = ""
- Exit Sub
- End If
- End If
- End Sub
- Private Sub Timer1_Timer()
- End Sub
- Private Sub TimerBotAction_Timer(Index As Integer)
- If Bot(Index).Otheraction = True Then
- Bot(Index).Otheraction = False
- Exit Sub
- End If
- For b = 1 To SockI
- If socket(b).State = sckConnected Then
- If Client(b).Publicnum = Bot(Index).Publicnum Then GoTo ThereAreGuests
- End If
- Next b
- Exit Sub
- ThereAreGuests:
- Randomize
- BotAction = Int((2 - 1 + 1) * Rnd) + 1
- If BotAction = 1 Then
- Tries = 0
- TryAgain1:
- Randomize
- SayNum = Int((7 - 1 + 1) * Rnd) + 1
- Saying = ReadINI("bot", "talk" & SayNum, DBP & "pub\" & Bot(Index).Publicnum & "\data.ini")
- If Saying <> "0" And Saying <> "" Then
- If InStr(Saying, Chr(2)) = 0 Then Saying = "say" & Chr(2) & Saying
- If Split(Saying, Chr(2))(0) = "say" Then
- For a = 1 To frmMain.SockI
- If socket(a).State = sckConnected And Client(a).Publicnum = Bot(Index).Publicnum And Diff(Client(a).PosX, Bot(Index).PosX) < 8 And Diff(Client(a).PosY, Bot(Index).PosY) < 8 Then
- Send a, "@X" & VL64encode(Bot(Index).Num) & Split(Saying, Chr(2))(1) & Chr(2) & Chr(1)
- End If
- Next a
- Else
- sendAllP "@Z" & VL64encode(Bot(Index).Num) & Split(Saying, Chr(2))(1) & Chr(2) & Chr(1), (Bot(Index).Publicnum)
- End If
- Tijd = Len(Saying) * 100
- If Tijd < 500 Then Tijd = 500
- Bot(Index).Talking = True
- TimerBotTalk(Index).Interval = Tijd
- TimerBotTalk(Index).Enabled = True
- Bot(Index).Update = True
- Exit Sub
- Else
- Tries = Tries + 1
- If Tries >= 20 Then
- Exit Sub
- End If
- GoTo TryAgain1
- End If
- Else
- Tries = 0
- Walks = Split(ReadINI("bot", "walkspace", DBP & "pub\" & Bot(Index).Publicnum & "\data.ini"), ",")
- TryAgain2:
- Randomize
- NewDest = Int((UBound(Walks) - 1 + 1) * Rnd) + 1
- NewDest = Walks(NewDest)
- If InStr(NewDest, " ") <> 0 Then
- If IsNumeric(Split(NewDest, " ")(0)) = True And IsNumeric(Split(NewDest, " ")(1)) = True Then
- Bot(Index).DestX = Split(NewDest, " ")(0)
- Bot(Index).DestY = Split(NewDest, " ")(1)
- Bot(Index).Update = True
- Exit Sub
- Else
- Tries = Tries + 1
- If Tries >= 20 Then
- Exit Sub
- End If
- GoTo TryAgain2
- End If
- Else
- Tries = Tries + 1
- If Tries >= 20 Then
- Exit Sub
- End If
- GoTo TryAgain2
- End If
- End If
- End Sub
- Private Sub TimerBotTalk_Timer(Index As Integer)
- On Error GoTo lol
- TimerBotTalk(Index).Enabled = False
- Bot(Index).Talking = False
- Bot(Index).Update = True
- lol:
- End Sub
- Private Sub TimerBotUpdate_Timer(Index As Integer)
- If Bot(Index).Update = True Then
- extb = ""
- FirstHeBot = Bot(Index).He
- If Bot(Index).Talking = True Then
- extb = extb & "talk/"
- End If
- If Bot(Index).PosX <> Bot(Index).DestX Or Bot(Index).PosY <> Bot(Index).DestY Then
- HeightMap = FSO.OpenTextFile(DBP & "pub\" & Bot(Index).Publicnum & "\heightmap.map", ForReading).ReadAll
- NwPB = FindPathBot(Index, Bot(Index).PosX, Bot(Index).PosY, Bot(Index).DestX, Bot(Index).DestY, HeightMap)
- If NwPB = "NoPath" Then
- Bot(Index).DestX = Bot(Index).PosX
- Bot(Index).DestY = Bot(Index).PosY
- NwPB = Bot(Index).PosX & "," & Bot(Index).PosY
- Else
- extb = extb & "mv " & NwPB & "," & Bot(Index).He & "/"
- End If
- End If
- If Bot(Index).DestX = Bot(Index).PosX And Bot(Index).DestY = Bot(Index).PosY Then
- Bot(Index).InUse = False
- Bot(Index).Look = Bot(Index).Standartlook
- Bot(Index).Update = False
- End If
- sendAllP "@b" & Bot(Index).Num & " " & Bot(Index).PosX & "," & Bot(Index).PosY & "," & FirstHeBot & "," & Bot(Index).Look & "/" & extb & Chr(13) & Chr(1), (Bot(Index).Publicnum)
- If NwPB <> "" Then
- Bot(Index).PosX = Split(NwPB, ",")(0)
- Bot(Index).PosY = Split(NwPB, ",")(1)
- End If
- End If
- End Sub
- Private Sub TimerDC_Timer(Index As Integer)
- frmMain.socket(Index).Close
- End Sub
- Private Sub TimerDice_Timer(Index As Integer)
- Dim getal As Long, DiceID As Long
- DiceID = Split(TimerDice(Index).Tag, ".")(0)
- TheRom = Split(TimerDice(Index).Tag, ".")(1)
- Randomize Timer
- getal = Int((6 - 1 + 1) * Rnd) + 1
- FSO.OpenTextFile(DBP & "furni\" & DiceID & "\var.txt", ForWriting).Write "H" & getal
- getal = (DiceID * 38) + getal
- sendAll "AZ" & DiceID & Chr(20) & getal & Chr(1), (TheRom)
- dices = Replace(dices, "<" & Index & ">", "")
- Unload TimerDice(Index)
- End Sub
- Private Sub TimerDiveGuard_Timer()
- If txtDiving.Text = "0" = False Then
- txtDiving.Text = "0"
- txtDiveDoors.Text = "1"
- sendAllP "AGdoor open" & Chr(1), 12
- TimerDiveGuard.Enabled = False
- End If
- End Sub
- Private Sub TimerDrink_Timer(Index As Integer)
- On Error GoTo lol
- Client(Index).DoDrink = True
- Client(Index).Update = True
- lol:
- End Sub
- Private Sub TimerGesture_Timer(Index As Integer)
- On Error GoTo lol
- TimerGesture(Index).Enabled = False
- Client(Index).Gesture = ""
- Client(Index).Update = True
- lol:
- End Sub
- Private Sub TimerLidoVote_Timer()
- ''take the total votes, and calculate the average of them
- VoteSum = LidoVoteSum.Text
- TotalVotes = LidoTotalVotes.Text
- VotedDiver = LastDiver.Text
- DiversNum = LastDiverNum.Text
- 'calculate it
- If Val(TotalVotes) = "0" Or Val(VoteSum) = "0" Then 'nobody has voted
- GoTo ResetSystem
- Else
- DiveRating = Val(VoteSum) / Val(TotalVotes)
- DiveRating = Replace(DiveRating, ",", ".")
- DiveRating = Mid(DiveRating, 1, 4)
- End If
- 'send the result
- frmMain.LidoCammed.Text = frmMain.LastDiverNum.Text
- sendAllP "AGcam1 targetcamera " & DiversNum & "" & Chr(1), 36
- sendAllP "AGcam1 showtext " & locale("diving_score") & "/" & VotedDiver & " " & DiveRating & "" & Chr(1) & "AGcam1 transition fade" & Chr(1), 36
- 'reset stuff
- ResetSystem:
- LidoVoteSum.Text = "0"
- LidoTotalVotes.Text = "0"
- LastDiver.Text = ""
- LastDiverNum.Text = ""
- sendAllP "AGdoor open" & Chr(1), 36
- frmMain.txtDiveDoors.Text = "1"
- frmMain.txtDiving.Text = "0"
- For a = 1 To frmMain.SockI
- If frmMain.socket(a).State = sckConnected Then Client(a).HasVoted = False
- Next a
- TimerLidoVote.Enabled = False
- End Sub
- Private Sub TimerTalk_Timer(Index As Integer)
- On Error GoTo lol
- TimerTalk(Index).Enabled = False
- Client(Index).Talking = False
- Client(Index).Update = True
- lol:
- End Sub
- Private Sub TimerTeleport1_Timer(Index As Integer)
- On Error GoTo lol
- Fname = FSO.OpenTextFile(DBP & "furni\" & TimerTeleport1(Index).Tag & "\name.txt", ForReading).ReadAll
- FRoom = FSO.OpenTextFile(DBP & "furni\" & TimerTeleport1(Index).Tag & "\inroom.txt", ForReading).ReadAll
- If FRoom = Client(Index).InRoom Then
- sendAll "AY" & TimerTeleport1(Index).Tag & "/" & Client(Index).Name & "/" & Fname & Chr(1) & "AY" & TimerTeleport1(Index).Tag & "/" & Client(Index).Name & "/" & Fname & Chr(1), (FRoom)
- TimerTeleport1(Index).Enabled = False
- TimerTeleport2(Index).Enabled = True
- Else
- TimerTeleport1(Index).Enabled = False
- sendAll "@]" & Client(Index).Num & Chr(1), (Client(Index).InRoom)
- RoomNum = FRoom
- Client(Index).Teled = True
- Client(Index).InRoom = RoomNum
- 'frmMain.socket(index).SendData "@S" & Chr(1)
- End If
- lol:
- End Sub
- Private Sub TimerTeleport2_Timer(Index As Integer)
- On Error GoTo lol
- FLoc = Split(FSO.OpenTextFile(DBP & "furni\" & TimerTeleport1(Index).Tag & "\loc.txt", ForReading).ReadAll, " ")
- Client(Index).PosX = FLoc(0)
- Client(Index).PosY = FLoc(1)
- Client(Index).Look = FLoc(2) & "," & FLoc(2)
- If Val(FLoc(2)) = 0 Or Val(FLoc(2)) = 2 Then
- Client(Index).DestX = Client(Index).PosX + 1
- Client(Index).DestY = Client(Index).PosY
- Else
- Client(Index).DestX = Client(Index).PosX
- Client(Index).DestY = Client(Index).PosY + 1
- End If
- Hab_AJ "AJ" & encodeB64(TimerTeleport1(Index).Tag) & TimerTeleport1(Index).Tag & "@DTRUE", Index
- Client(Index).Update = True
- TimerTeleport2(Index).Enabled = False
- TimerTeleport3(Index).Enabled = True
- lol:
- End Sub
- Private Sub TimerTeleport3_Timer(Index As Integer)
- On Error GoTo lol
- Hab_AJ "AJ" & encodeB64(TimerTeleport1(Index).Tag) & TimerTeleport1(Index).Tag & "@DFALSE", Index
- TimerTeleport3(Index).Enabled = False
- lol:
- End Sub
- Private Sub TimerUpdate_Timer(Index As Integer)
- On Error GoTo lol
- Dim Splitt() As String
- FirstHe = Client(Index).He
- If TimerUpdate(Index).Interval > 500 Then TimerUpdate(Index).Interval = 500
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- If Client(Index).InRoom > 0 Then
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- If Client(Index).RollerUpdate = True Then
- Client(Index).RollerUpdate = False
- Owner = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\owner.txt").ReadAll
- rights = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\rights.txt").ReadAll
- If Owner = Client(Index).Name Then extbt = extbt & "flatctrl useradmin/"
- If FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\allrights.txt").ReadAll = "1" Then
- extbt = extbt & "flatctrl useradmin/"
- Else
- Splitt = Split(rights, ";")
- For Q = 0 To UBound(Splitt())
- If Splitt(Q) = Client(Index).Name Then
- extbt = extbt & "flatctrl useradmin/"
- Exit For
- End If
- Next Q
- End If
- If Client(Index).Wave = True Then
- extbt = extbt & "wave/"
- End If
- If Client(Index).Dance = True Then
- extbt = extbt & Client(Index).Dancetype & "/"
- End If
- If Val(Client(Index).Carrying) > 0 Then
- If Client(Index).NoDrink = False Then
- If Client(Index).DoDrink = False Then
- extbt = extbt & "carryd " & Client(Index).Carrying & "/"
- Else
- extbt = extbt & "drink " & Client(Index).Carrying & "/"
- Client(Index).DoDrink = False
- Client(Index).Update = True
- End If
- Else
- If Client(Index).UseItem = False Then
- extbt = extbt & "cri " & Client(Index).Carrying & "/"
- Else
- extbt = extbt & "usei " & Client(Index).Carrying & "/"
- End If
- End If
- End If
- If Client(Index).Talking = True Then
- extbt = extbt & "talk/"
- End If
- If Client(Index).Gesture <> "" Then
- extbt = extbt & "gest " & Client(Index).Gesture & "/"
- End If
- If Client(Index).Trading = True Then
- extbt = extbt & "trd/"
- End If
- If Client(Index).Sit = True Then
- Client(Index).Look = ReadINI("rotation", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
- Hoogte = Val(ReadINI("offset", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"))
- 'Hoogte = Hoogte + Val(Client(Index).He)
- 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
- Hoogte = Replace(Hoogte, ",", ".")
- If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
- extbt = extbt & "sit " & Hoogte & "/"
- End If
- If Client(Index).Lay = True Then
- Client(Index).Look = ReadINI("rotation", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
- Hoogte = Val(ReadINI("offset", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"))
- 'Hoogte = Hoogte + Val(Client(Index).He)
- 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
- Hoogte = Replace(Hoogte, ",", ".")
- If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
- extbt = extbt & "lay " & Hoogte & " null/"
- End If
- Client(Index).He = Replace(Client(Index).He, ",", ".")
- If InStr(Client(Index).He, ".") = 0 Then Client(Index).He = Client(Index).He & ".0"
- sendAll "@b" & Client(Index).Num & " " & Client(Index).PosX & "," & Client(Index).PosY & "," & Client(Index).He & "," & Client(Index).Look & "/" & extbt & Chr(13) & Chr(1), (Client(Index).InRoom)
- Exit Sub
- End If
- If Client(Index).InRoom > 0 Then
- htmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\shtmp.txt").ReadAll
- Walkmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\walk.txt").ReadAll
- Hoogte = Replace(Client(Index).He, ",", ".")
- If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
- If Mid(Split(Walkmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) <> "R" And Mid(Split(htmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) & ".0" <> Hoogte And Client(Index).Sit = False And Client(Index).Lay = False Then
- If Mid(Split(htmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) <> "x" Then
- Client(Index).He = Mid(Split(htmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) & ".0"
- FirstHe = Client(Index).He
- Client(Index).Update = True
- End If
- End If
- If Mid(Split(Walkmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) = "R" And Replace(0.4 + Val(Mid(Split(htmp, Chr(13))(Val(Client(Index).PosY) + BijY), Val(Client(Index).PosX) + BijX + 1, 1)), ",", ".") <> Hoogte And Client(Index).Sit = False And Client(Index).Lay = False Then
- Client(Index).He = Replace(0.4 + Val(Mid(Split(htmp, Chr(13))(Val(Client(Index).PosY)), Val(Client(Index).PosX) + 1, 1)), ",", ".")
- FirstHe = Client(Index).He
- Client(Index).Update = True
- End If
- If Mid(Split(Walkmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) = "S" Then
- If Client(Index).Sit = False Then
- Client(Index).Sit = True
- Client(Index).Dance = False
- Client(Index).Lay = False
- Client(Index).Update = True
- End If
- End If
- If Mid(Split(Walkmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) = "L" Then
- If Client(Index).Lay = False Then
- Client(Index).Sit = False
- Client(Index).Dance = False
- Client(Index).Lay = True
- Client(Index).Update = True
- End If
- End If
- If Mid(Split(Walkmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) = "O" Or Mid(Split(Walkmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) = "X" Then
- If Client(Index).Lay = True Or Client(Index).Sit = True Then
- Client(Index).Sit = False
- Client(Index).Lay = False
- Client(Index).Update = True
- End If
- End If
- 'roller
- If Mid(Split(Walkmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) = "R" Then
- FurniOP = ReadINI("furnies", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
- If FurniOP <> "" Then
- FurniType = FSO.OpenTextFile(DBP & "furni\" & FurniOP & "\type.txt", ForReading).ReadAll
- 'sit
- If FurniType = "sit" And Client(Index).Sit = False Then
- Client(Index).Sit = True
- Client(Index).Dance = False
- Client(Index).Lay = False
- Client(Index).Update = True
- End If
- 'sit
- 'lay
- If FurniType = "bed" And Client(Index).Lay = False Then
- Client(Index).Sit = False
- Client(Index).Dance = False
- Client(Index).Lay = True
- Client(Index).Update = True
- End If
- 'lay
- Else
- If Client(Index).Sit = True Then
- Client(Index).Sit = False
- Client(Index).Update = True
- End If
- If Client(Index).Lay = True Then
- Client(Index).Lay = False
- Client(Index).Update = True
- End If
- End If
- End If
- 'roller
- End If
- If Client(Index).Update = True And Client(Index).InRoom > 0 Then
- Client(Index).Update = False
- Owner = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\owner.txt").ReadAll
- rights = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\rights.txt").ReadAll
- If Owner = Client(Index).Name Then extbt = extbt & "flatctrl useradmin/"
- If FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\allrights.txt").ReadAll = "1" Then
- extbt = extbt & "flatctrl useradmin/"
- Else
- Splitt = Split(rights, ";")
- For Q = 0 To UBound(Splitt())
- If Splitt(Q) = Client(Index).Name Then
- extbt = extbt & "flatctrl useradmin/"
- Exit For
- End If
- Next Q
- End If
- If Client(Index).DestX <> Client(Index).PosX Or Client(Index).DestY <> Client(Index).PosY Then
- Client(Index).Update = True
- htmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\shtmp.txt").ReadAll
- Walkmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\walk.txt").ReadAll
- NwP = findPath(Index, Client(Index).PosX, Client(Index).PosY, Client(Index).DestX, Client(Index).DestY, Client(Index).InRoom, (Walkmp), (htmp))
- If NwP = "NoPath" Then
- Client(Index).DestX = Client(Index).PosX
- Client(Index).DestY = Client(Index).PosY
- NwP = Client(Index).PosX & "," & Client(Index).PosY
- Else
- Client(Index).Sit = False
- Client(Index).Lay = False
- extbt = extbt & "mv " & NwP & "," & Client(Index).He & "/"
- End If
- End If
- If Client(Index).DestX = Client(Index).PosX And Client(Index).DestY = Client(Index).PosY Then
- Client(Index).Update = False
- If Client(Index).Kick = True Then
- Client(Index).Kick = False
- Hab_Kick Index
- End If
- End If
- If Client(Index).TelMove = True Then
- extbt = extbt & "mv " & Client(Index).TelX & "," & Client(Index).TelY & "," & Client(Index).TelHe & "/"
- End If
- If Client(Index).Wave = True Then
- extbt = extbt & "wave/"
- End If
- If Client(Index).Dance = True Then
- extbt = extbt & Client(Index).Dancetype & "/"
- End If
- If Val(Client(Index).Carrying) > 0 Then
- If Client(Index).NoDrink = False Then
- If Client(Index).DoDrink = False Then
- extbt = extbt & "carryd " & Client(Index).Carrying & "/"
- Else
- extbt = extbt & "drink " & Client(Index).Carrying & "/"
- Client(Index).DoDrink = False
- Client(Index).Update = True
- End If
- Else
- If Client(Index).UseItem = False Then
- extbt = extbt & "cri " & Client(Index).Carrying & "/"
- Else
- extbt = extbt & "usei " & Client(Index).Carrying & "/"
- End If
- End If
- End If
- If Client(Index).Talking = True Then
- extbt = extbt & "talk/"
- End If
- If Client(Index).Gesture <> "" Then
- extbt = extbt & "gest " & Client(Index).Gesture & "/"
- End If
- If Client(Index).Trading = True Then
- extbt = extbt & "trd/"
- End If
- If Client(Index).Sit = True Then
- If Right(Client(Index).Look, 1) <> Right(ReadINI("rotation", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"), 1) Then Client(Index).Look = ReadINI("rotation", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
- Hoogte = Val(ReadINI("offset", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"))
- 'Hoogte = Hoogte + Val(Client(Index).He)
- 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
- Hoogte = Replace(Hoogte, ",", ".")
- If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
- extbt = extbt & "sit " & Hoogte & "/"
- End If
- If Client(Index).Lay = True Then
- Client(Index).Look = ReadINI("rotation", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
- Hoogte = Val(ReadINI("offset", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"))
- 'Hoogte = Hoogte + Val(Client(Index).He)
- 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
- Hoogte = Replace(Hoogte, ",", ".")
- If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
- extbt = extbt & "lay " & Hoogte & " null/"
- End If
- FirstHe = Replace(FirstHe, ",", ".")
- If InStr(FirstHe, ".") = 0 Then FirstHe = FirstHe & ".0"
- sendAll "@b" & Client(Index).Num & " " & Client(Index).PosX & "," & Client(Index).PosY & "," & FirstHe & "," & Client(Index).Look & "/" & extbt & Chr(13) & Chr(1), (Client(Index).InRoom)
- If Client(Index).TelMove = True Then
- Client(Index).TelMove = False
- Client(Index).PosX = Client(Index).TelX
- Client(Index).PosY = Client(Index).TelY
- Client(Index).He = Client(Index).TelHe
- Client(Index).DestX = Client(Index).TelX
- Client(Index).DestY = Client(Index).TelY
- End If
- If NwP <> "" Then
- Client(Index).PosX = Split(NwP, ",")(0)
- Client(Index).PosY = Split(NwP, ",")(1)
- End If
- End If
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Else
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Hoogte = Replace(Client(Index).He, ",", ".")
- If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
- 'If PublicWalk(Client(index).Publicnum, Client(index).PosX, Client(index).PosY) & ".0" <> Hoogte And Client(index).Sit = False And Client(index).Lay = False Then
- 'If PublicWalk(Client(index).Publicnum, Client(index).PosX, Client(index).PosY) <> "X" Then
- 'Client(index).He = PublicWalk(Client(index).Publicnum, Client(index).PosX + 1, Client(index).PosY) & ".0"
- 'FirstHe = Client(index).He
- 'Client(index).UpDate = True
- 'End If
- 'End If
- 'If Replace(0.4 + Val(Mid(Split(Htmp, Chr(13))(Val(Client(index).PosY) + BijY), Val(Client(index).PosX) + BijX + 1, 1)), ",", ".") <> Hoogte And Client(index).Sit = False And Client(index).Lay = False Then
- 'Client(index).He = Replace(0.4 + Val(Mid(Split(Htmp, Chr(13))(Val(Client(index).PosY)), Val(Client(index).PosX) + 1, 1)), ",", ".")
- 'FirstHe = Client(index).He
- 'Client(index).UpDate = True
- 'End If
- 'If IsNumeric(PublicWalk(Client(index).Publicnum, Client(index).PosX, Client(index).PosY)) = False Then
- 'If Client(index).Sit = False Then
- 'Client(index).Sit = True
- 'Client(index).Dance = False
- 'Client(index).Lay = False
- 'Client(index).UpDate = True
- 'End If
- 'End If
- 'If IsNumeric(PublicWalk(Client(index).Publicnum, Client(index).PosX, Client(index).PosY)) = True Then
- 'If Client(index).Lay = True Or Client(index).Sit = True Then
- 'Client(index).Sit = False
- 'Client(index).Lay = False
- 'Client(index).UpDate = True
- 'End If
- 'End If
- If PublicWalk(Client(Index).Publicnum, Client(Index).PosX, Client(Index).PosY) = "S" Then
- If Client(Index).Sit = False Then
- Client(Index).Sit = True
- Client(Index).Look = PublicRot(Client(Index).Publicnum, Client(Index).PosX, Client(Index).PosY)
- Client(Index).Lay = False
- Client(Index).Dance = False
- Client(Index).Update = True
- End If
- Else
- Client(Index).Sit = False
- End If
- If Client(Index).DestX <> Client(Index).PosX Or Client(Index).DestY <> Client(Index).PosY Then
- Client(Index).Update = True
- HeightMap = FSO.OpenTextFile(DBP & "pub\" & Client(Index).Publicnum & "\heightmap.map", ForReading).ReadAll
- NwP = FindPathP(Index, Client(Index).PosX, Client(Index).PosY, Client(Index).DestX, Client(Index).DestY, HeightMap)
- If NwP = "NoPath" Then
- Client(Index).DestX = Client(Index).PosX
- Client(Index).DestY = Client(Index).PosY
- NwP = Client(Index).PosX & "," & Client(Index).PosY
- Else
- 'MsgBox "YAY!"
- Client(Index).Sit = False
- Client(Index).Lay = False
- extbt = extbt & "mv " & NwP & "," & Client(Index).He & "/"
- End If
- End If
- If Client(Index).DestX = Client(Index).PosX And Client(Index).DestY = Client(Index).PosY Then
- Client(Index).Update = False
- If Client(Index).Kick = True Then
- Client(Index).Kick = False
- Hab_Kick Index
- GoTo Ntb
- End If
- CheckPosition Index
- End If
- Ntb:
- If Client(Index).Wave = True Then
- extbt = extbt & "wave/"
- End If
- If Client(Index).Dance = True Then
- extbt = extbt & Client(Index).Dancetype & "/"
- End If
- If Val(Client(Index).Carrying) > 0 Then
- If Client(Index).NoDrink = False Then
- If Client(Index).DoDrink = False Then
- extbt = extbt & "carryd " & Client(Index).Carrying & "/"
- Else
- extbt = extbt & "drink " & Client(Index).Carrying & "/" Or extbt & Client(Index).Carrying
- Client(Index).DoDrink = False
- Client(Index).Update = True
- End If
- Else
- If Client(Index).UseItem = False Then
- extbt = extbt & "cri " & Client(Index).Carrying & "/"
- Else
- extbt = extbt & "usei " & Client(Index).Carrying & "/"
- End If
- End If
- End If
- If Client(Index).Talking = True Then
- extbt = extbt & "talk/"
- End If
- If Client(Index).Gesture <> "" Then
- extbt = extbt & "gest " & Client(Index).Gesture & "/"
- End If
- If Client(Index).Trading = True Then
- extbt = extbt & "trd/"
- End If
- If Client(Index).Sit = True Then
- Hoogte = "1"
- If Right(Client(Index).Look, 1) <> Right(PublicRot(Client(Index).Publicnum, Client(Index).PosX, Client(Index).PosY), 1) Then Client(Index).Look = PublicRot(Client(Index).Publicnum, Client(Index).PosX, Client(Index).PosY)
- 'Hoogte = Hoogte + Val(Client(Index).He)
- 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
- Hoogte = Replace(Hoogte, ",", ".")
- If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
- extbt = extbt & "sit " & Hoogte & "/"
- End If
- If Client(Index).Lay = True Then
- Client(Index).Look = "1,1"
- Hoogte = "1"
- 'Hoogte = Hoogte + Val(Client(Index).He)
- 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
- Hoogte = Replace(Hoogte, ",", ".")
- If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
- extbt = extbt & "lay " & Hoogte & " null/"
- End If
- FirstHe = Replace(FirstHe, ",", ".")
- If InStr(FirstHe, ".") = 0 Then FirstHe = FirstHe & ".0"
- sendAllP "@b" & Client(Index).Num & " " & Client(Index).PosX & "," & Client(Index).PosY & "," & FirstHe & "," & Client(Index).Look & "/" & extbt & Chr(13) & Chr(1), (Client(Index).Publicnum)
- If Client(Index).TelMove = True Then
- Client(Index).TelMove = False
- Client(Index).PosX = Client(Index).TelX
- Client(Index).PosY = Client(Index).TelY
- Client(Index).He = Client(Index).TelHe
- Client(Index).DestX = Client(Index).TelX
- Client(Index).DestY = Client(Index).TelY
- End If
- If NwP <> "" Then
- Client(Index).PosX = Split(NwP, ",")(0)
- Client(Index).PosY = Split(NwP, ",")(1)
- End If
- ''''''
- End If
- ''''''
- lol:
- End Sub
- Public Sub DoTimer(Index As Integer)
- TimerTeleport1_Timer Index
- End Sub
- Private Sub TimerVanish_Timer(Index As Integer)
- If TimerVanish(Index).Tag = 2 Then
- Client(Index).NoDrink = True
- Client(Index).UseItem = False
- Client(Index).Carrying = 0
- TimerVanish(Index).Enabled = False
- TimerDrink(Index).Enabled = False
- Client(Index).Update = True
- Else
- TimerVanish(Index).Tag = Val(TimerVanish(Index).Tag) + 1
- End If
- End Sub
- Private Sub TimerVote_Timer(Index As Integer)
- On Error GoTo EscapeVote
- If Client(Index).SwimVote = True Then
- Client(Index).Dance = True
- Client(Index).Dancetype = "Swim"
- Client(Index).Update = True
- ElseIf Client(Index).SwimVote = False And Client(Index).Vote = True Then
- Client(Index).Dance = False
- Client(Index).Update = True
- Client(Index).Dancetype = "walk"
- End If
- Client(Index).SwimVote = False
- Client(Index).Vote = False
- TimerVote(Index).Enabled = False
- EscapeVote:
- End Sub
- Private Sub TimerWave_Timer(Index As Integer)
- On Error GoTo lol
- TimerWave(Index).Enabled = False
- Client(Index).Wave = False
- Client(Index).Update = True
- lol:
- End Sub
- Public Function RandomValue(ByVal Low As Long, _
- ByVal High As Long) As Long
- RandomValue = Int((High - Low + 1) * Rnd) + Low
- End Function
- Private Sub tmrCloseServer_Timer()
- For a = 1 To frmMain.SockI
- If frmMain.socket(a).State = sckConnected Then frmMain.socket(a).SendData "BKHotel stats: OFFLINE" & Chr(1)
- End
- Next a
- End Sub
- Private Sub tmrLido1_Timer()
- frmMain.Lido1.Text = "3"
- tmrLido1.Enabled = False
- End Sub
- Private Sub tmrLido2_Timer()
- frmMain.Lido2.Text = "3"
- tmrLido2.Enabled = False
- End Sub
- Private Sub tmrRumble1_Timer()
- frmMain.Rumble1.Text = "3"
- tmrRumble1.Enabled = False
- End Sub
- Private Sub tmrRumble2_Timer()
- frmMain.Rumble2.Text = "3"
- tmrRumble2.Enabled = False
- End Sub
- Private Sub tmrLidoCam_Timer()
- TrackInterval = RandomValue(2500, 4500)
- sendAllP "AGcam1 targetcamera " & frmMain.LidoCammed.Text & "" & Chr(1), 36
- tmrLidoCam.Interval = TrackInterval
- End Sub
- Private Sub tmrLidoCamUpdate_Timer()
- For a = 1 To frmMain.SockI
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "36" And Client(a).Wave = True Then LidoCammed.Text = Client(a).Num
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "36" And (Client(a).Dance = True And Client(Index).Dancetype = "Swim" = False) Then LidoCammed.Text = Client(a).Num
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "36" And (Client(a).Vote = True Or Client(a).SwimVote = True) Then LidoCammed.Text = Client(a).Num
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "36" And Client(a).Talking = True Then LidoCammed.Text = Client(a).Num
- Next a
- End Sub
- Private Sub tmrLidoZoom_Timer()
- ZoomMode = RandomValue(1, 2)
- ZoomInterval = RandomValue(1500, 9000)
- sendAllP "AGcam1 setcamera" & " " & ZoomMode & Chr(1), 36
- tmrLidoZoom.Interval = ZoomInterval
- End Sub
- Private Sub tmrRumbleCam_Timer()
- TrackInterval = RandomValue(2500, 4500)
- sendAllP "AGcam1 targetcamera " & frmMain.RumbleCammed.Text & "" & Chr(1), 27
- tmrRumbleCam.Interval = TrackInterval
- End Sub
- Private Sub tmrRumbleCamUpdate_Timer()
- For a = 1 To frmMain.SockI
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "27" And Client(a).Wave = True Then RumbleCammed.Text = Client(a).Num
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "27" And (Client(a).Dance = True And Client(Index).Dancetype = "Swim" = False) Then RumbleCammed.Text = Client(a).Num
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "27" And (Client(a).Vote = True Or Client(a).SwimVote = True) Then RumbleCammed.Text = Client(a).Num
- If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "27" And Client(a).Talking = True Then RumbleCammed.Text = Client(a).Num
- Next a
- End Sub
- Private Sub tmrRumbleZoom_Timer()
- ZoomMode = RandomValue(1, 2)
- ZoomInterval = RandomValue(1500, 9000)
- sendAllP "AGcam1 setcamera" & " " & ZoomMode & Chr(1), 27
- tmrRumbleZoom.Interval = ZoomInterval
- End Sub
- Private Sub txtLog_Change()
- If Len(txtLog.Text) > 32000 Then txtLog.Text = ""
- End Sub
- 'Private Sub txtLog_KeyDown(KeyCode As Integer, Shift As Integer)
- 'If KeyCode = vbKeyEscape Then
- ' If Text2.Visible = False Then Text2.Visible = True Else Text2.Visible = False
- 'End If
- 'End Sub
- Private Sub UpdateFurni_Timer(Index As Integer)
- On Error GoTo lol
- If Index > 0 Then
- Fname = FSO.OpenTextFile(DBP & "furni\" & Index & "\name.txt", ForReading).ReadAll
- FCol = Split(FSO.OpenTextFile(DBP & "furni\" & Index & "\cust.txt", ForReading).ReadAll, Chr(30))(2)
- Var = FSO.OpenTextFile(DBP & "furni\" & Index & "\var.txt", ForReading).ReadAll
- FHeight = FSO.OpenTextFile(DBP & "furni\" & Index & "\height.txt", ForReading).ReadAll
- loca = Split(FSO.OpenTextFile(DBP & "furni\" & Index & "\loc.txt", ForReading).ReadAll, " ")
- Custsplit = Split(FSO.OpenTextFile(DBP & "furni\" & Index & "\cust.txt", ForReading).ReadAll, "")
- 'pet part
- If Fname = "nest" Then
- splitP = Split(frmMain.Hpets, ";")
- For b = 0 To UBound(splitP)
- If splitP(b) <> "" Then
- If Pet(splitP(b)).FurniID = Index Then
- Pet(splitP(b)).NestX = loca(0)
- Pet(splitP(b)).NestY = loca(1)
- End If
- End If
- Next b
- End If
- 'pet part
- FHeight = Replace(FHeight, ",", ".")
- If InStr(FHeight, ".") = 0 Then FHeight = FHeight & ".0"
- sendAll "A_" & Index & Chr(2) & Fname & Chr(2) & VL64encode(loca(0)) & VL64encode(loca(1)) & VL64encode(Custsplit(0)) & VL64encode(Custsplit(1)) & VL64encode(loca(2)) & FHeight & Chr(2) & FCol & Chr(2) & Chr(2) & Var & Chr(2) & Chr(1), (InRoom)
- Unload UpdateFurni(Index)
- End If
- lol:
- End Sub
- Private Sub useronline_Timer()
- 'User online
- HabboList = ""
- HabboList2 = ""
- HabboCount = 0
- BlockedIPs = ""
- For a = 1 To SockI
- If socket(a).State = sckConnected And Client(a).Name <> "" Then
- If InStr(BlockedIPs, socket(a).RemoteHostIP) Then GoTo NextA
- If HabboCount <= 30 Then HabboList = HabboList & "<br>" & Client(a).Name & " " & socket(a).RemoteHostIP Else HabboList2 = HabboList2 & "<br>" & Client(a).Name & " " & socket(a).RemoteHostIP
- HabboCount = HabboCount + 1
- For b = 1 To frmMain.SockI
- If socket(a).RemoteHostIP = socket(b).RemoteHostIP And a <> b And socket(b).State = sckConnected And Client(b).Name <> "" Then
- If HabboCount <= 30 Then HabboList = HabboList & "<br>" & Client(b).Name & " " & socket(b).RemoteHostIP Else HabboList2 = HabboList2 & "<br>" & Client(b).Name & " " & socket(b).RemoteHostIP
- HabboCount = HabboCount + 1
- End If
- Next b
- BlockedIPs = BlockedIPs & socket(a).RemoteHostIP & ","
- End If
- NextA:
- Next a
- Label2.Caption = HabboCount
- End Sub
- Private Sub UseTimer_Timer(Index As Integer)
- On Error GoTo lol
- Client(Index).UseItem = False
- UseTimer(Index).Enabled = False
- Client(Index).Update = True
- lol:
- End Sub
- Private Sub mPopExit_Click()
- Unload Me
- End Sub
- Private Sub mPopRestore_Click()
- Dim Result As Long
- Me.WindowState = vbNormal
- Result = SetForegroundWindow(Me.hwnd)
- Me.Show
- End Sub
- Private Sub timer_automessage_Timer()
- If frmAutoClose.timemessage.Caption = Format(Time, "hh/mm/ss") Then
- For a = 1 To frmMain.SockI
- If frmMain.socket(a).State = sckConnected And Client(a).Name <> "" Then
- frmMain.socket(a).SendData "BK" & Split(ReadINI("server", "auto_close_message", SettingIni), ",", 2)(1) & Chr(1)
- End If
- Next a
- start = Timer
- Do
- DoEvents
- Zeit = Timer - start
- Loop Until Zeit >= 2
- ' Send Index, "BK" & Split(ReadINI("server", "auto_close_message", SettingIni), ",", 2)(1) & Chr(1)
- End If
- End Sub
- Private Sub timer_poweroff_Timer()
- If frmAutoClose.timeselected.Caption = Format(Time, "hh/mm/ss") Then
- If frmAutoClose.auto_poweroff_pc.Value = 1 Then
- Call Shutdown
- Else
- Unload frmMain
- Unload frmToolsaaa
- Unload frmSettings
- Unload frmInfo
- Unload frmUseronline
- Unload frmAutoClose
- Unload frmBan
- Unload frmCredits
- Unload frmAlert
- Unload frmTab_publicroom
- Unload frmTab_publicroom_infobus
- Unload frmTab_publicroom_layout
- Unload frmTab_publicroom_booteditor
- End
- End If
- End If
- End Sub
- Public Sub Shutdown()
- 'Procedura che provoca lo spengimento del PC:
- 'se l'OS è Win NT/2000/XP allora prima di spengere setta i privilegi
- If glngWhichWindows32 = mlngWindowsNT Then
- 'aggiusta i privilegi per poter spengere il PC
- AdjustToken
- 'se AdjustToken va in errore allora visualizzo il tipo di errore
- If GetLasrError <> 0 Then MsgBox "Post-AdjustToken's GetLastError " & GetLastError
- End If
- 'Eseguo l'operazione scelta: EWX_LOGOFF(disconnette pc), EWX_REBOOT(riavvia il pc), EWX_POWEROFF(spegne pc)
- ExitWindowsEx EWX_POWEROFF, &HFFFF
- 'se ExitWindowsEx va in errore allora visualizzo il tipo di errore
- If GetLasrError <> 0 Then MsgBox "ExitWindowsEx's GetLastError " & GetLastError
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement