Advertisement
Guest User

Untitled

a guest
Nov 21st, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 82.30 KB | None | 0 0
  1. Private Sub socket_Close(Index As Integer)
  2.  
  3. If Index > 0 Then
  4. TimerUpdate(Index).Enabled = False
  5. TimerTeleport1(Index).Enabled = False
  6. TimerTeleport2(Index).Enabled = False
  7. TimerWave(Index).Enabled = False
  8. TimerTalk(Index).Enabled = False
  9. TimerGesture(Index).Enabled = False
  10. TimerDrink(Index).Enabled = False
  11. TimerVanish(Index).Enabled = False
  12. UseTimer(Index).Enabled = False
  13. TimerVote(Index).Enabled = False
  14. TimerDC(Index).Enabled = False
  15. 'client
  16.  
  17. Client(Index).App = ""
  18. Client(Index).Name = ""
  19. Client(Index).Rank = 0
  20. Client(Index).Sex = ""
  21. Client(Index).Mission = ""
  22. Client(Index).Badge = ""
  23. Client(Index).BadgeOn = 0
  24. Client(Index).Rank = ""
  25.  
  26. 'pet part
  27. Kamer = Client(Index).InRoom
  28. If Kamer > 0 Then
  29. InRoom = 0
  30.  
  31. For b = 1 To frmMain.SockI
  32. If Client(b).InRoom = Kamer Then
  33. InRoom = InRoom + 1
  34. End If
  35. Next b
  36.  
  37. If InRoom = 1 Then
  38.  
  39. 'rollers
  40. splitP = Split(Replace(frmMain.LoadedRollers, ">", ""), "<")
  41. For b = 0 To UBound(splitP)
  42. If splitP(b) <> "" Then
  43. FType = FSO.OpenTextFile(DBP & "furni\" & splitP(b) & "\type.txt", ForReading).ReadAll
  44. FRoom = FSO.OpenTextFile(DBP & "furni\" & splitP(b) & "\inroom.txt", ForReading).ReadAll
  45. 'roller
  46. If FType = "roller" And FRoom = Kamer Then
  47. frmMain.LoadedRollers = Replace(frmMain.LoadedRollers, "<" & splitP(b) & ">", "")
  48. End If
  49. 'roller
  50. End If
  51. Next b
  52. 'rollers
  53.  
  54.  
  55. Hpets2 = ""
  56. splitP = Split(frmMain.Hpets, ";")
  57. For b = 0 To UBound(splitP)
  58. If splitP(b) <> "" Then
  59. If Pet(splitP(b)).InRoom = Kamer Then
  60. Unload frmMain.PetTimer(splitP(b))
  61. Nums = Replace(Nums, "<" & splitP(b) & ">", "")
  62. 'save status
  63. WriteINI "pet", "alive", Pet(splitP(b)).Alive, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  64. WriteINI "pet", "drinktimer", Pet(splitP(b)).DrinkTimer, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  65. WriteINI "pet", "eattimer", Pet(splitP(b)).EatTimer, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  66. WriteINI "pet", "sleep", Pet(splitP(b)).Sleep, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  67. WriteINI "pet", "sleeptimer", Pet(splitP(b)).SleepTimer, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  68. WriteINI "pet", "sleepduration", Pet(splitP(b)).SleepDuration, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  69. WriteINI "pet", "he", Pet(splitP(b)).He, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  70. WriteINI "pet", "look", Mid(Pet(splitP(b)).Look, 1, InStr(Pet(splitP(b)).Look, ",") - 1), DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  71. WriteINI "pet", "posx", Pet(splitP(b)).PosX, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  72. WriteINI "pet", "posy", Pet(splitP(b)).PosY, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  73. WriteINI "pet", "sit", Pet(splitP(b)).Sit, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  74. WriteINI "pet", "lay", Pet(splitP(b)).Lay, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  75. WriteINI "pet", "gesture", Pet(splitP(b)).Gesture, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  76. WriteINI "pet", "action", Pet(splitP(b)).Action, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  77. WriteINI "pet", "actiontype", Pet(splitP(b)).Actiontype, DBP & "furni\" & Pet(splitP(b)).FurniID & "\status.txt"
  78. 'save status
  79. Pet(splitP(b)).Name = ""
  80. Else
  81. Hpets2 = Hpets2 & splitP(b) & ";"
  82. End If
  83. End If
  84. Next b
  85.  
  86. frmMain.Hpets = Hpets2
  87. End If
  88. 'pet part
  89. End If
  90. Nums = Replace(Nums, "<" & Client(Index).Num & ">", "")
  91. Client(Index).Num = 0
  92. Client(Index).InRoom = 0
  93. Client(Index).Sit = False
  94. Client(Index).RollerUpdate = False
  95. Client(Index).Lay = False
  96. Client(Index).Wave = False
  97. Client(Index).Dance = False
  98. Client(Index).Trading = False
  99. Client(Index).Update = False
  100. Client(Index).TelMove = False
  101. Client(Index).Teled = False
  102. Client(Index).DoDrink = False
  103. Client(Index).Dancetype = ""
  104. Client(Index).NoDrink = True
  105. Client(Index).UseItem = False
  106. Client(Index).Carrying = 0
  107. TimerVanish(Index).Enabled = False
  108. TimerDrink(Index).Enabled = False
  109. Client(Index).PosX = 0
  110. Client(Index).PosY = 0
  111. Client(Index).He = "0.0"
  112. Client(Index).DestX = 0
  113. Client(Index).DestY = 0
  114. Client(Index).TelX = 0
  115. Client(Index).TelY = 0
  116. Client(Index).TelHe = ""
  117. Client(Index).Look = ""
  118. Client(Index).Gesture = ""
  119. Client(Index).Talking = False
  120. Client(Index).HandPage = 0
  121. Client(Index).Publicname = ""
  122. Client(Index).Publicnum = 0
  123. If Client(Index).TradingWith <> "" Then
  124. Hab_AF "AF", Index
  125. Client(Index).TradingWith = ""
  126. End If
  127. 'client
  128. FreeSockets = FreeSockets & "<" & Index & ">"
  129. End If
  130.  
  131. End Sub
  132.  
  133. Private Sub socket_ConnectionRequest(Index As Integer, ByVal requestID As Long)
  134. If Index = 0 Then
  135. Dim NewI As Integer
  136. If FreeSockets = "" Then
  137. NewI = SockI + 1
  138. SockI = SockI + 1
  139. Load socket(NewI)
  140. Load TimerUpdate(NewI)
  141. Load TimerTeleport1(NewI)
  142. Load TimerTeleport2(NewI)
  143. Load TimerTeleport3(NewI)
  144. Load TimerVote(NewI)
  145. Load TimerWave(NewI)
  146. Load TimerTalk(NewI)
  147. Load TimerGesture(NewI)
  148. Load TimerDrink(NewI)
  149. Load TimerVanish(NewI)
  150. Load UseTimer(NewI)
  151. Load TimerDC(NewI)
  152. ReDim Preserve Client(NewI)
  153. Else
  154. NewI = Replace(Split(FreeSockets, ">")(0), "<", "")
  155. FreeSockets = Replace(FreeSockets, "<" & NewI & ">", "")
  156. Unload socket(NewI)
  157. Load socket(NewI)
  158. End If
  159.  
  160. On Error Resume Next
  161. TimerUpdate(NewI).Enabled = True
  162. socket(NewI).Accept requestID
  163. socket(NewI).SendData "@@" & Chr(1)
  164. End If
  165. End Sub
  166.  
  167. Private Sub socket_DataArrival(Index As Integer, ByVal bytesTotal As Long)
  168. On Error GoTo fuckyomom
  169. Dim info As String
  170. Dim Offset As Integer
  171. Dim TheNum As Integer
  172. Dim ToDo() As String
  173. Dim P As Integer
  174. Dim FindIt As String
  175. Dim NewInfo As String
  176. socket(Index).GetData info
  177.  
  178. reloop:
  179. ReDim Preserve ToDo(Offset) As String
  180. TheNum = Decode(Mid(info, 1, 3))
  181. ToDo(Offset) = Mid(info, 4, TheNum)
  182. info = Right(info, Len(info) - TheNum - 3)
  183. Offset = Offset + 1
  184. If Len(info) >= 1 Then GoTo reloop
  185.  
  186. For P = 0 To UBound(ToDo)
  187. NewInfo = ToDo(P)
  188.  
  189. FindIt = Left(NewInfo, 2)
  190.  
  191. '''''' CHECK FOR INFOBUS PACKETS THE ONLY WAY I KNOW HOW ''''''
  192. Dim counter1 As Integer
  193. Dim countervotes As Integer
  194.  
  195. If NewInfo = "Ap1" Then
  196. counter1 = frmTab_publicroom_infobus.AnumA.Text
  197. countervotes = frmTab_publicroom_infobus.votestotal.Text
  198. countervotes = countervotes + 1
  199. counter1 = counter1 + 1
  200. frmTab_publicroom_infobus.AnumA.Text = counter1
  201. frmTab_publicroom_infobus.votestotal.Text = countervotes
  202. ElseIf NewInfo = "Ap2" Then
  203. counter2 = frmTab_publicroom_infobus.AnumB.Text
  204. countervotes = frmTab_publicroom_infobus.votestotal.Text
  205. countervotes = countervotes + 1
  206. counter2 = counter2 + 1
  207. frmTab_publicroom_infobus.AnumB.Text = counter2
  208. frmTab_publicroom_infobus.votestotal.Text = countervotes
  209. ElseIf NewInfo = "Ap3" Then
  210. counter3 = frmTab_publicroom_infobus.AnumC.Text
  211. countervotes = frmTab_publicroom_infobus.votestotal.Text
  212. countervotes = countervotes + 1
  213. counter3 = counter3 + 1
  214. frmTab_publicroom_infobus.AnumC.Text = counter3
  215. frmTab_publicroom_infobus.votestotal.Text = countervotes
  216. ElseIf NewInfo = "Ap4" Then
  217. counter4 = frmTab_publicroom_infobus.AnumD.Text
  218. countervotes = frmTab_publicroom_infobus.votestotal.Text
  219. countervotes = countervotes + 1
  220. counter4 = counter4 + 1
  221. frmTab_publicroom_infobus.AnumD.Text = counter4
  222. frmTab_publicroom_infobus.votestotal.Text = countervotes
  223. ElseIf NewInfo = "Ap5" Then
  224. counter5 = frmTab_publicroom_infobus.AnumE.Text
  225. countervotes = frmTab_publicroom_infobus.votestotal.Text
  226. countervotes = countervotes + 1
  227. counter5 = counter5 + 1
  228. frmTab_publicroom_infobus.AnumE.Text = counter5
  229. frmTab_publicroom_infobus.votestotal.Text = countervotes
  230. ElseIf NewInfo = "Ap6" Then
  231. counter6 = frmTab_publicroom_infobus.AnumF.Text
  232. countervotes = frmTab_publicroom_infobus.votestotal.Text
  233. countervotes = countervotes + 1
  234. counter6 = counter6 + 1
  235. frmTab_publicroom_infobus.AnumF.Text = counter6
  236. frmTab_publicroom_infobus.votestotal.Text = countervotes
  237. End If
  238. frmTab_publicroom_infobus.votestotal.Visible = True
  239. '''''' CHECK FOR INFOBUS PACKETS THE ONLY WAY I KNOW HOW ''''''
  240. BusLayout = ReadINI("config", "infobus_layout", DBP & "configuration\settings.ini")
  241.  
  242. If NewInfo = "BVHPWI" Then
  243. Send Index, "C\HPWH" & locale("pub_categorie_staff") & "HIQlIIThe InfobusRCRLPWpark[g}Hhh_room_park_" & BusLayout & ",hh_room_parkHI"
  244. End If
  245.  
  246. If NewInfo = "BVHSTI" Then
  247. 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"
  248. End If
  249.  
  250. If NewInfo = "BVHP`I" Then
  251. 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"
  252. End If
  253.  
  254. If NewInfo = "BVHPUI" Then
  255. Send Index, "C\HPUH" & locale("pub_categorie5") & "HPrKQCH" & locale("pub_categorie11") & "HP^PURJI" & locale("pub_name_29") & "HPTPUthe_chromide_clubXiiHhh_room_discoHI"
  256. End If
  257.  
  258. If NewInfo = "BVHQCI" Then
  259. 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"
  260. End If
  261.  
  262. If NewInfo = "BVHRcI" Then
  263. 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"
  264. End If
  265.  
  266. If NewInfo = "BVHQUI" Then
  267. 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"
  268. Send Index, Pub
  269. End If
  270.  
  271. If NewInfo = "BVHSeI" Then
  272. 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"
  273. Send Index, Pub
  274. End If
  275.  
  276. If NewInfo = "BVHPfI" Then
  277. 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"
  278. Send Index, Pub
  279. End If
  280.  
  281. If NewInfo = "BVHQfI" Then
  282. 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"
  283. Send Index, Pub
  284. End If
  285.  
  286. If NewInfo = "BVHSfI" Then
  287. 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"
  288. Send Index, Pub
  289. End If
  290.  
  291. If NewInfo = "BVHSVI" Then
  292. 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"
  293. Send Index, Pub
  294. End If
  295.  
  296. If NewInfo = "BVHQWI" Then
  297. 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"
  298. 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"
  299. Pub3 = "HPYQWbb_lobby_beginner_9Y|iHhh_game_bb,hh_game_bb_room,hh_game_bb_ui,hh_gamesysHI"
  300. Send Index, Pub1 & Pub2 & Pub3
  301. End If
  302.  
  303. If NewInfo = "BVHPdI" Then
  304. 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"
  305. Send Index, Pub
  306. End If
  307.  
  308. If NewInfo = "BVHRGI" Then
  309. 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"
  310. Send Index, Pub
  311. End If
  312.  
  313. If NewInfo = "BVHRWI" Then
  314. 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"
  315. Send Index, Pub
  316. End If
  317.  
  318. If NewInfo = "BVHSWI" Then
  319. 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"
  320. Send Index, Pub
  321. End If
  322.  
  323. If NewInfo = "BVHPXI" Then
  324. 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"
  325. Send Index, Pub
  326. End If
  327.  
  328. If NewInfo = "BVHQgI" Then
  329. 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"
  330. Send Index, Pub
  331. End If
  332.  
  333. If NewInfo = "BVHRfI" Then
  334. 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"
  335. Send Index, Pub
  336. End If
  337.  
  338. If NewInfo = "BVHRTI" Then
  339. 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"
  340. End If
  341.  
  342.  
  343.  
  344.  
  345.  
  346. If NewInfo = "AJJ100/DOOROPEN/TRUE" Then
  347. Number = ReadINI("config", "infobus_drink", DBP & "configuration\settings" & ".ini")
  348. WriteINI "config", "infobus_drink", Number + 1, DBP & "configuration\" & "\settings.ini"
  349. Client(Index).Carrying = Number
  350. Client(Index).Dance = True
  351. extbt = extbt & "drink " & Client(Index).Carrying & "/"
  352. Client(Index).DoDrink = False
  353. Client(Index).Update = True
  354. If Number = "25" Then
  355. WriteINI "config", "infobus_drink", "1", DBP & "configuration\" & "\settings.ini"
  356. End If
  357. End If
  358. If NewInfo = "AO10 0" Then
  359. Client(Index).Dancetype = "carryd Special Debbo" Or Client(Index).Dancetype = "carryd Sinas" Or Client(Index).Dancetype = "carryd cola" Or Client(Index).Dancetype = "carryd milk"
  360. Client(Index).Dance = True
  361. Client(Index).DoDrink = False
  362. Client(Index).Update = True
  363. End If
  364.  
  365.  
  366. If NewInfo = "BiH" Then
  367. If Client(Index).Publicnum = 30 Then
  368. Client(Index).Publicnum = 24
  369. Send Index, "AEbb_arena_1 11727"
  370. End If
  371. End If
  372.  
  373. If NewInfo = Aj Then
  374. 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)
  375. End If
  376.  
  377.  
  378.  
  379. If NewInfo = "Aj0ada%040d%270a00dadadad%090adad0a%04ds00sss000wwsa0s0ds00w0da0s00s%040wswwds0d00w00ds00sswws00ss00sd%040" Then
  380. Send Index, "AGdoor open "
  381. End If
  382.  
  383. If NewInfo = "Bc" Then
  384. If Client(Index).Publicnum = 30 Then
  385. Send Index, "DuIY^Sb0507Xs05087s30115s30113s21101ee52a0c187e97b9c769f9eb54f0cd8eb"
  386. End If
  387. End If
  388.  
  389. If NewInfo = "Bb" Then
  390. If Client(Index).Publicnum = 30 Then
  391. Send Index, "CkPDfieldTypeHJIIIIQAmaximumSimultaneousPowerupsHIJIIIRBpowerupCreateChanceHIRLIIIPYnumTeamsHJJIJIPAcoloringForOpponentTimePulsesHISCIIIPYgameLengthSecondsHIPmIHHallowedPowerupsII1,2,3HcleaningTilesTimePulsesHISCIIIPYpowerupCreateFirstTimePulsesHIHIHIPYsecondsUntilRestartHIRGIHHpowerupTimeToLivePulsesHIPOIQAIPYpowerupCreateIntervalPulsesHIPEIQAIPYstunTimePulsesHIRBIIIPYhighJumpsTimePulsesHISCIIIPYnameIJHsecondsUntilStartHISCIHH"
  392. End If
  393. End If
  394.  
  395. If NewInfo = "Bj" Then
  396. If Client(Index).Publicnum = 30 Then
  397. Client(Index).Publicnum = 35
  398. Send Index, "AEbb_arena_1 11727"
  399. If Client(Index).Publicnum = 35 Then
  400. Client(Index).He = 2
  401. Packet = FSO.OpenTextFile(DBP & "pub\" & Client(Index).Publicnum & "\packet.txt", ForReading).ReadAll
  402. Send Index, Packet
  403. End If
  404. End If
  405. End If
  406. If NewInfo = "BcPD@IfieldTypeHI@[maximumSimultaneousPowerupsHJ@SpowerupCreateChanceHRL@HnumTeamsHJ@]coloringForOpponentTimePulsesHSC@QgameLengthSecondsHPm@OallowedPowerupsI@E1,2,3@WcleaningTilesTimePulsesHSC@\powerupCreateFirstTimePulsesHH@SsecondsUntilRestartHRG@WpowerupTimeToLivePulsesHPO@[powerupCreateIntervalPulsesHPE@NstunTimePulsesHRB@ShighJumpsTimePulsesHSC@DnameI@DTest@QsecondsUntilStartHSCH" Then
  407. Send Index, "CkPDfieldTypeHJIIIIQAmaximumSimultaneousPowerupsHIJIIIRBpowerupCreateChanceHIRLIIIPYnumTeamsHJJIJIPAcoloringForOpponentTimePulsesHISCIIIPYgameLengthSecondsHIPmIHHallowedPowerupsII1,2,3HcleaningTilesTimePulsesHISCIIIPYpowerupCreateFirstTimePulsesHIHIHIPYsecondsUntilRestartHIRGIHHpowerupTimeToLivePulsesHIPOIQAIPYpowerupCreateIntervalPulsesHIPEIQAIPYstunTimePulsesHIRBIIIPYhighJumpsTimePulsesHISCIIIPYnameIJHsecondsUntilStartHISCIHH"
  408. End If
  409. If NewInfo = "Bl" Then
  410. If Client(Index).Publicnum = 30 Then
  411. Client(Index).Publicnum = 35
  412. Send Index, "AEbb_arena_1 11727"
  413. Send Index, "ChHIHANA kom hier!|tieneke156IQARB2 vs 2 no stealajaxhulpKSBNo stealhcrulzzJPC\o/martintje0IQClolololllollollloolllolloll--haboofan--IRC\o/martintje0J"
  414. Send Index, "CtJHIPBQBJRAHMHJQDPEJHHMIPBQBIKHJXzBX[BIH"
  415. Send Index, "DuKX@Ys14024s31027s18025s18023c003ad1c73932884422bcf4b205db45dbQLAb0911Xs02134s36044s42014s141045a46fd0238a13b758ec2633310285559YKts20027s43017s26027914462c14f8963b1b0291e884ffcaae2"
  416. Send Index, "CtJHISAPBJHHMHJSCPEJRAHMISAPBIKHJXzBX^BIH"
  417. Send Index, "@ZRAhihi"
  418. Send Index, "CtJHISASAJHHMHJRCPEJRAHMISASAIKHJXzBZ_BIH"
  419. Send Index, "CiIHANA kom hier!|tieneke156IJItieneke156Ihappystar271,2,3,4,9"
  420. Send Index, "CqYX}H"
  421. Send Index, "@S"
  422. End If
  423. End If
  424.  
  425.  
  426. If 1 = 1 Then
  427. If frmMain.chckLog.Value = 1 Then
  428. 'If FindIt = "AK" Then Exta = " [" & Decode(Mid(NewInfo, 3, 2)) & " " & Decode(Mid(NewInfo, 5, 2)) & "]" Else Exta = ""
  429. frmMain.txtLog.Text = frmMain.txtLog.Text + vbCrLf + "[" & Index & "] ›› " & NewInfo
  430. frmMain.txtLog.SelStart = Len(frmMain.txtLog.Text)
  431. End If
  432. End If
  433.  
  434. 'HANDLING
  435. Select Case FindIt
  436.  
  437. Case "CD" 'Connection request answer
  438. Client(Index).Close = 0
  439.  
  440. Case "CJ" 'things
  441. Hab_CJ NewInfo, Index
  442.  
  443. Case "@D" 'login
  444. Hab_AtD NewInfo, Index
  445.  
  446. Case "At" 'Lido booth
  447. Dim NewPool As String
  448. NewPool = (Mid(NewInfo, 3, 100))
  449. If NewPool = "" Then NewPool = "."
  450. FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\poolfigure.txt", ForWriting).Write NewPool
  451. Client(Index).PoolDat = NewPool
  452. If Client(Index).PosX = 17 And Client(Index).PosY = 11 And Client(Index).Publicnum = 25 Then 'in booth 1
  453. For a = 1 To frmMain.SockI
  454. If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = Client(Index).Publicnum Then
  455. 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)
  456. frmMain.socket(a).SendData "AGcurtains1 open" & Chr(1)
  457. End If
  458. Next a
  459. frmMain.Lido1.Text = "0"
  460. Client(Index).DestX = 19
  461. Client(Index).DestY = 11
  462. ElseIf Client(Index).PosX = 17 And Client(Index).PosY = 9 And Client(Index).Publicnum = 25 Then 'in booth 2
  463. For a = 1 To frmMain.SockI
  464. If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = Client(Index).Publicnum Then
  465. 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)
  466. frmMain.socket(a).SendData "AGcurtains2 open" & Chr(1)
  467. End If
  468. Next a
  469. Send Index, "Aa"
  470. frmMain.Lido2.Text = "0"
  471. Client(Index).DestX = 19
  472. Client(Index).DestY = 9
  473. ElseIf Client(Index).PosX = 8 And Client(Index).PosY = 0 And Client(Index).Publicnum = 27 Then 'in Rumble booth 1
  474. For a = 1 To frmMain.SockI
  475. If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = Client(Index).Publicnum Then
  476. 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)
  477. frmMain.socket(a).SendData "AGcurtains1 open" & Chr(1)
  478. End If
  479. Next a
  480. Send Index, "Aa"
  481. frmMain.Rumble1.Text = "0"
  482. Client(Index).DestX = "8"
  483. Client(Index).DestY = "2"
  484. ElseIf Client(Index).PosX = 9 And Client(Index).PosY = 0 And Client(Index).Publicnum = 27 Then 'in Rumble booth 2
  485. For a = 1 To frmMain.SockI
  486. If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = Client(Index).Publicnum Then
  487. 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)
  488. frmMain.socket(a).SendData "AGcurtains2 open" & Chr(1)
  489. End If
  490. Next a
  491. Send Index, "Aa"
  492. frmMain.Rumble2.Text = "0"
  493. Client(Index).DestX = "9"
  494. Client(Index).DestY = "2"
  495. End If
  496.  
  497. If NewInfo = "B`H" Then
  498. If Client(Index).Publicnum = 30 Then
  499. Client(Index).Publicnum = 30
  500. Client(Index).Publicname = locale("pub_name_30")
  501. Client(Index).Hotelpos = "I" & Client(Index).Publicname
  502. Send Index, "AEbb_arena_1 11727"
  503. End If
  504. End If
  505.  
  506. If Client(Index).Publicnum = 30 Then
  507. If NewInfo = "BeHI" Then
  508. Send Index, "ISO" & Client(Index).Name
  509. End If
  510. End If
  511.  
  512. '------------------TRAX--------------
  513. Case "CZ" 'Save Trax
  514. Dim Tape As String
  515. Tape = (Mid(NewInfo, 5, 10000))
  516. FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForWriting).Write Tape
  517. audio = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForReading).ReadAll
  518. Send Index, "PAJIIQBIJKPAQARASAPBQBJPBQBPPQPRPSPPQQQRQSQPR" & audio & Chr(13)
  519. Send Index, "Dm" & "PAJIIQBIJKPAQARASAPBQBJPBQBPPQPRPSPPQQQRQSQPR" & audio & Chr(1)
  520.  
  521. Case "C]" 'Turn Machine on
  522. audio = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForReading).ReadAll
  523. sendAll "Dl" & audio & "PR" & Chr(1), Client(Index).InRoom
  524.  
  525. Case "CY" 'Open Editor and load
  526. If FSO.FileExists(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix") = False Then
  527. FSO.CreateTextFile DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix"
  528. FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForWriting).Write "sound_set 1"
  529. End If
  530. If FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForReading).ReadAll = "" Then
  531. FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForWriting).Write "sound_set 1"
  532. End If
  533. audio = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\audio.bix", ForReading).ReadAll
  534. Send Index, "Dm" & "PAPAIKQBSDPEQERESEPFQFRFSFJQAQBQIRISIPJQJRJSJPKQKKIQBIJKPAQARASAPBQBPARAQBRKSKPLQLRLSLPMQMRMDl" & audio & Chr(1)
  535. sendAll "Dl" & audio & "PR" & Chr(1), Client(Index).InRoom
  536. '------------------TRAX--------------
  537.  
  538. Case "Ak"
  539. DiveX = (Mid(NewInfo, 3, 3))
  540. DiveY = (Mid(NewInfo, 6, 6))
  541. AGLoc = (Mid(NewInfo, 3, 10))
  542. frmMain.LidoCammed.Text = Client(Index).Num
  543. sendAllP "AGBIGSPLASH position " & AGLoc & Chr(1) & "AGcam1 transition cameraPan@rAGcam1 targetcamera " & frmMain.LidoCammed.Text & "", 36
  544. frmMain.TimerDiveGuard.Enabled = False
  545. frmMain.TimerLidoVote.Enabled = True
  546. frmMain.LastDiver.Text = Client(Index).Name
  547. frmMain.LastDiverNum.Text = Client(Index).Num
  548. Send Index, "AJ20" & Chr(1)
  549. Client(Index).Dance = True
  550. Client(Index).Dancetype = "Swim"
  551. Client(Index).Dives = False
  552. Client(Index).PosX = DiveX
  553. Client(Index).PosY = DiveY
  554. Client(Index).He = "0"
  555. Client(Index).DestX = "20"
  556. Client(Index).DestY = "19"
  557.  
  558.  
  559.  
  560. ''''voting''''
  561.  
  562. Case "Ah" 'lido voting
  563. WantedVote = (Mid(NewInfo, 3, 3))
  564. If Client(Index).Dancetype = "Swim" = False And Client(Index).Vote = False And frmMain.TimerVote(Index).Enabled = False Then
  565. Client(Index).DestX = Client(Index).PosX
  566. Client(Index).DestY = Client(Index).PosY
  567. Client(Index).Dancetype = "sign " & WantedVote & ""
  568. Client(Index).Dance = True
  569. Client(Index).Vote = True
  570. frmMain.TimerVote(Index).Enabled = True
  571. ElseIf Client(Index).Dancetype = "Swim" = True Then
  572. Client(Index).DestX = Client(Index).PosX
  573. Client(Index).DestY = Client(Index).PosY
  574. Client(Index).Dancetype = "swim/sign " & WantedVote & ""
  575. Client(Index).Dance = True
  576. If Client(Index).SwimVote = False Then
  577. Client(Index).SwimVote = True
  578. frmMain.TimerVote(Index).Enabled = True
  579. End If
  580. End If
  581. If frmMain.TimerLidoVote.Enabled = True And (Client(Index).HasVoted = False) And (Client(Index).Name = LastDiver.Text = False) Then 'add users vote to the voting
  582. If WantedVote = "1" Then UsersRating = "4"
  583. If WantedVote = "2" Then UsersRating = "5"
  584. If WantedVote = "3" Then UsersRating = "6"
  585. If WantedVote = "4" Then UsersRating = "7"
  586. If WantedVote = "5" Then UsersRating = "8"
  587. If WantedVote = "6" Then UsersRating = "9"
  588. If WantedVote = "7" Then UsersRating = "10"
  589. frmMain.LidoVoteSum.Text = frmMain.LidoVoteSum.Text + Val(UsersRating)
  590. frmMain.LidoTotalVotes.Text = frmMain.LidoTotalVotes.Text + Val(1)
  591. Client(Index).HasVoted = True
  592. End If
  593.  
  594.  
  595. Case "Ai" 'tickets
  596. Dim TicketDat As String
  597. Dim TicketReceiver As String
  598. TicketDat = (Mid(NewInfo, 1, 3))
  599. TicketReceiver = (Mid(NewInfo, 6, 20))
  600. If TicketDat = "AiI" Then
  601. PlusTickets = 2
  602. CostTickets = 1
  603. ElseIf TicketDat = "AiJ" Then
  604. PlusTickets = 20
  605. CostTickets = 6
  606. End If
  607. If FSO.FolderExists(DBP & "habbos\" & LCase(TicketReceiver)) Then 'buy tickets for the specified Habbi
  608. Credits = FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\credits.txt", ForReading).ReadAll
  609. tickets = FSO.OpenTextFile(DBP & "habbos\" & LCase(TicketReceiver) & "\tickets.txt", ForReading).ReadAll
  610. If Credits >= Val(CostTickets) Then
  611. MyCredits = Credits - CostTickets
  612. MyTickets = tickets + PlusTickets
  613. FSO.OpenTextFile(DBP & "habbos\" & LCase(TicketReceiver) & "\tickets.txt", ForWriting).Write MyTickets
  614. FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\credits.txt", ForWriting).Write MyCredits
  615. For a = 1 To frmMain.SockI
  616. 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)
  617. Next a
  618. Send Index, "@F" & MyCredits & ".0" & Chr(1)
  619. Else 'alert the buyer hasn't enough credits
  620. Send Index, "AD" & Chr(1)
  621. End If
  622. Else 'alert that the user isn't found
  623. Send Index, "BK" & locale(buytickets_notfound) & Chr(1)
  624. End If
  625.  
  626.  
  627. Case "Aj"
  628. DiveDat = (Mid(NewInfo, 2, 10000))
  629. sendAllP "AJ" & Client(Index).Num & Chr(13) & DiveDat, 36
  630.  
  631. Case "@H" 'get info
  632. Hab_Ath NewInfo, Index
  633.  
  634. Case "@L" 'console shit, WORK IN THIS!
  635. Hab_AtL NewInfo, Index
  636.  
  637. Case "@Z" 'get hc days badge(s) etc
  638. Hab_AtZ NewInfo, Index
  639.  
  640. Case "B~" 'buy hc
  641. Hab_Bgolf NewInfo, Index
  642.  
  643. Case "@I" 'update id (get)
  644. Hab_Ati NewInfo, Index
  645.  
  646. Case "@l" 'update id
  647. Hab_Atl2 NewInfo, Index
  648.  
  649. Case "BA" 'voucher
  650. Hab_BA NewInfo, Index
  651.  
  652. Case "@]" 'create private room
  653. Hab_Athaak NewInfo, Index
  654.  
  655. Case "BY" 'change category
  656. Hab_BY NewInfo, Index
  657.  
  658. Case "@P" 'room list by name
  659. Hab_AtP NewInfo, Index
  660.  
  661. Case "@Q" 'room list by query
  662. Hab_AtQ NewInfo, Index
  663.  
  664. Case "BW" 'room list home
  665. Hab_BW NewInfo, Index
  666.  
  667. Case "@U" 'room info
  668. Hab_AtU NewInfo, Index
  669.  
  670. Case "BX" 'modify room
  671. Hab_BX NewInfo, Index
  672.  
  673. Case "@Y" 'modify room
  674. Hab_AtY NewInfo, Index
  675.  
  676. Case "@X" 'modify room
  677. Hab_AtX NewInfo, Index
  678.  
  679. Case "B[" 'remove all rights
  680. Hab_Bhaak NewInfo, Index
  681.  
  682. Case "@W" 'remove guestroom
  683. Hab_AtW NewInfo, Index
  684.  
  685. Case "@S" 'add room to favourites ( @SH)
  686. Hab_AtS NewInfo, Index
  687.  
  688. Case "@T" 'delete room from favourites ( @TH)
  689. Hab_AtT NewInfo, Index
  690.  
  691. Case "@R" 'get favourites ( @R@)
  692. Hab_AtR NewInfo, Index
  693.  
  694. Case "Bv" 'enter room ?
  695. Hab_Bv NewInfo, Index
  696.  
  697. Case "@B" 'enter room ?
  698. Hab_Atb NewInfo, Index
  699.  
  700. Case "@y" 'enter pass for room
  701. Hab_Aty2 NewInfo, Index
  702.  
  703. Case "@{" 'enter room ?
  704. Hab_Atlol NewInfo, Index
  705. frmMain.socket(Index).SendData furniture & Chr(1)
  706. socket(Index).SendData "DiH" & Chr(1)
  707.  
  708. Case "CW"
  709. frmMain.socket(Index).SendData furniture
  710.  
  711. Case "A" 'get transactions (not supported)
  712. Hab_Ablokje NewInfo, Index
  713.  
  714. Case "A~" 'enter room ?
  715. Hab_Agolf NewInfo, Index
  716.  
  717. Case "@" 'enter room ?
  718. Hab_Atblokje NewInfo, Index
  719.  
  720. Case "A@" 'enter room ?
  721. Hab_Aat Index
  722.  
  723. Case "@~" 'public room data
  724. Hab_Atgolf NewInfo, Index
  725.  
  726. Case "AO" 'look
  727. Hab_AO NewInfo, Index
  728.  
  729. Case "AK" 'walk
  730. Hab_AK NewInfo, Index
  731.  
  732. Case "B^" 'badge select
  733. Hab_Bdak NewInfo, Index
  734.  
  735. Case "A]" 'dance
  736. Hab_Ahaak NewInfo, Index
  737.  
  738. Case "A^" 'wave
  739. Hab_Adak NewInfo, Index
  740.  
  741. Case "AX" 'stop something
  742. Hab_AX NewInfo, Index
  743.  
  744. Case "A`" 'give rights
  745. Hab_Astreep NewInfo, Index
  746.  
  747. Case "Aa" 'remove rights
  748. Hab_Aa NewInfo, Index
  749.  
  750. Case "A_" 'kick
  751. Hab_Alaag NewInfo, Index
  752.  
  753. Case "@u" 'leave room ?
  754. Hab_Kick Index
  755.  
  756. Case "As" 'click door
  757. Hab_As NewInfo, Index
  758.  
  759. Case "@w" 'shout
  760. Hab_Atw2 NewInfo, Index
  761.  
  762. Case "@t" 'talk
  763. Hab_Att2 NewInfo, Index
  764.  
  765. Case "@x" 'whisper
  766. Hab_Atx2 NewInfo, Index
  767.  
  768. Case "AA" 'hand stuff
  769. Hab_AA2 NewInfo, Index
  770.  
  771. Case "AB" 'floor & wallpaper
  772. Hab_AB NewInfo, Index
  773.  
  774. Case "AZ" 'put down furni
  775. Hab_AZ NewInfo, Index
  776.  
  777. Case "AC" 'pick up furni
  778. Hab_AC NewInfo, Index
  779.  
  780. Case "AI" 'move/rotate furni
  781. Hab_AI NewInfo, Index
  782.  
  783. Case "AJ" 'turn on /off
  784. Hab_AJ NewInfo, Index
  785.  
  786. Case "AM" 'turn off dice
  787. Hab_AM NewInfo, Index
  788.  
  789. Case "AL" 'turn on
  790. Hab_AL NewInfo, Index
  791.  
  792. Case "AN" 'open present
  793. Hab_AN NewInfo, Index
  794.  
  795. Case "AQ" 'walk in teleport
  796. Hab_AQ NewInfo, Index
  797.  
  798. Case "@\" 'teleport
  799. Hab_AtSlash NewInfo, Index
  800.  
  801. Case "AR" 'flash teleport
  802. Hab_AR NewInfo, Index
  803.  
  804. Case "@v" 'enter room with teleport
  805. Hab_Atv NewInfo, Index
  806.  
  807. Case "AS" 'open stickie
  808. Hab_AS2 NewInfo, Index
  809.  
  810. Case "AT" 'edit stickie
  811. Hab_AT NewInfo, Index
  812.  
  813. Case "AU" 'delete stickie
  814. Hab_AU NewInfo, Index
  815.  
  816. Case "AG" 'start trade
  817. Hab_AG NewInfo, Index
  818.  
  819. Case "AF" 'stop trade
  820. Hab_AF NewInfo, Index
  821.  
  822. Case "AH" 'add item to trade
  823. Hab_AH NewInfo, Index
  824.  
  825. Case "AE" 'accept trade
  826. Hab_AE NewInfo, Index
  827.  
  828. Case "AD" 'unaccept trade
  829. Hab_AD NewInfo, Index
  830.  
  831. Case "AP" 'carry something
  832. Hab_AP NewInfo, Index
  833.  
  834. Case "Ae" 'open cato
  835. Hab_Ae2 NewInfo, Index
  836.  
  837. Case "Af" 'open cato page
  838. Hab_Af2 NewInfo, Index
  839.  
  840. Case "@q" 'get date
  841. Hab_Atq2 NewInfo, Index
  842.  
  843. Case "Ad" 'buy stuff
  844. Hab_Ad2 NewInfo, Index
  845.  
  846. Case "AW" 'carry item
  847. Hab_AW NewInfo, Index
  848.  
  849. Case "AY" 'use item
  850. Hab_AY NewInfo, Index
  851.  
  852. Case "@j" 'something for pets & registering
  853. Hab_Atj NewInfo, Index
  854.  
  855. Case "B@" 'pet info
  856. Hab_Bat NewInfo, Index
  857.  
  858. Case "Ab" 'door bell yes no
  859. Hab_Ab2 NewInfo, Index
  860.  
  861. Case "BV" 'open category
  862. Hab_BV2 NewInfo, Index
  863.  
  864. Case "CH" 'mod tool
  865. Hab_CH NewInfo, Index
  866.  
  867. Case "AV" 'call for help
  868. Hab_AV NewInfo, Index
  869.  
  870. Case "@p" 'pick call for help
  871. Hab_Atp2 NewInfo, Index
  872.  
  873. Case "CF" 'assign call to mods or helpers
  874. Hab_CF NewInfo, Index
  875.  
  876. Case "CG" 'reply to cfh
  877. Hab_CG NewInfo, Index
  878.  
  879. Case "@k" 'register
  880. Hab_Atk NewInfo, Index
  881.  
  882. Case "CK" 'Check Passwordlength
  883. Hab_CK NewInfo, Index
  884.  
  885. Case "BU" 'change password
  886. Hab_Bu NewInfo, Index
  887.  
  888. Case "CI" 'report message
  889. Hab_Ci NewInfo, Index
  890.  
  891. Case "@d" 'change console Mission
  892. Hab_Atd2 NewInfo, Index
  893.  
  894. Case "@i" 'Search User at console
  895. Hab_Ati2 NewInfo, Index
  896.  
  897. Case "@O" 'Update Console
  898. Hab_Ato NewInfo, Index
  899.  
  900. Case "@`" 'Delete Message
  901. Hab_Atquo NewInfo, Index
  902.  
  903. Case "@_" 'Delete Staff Message
  904. Hab_Atquo NewInfo, Index
  905.  
  906. Case "@g" 'Ask for Friend
  907. Hab_Atg NewInfo, Index
  908.  
  909. Case "@f" 'Dont accept ask for Friend
  910. Hab_Atf NewInfo, Index
  911.  
  912. Case "@e" 'Accept ask for Friend
  913. Hab_Ate NewInfo, Index
  914.  
  915. Case "@h" 'Delete Friend
  916. Hab_Ath2 NewInfo, Index
  917.  
  918. Case "@a" 'Send Console Message
  919. Hab_Ata NewInfo, Index
  920.  
  921.  
  922.  
  923.  
  924. Case "CV" ' Candle thing.. ;]
  925. wallID = Val(Mid(NewInfo, 5))
  926. cust = Split(NewInfo, wallID)(1)
  927. loca = FSO.OpenTextFile(DBP & "furni\" & wallID & "\loc.txt", ForReading).ReadAll
  928. Fname = FSO.OpenTextFile(DBP & "furni\" & wallID & "\name.txt", ForReading).ReadAll
  929. Fvar = FSO.OpenTextFile(DBP & "furni\" & wallID & "\var.txt", ForReading).ReadAll
  930. If Fvar = "3" Or Fvar = "2" Or Fvar = "H" Or Fvar = "J" Then
  931. FSO.OpenTextFile(DBP & "furni\" & wallID & "\var.txt", ForWriting).Write "I"
  932. sendAll "AU" & wallID & Chr(9) & " " & Fname & " " & loca & Chr(9) & "2" & Chr(1), (Client(Index).InRoom)
  933. ElseIf Fvar = "1" Or Fvar = "2" Or Fvar = "I" Then
  934. FSO.OpenTextFile(DBP & "\furni\" & wallID & "\var.txt", ForWriting).Write "J"
  935. sendAll "AU" & wallID & Chr(9) & " " & Fname & " " & loca & Chr(9) & "1" & Chr(1), (Client(Index).InRoom)
  936. End If
  937.  
  938.  
  939. Case "Ac" 'Delete Furni
  940. Hab_Ac2 NewInfo, Index
  941.  
  942. Case "Bw" ' Habbo Exchange
  943. 'Hab_Bw2 NewInfo, Index
  944. FurniID = VL64Decode(Mid(NewInfo, 3))
  945. 'FID = Split(NewInfo, "Bw")(1)
  946. 'FID2 = VL64Decode(FID)
  947. 'frmMain.socket(Index).SendData "B! Furniture ID - " & FID & " " & FurniID & Chr(1)
  948. NewLijst = ";"
  949. Lijst2 = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\furni.txt", ForReading).ReadAll
  950. Lijst = Split(Lijst2, ";")
  951. For a = 0 To UBound(Lijst)
  952. If Lijst(a) <> "" And Lijst(a) <> FurniID Then NewLijst = NewLijst & ";" & Lijst(a)
  953. Next a
  954. NewLijst = Replace(NewLijst, ";;", ";")
  955. FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\furni.txt", ForWriting).Write NewLijst
  956.  
  957. FurniType = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\type.txt", ForReading).ReadAll
  958. Custt = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\cust.txt", ForReading).ReadAll
  959. Fname = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\name.txt", ForReading).ReadAll
  960. loca = Split(FSO.OpenTextFile(DBP & "furni\" & FurniID & "\loc.txt", ForReading).ReadAll, " ")
  961. Innroom = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\inroom.txt", ForReading).ReadAll
  962. htmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\shtmp.txt").ReadAll
  963. Walkmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\walk.txt").ReadAll
  964.  
  965. Doen = "O"
  966.  
  967. Fvar = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\var.txt", ForReading).ReadAll
  968. 'roller
  969. If FurniType = "roller" Then
  970. frmMain.LoadedRollers = Replace(frmMain.LoadedRollers, "<" & FurniID & ">", "")
  971. FurniOP = ReadINI("furnies", loca(0) & "," & loca(1), DBP & "privaterooms\" & Innroom & "\rotation.txt")
  972. If FurniOP <> "" Then
  973. FurniTypeX = FSO.OpenTextFile(DBP & "furni\" & FurniOP & "\type.txt", ForReading).ReadAll
  974. If FurniTypeX = "sit" Then Doen = "S"
  975. If FurniTypeX = "bed" Then Doen = "L"
  976. If FurniTypeX = "solid" Then Doen = "X"
  977. If FurniTypeX = "door" Then
  978. If InStr(Fvar, "O") Then
  979. Doen = "D"
  980. Else
  981. Doen = "X"
  982. End If
  983. End If
  984. End If
  985. End If
  986. 'roller
  987.  
  988. 'pet part
  989. If Fname = "nest" Then
  990. Hpets2 = ""
  991. splitP = Split(frmMain.Hpets, ";")
  992. For b = 0 To UBound(splitP)
  993. If splitP(b) <> "" Then
  994. If Pet(splitP(b)).FurniID = FurniID Then
  995. Unload frmMain.PetTimer(splitP(b))
  996. Nums = Replace(Nums, "<" & splitP(b) & ">", "")
  997. If Pet(splitP(b)).Actiontype = "pla" Then Pet(splitP(b)).Actiontype = ""
  998. 'save status
  999. WriteINI "pet", "alive", Pet(splitP(b)).Alive, DBP & "furni\" & FurniID & "\status.txt"
  1000. WriteINI "pet", "drinktimer", Pet(splitP(b)).DrinkTimer, DBP & "furni\" & FurniID & "\status.txt"
  1001. WriteINI "pet", "eattimer", Pet(splitP(b)).EatTimer, DBP & "furni\" & FurniID & "\status.txt"
  1002. WriteINI "pet", "sleep", Pet(splitP(b)).Sleep, DBP & "furni\" & FurniID & "\status.txt"
  1003. WriteINI "pet", "sleeptimer", Pet(splitP(b)).SleepTimer, DBP & "furni\" & FurniID & "\status.txt"
  1004. WriteINI "pet", "sleepduration", Pet(splitP(b)).SleepDuration, DBP & "furni\" & FurniID & "\status.txt"
  1005. WriteINI "pet", "he", Pet(splitP(b)).He, DBP & "furni\" & FurniID & "\status.txt"
  1006. WriteINI "pet", "look", Mid(Pet(splitP(b)).Look, 1, InStr(Pet(splitP(b)).Look, ",") - 1), DBP & "furni\" & FurniID & "\status.txt"
  1007. WriteINI "pet", "posx", Pet(splitP(b)).PosX, DBP & "furni\" & FurniID & "\status.txt"
  1008. WriteINI "pet", "posy", Pet(splitP(b)).PosY, DBP & "furni\" & FurniID & "\status.txt"
  1009. WriteINI "pet", "sit", Pet(splitP(b)).Sit, DBP & "furni\" & FurniID & "\status.txt"
  1010. WriteINI "pet", "lay", Pet(splitP(b)).Lay, DBP & "furni\" & FurniID & "\status.txt"
  1011. WriteINI "pet", "gesture", Pet(splitP(b)).Gesture, DBP & "furni\" & FurniID & "\status.txt"
  1012. WriteINI "pet", "action", Pet(splitP(b)).Action, DBP & "furni\" & FurniID & "\status.txt"
  1013. WriteINI "pet", "actiontype", Pet(splitP(b)).Actiontype, DBP & "furni\" & FurniID & "\status.txt"
  1014. 'save status
  1015. Pet(splitP(b)).Name = ""
  1016. sendAll "@]" & splitP(b) & Chr(1), (Client(Index).InRoom)
  1017. Else
  1018. Hpets2 = Hpets2 & splitP(b) & ";"
  1019. End If
  1020. End If
  1021. Next b
  1022. frmMain.Hpets = Hpets2
  1023. End If
  1024. 'pet part
  1025.  
  1026. Fx = Val(loca(0))
  1027. Fy = Val(loca(1))
  1028.  
  1029. Dim Custsplit() As String
  1030. Custsplit() = Split(Custt, "")
  1031. Dim ForX As Integer, ForY As Integer
  1032. If Val(loca(2)) = 0 Or Val(loca(2)) = 4 Then
  1033. BijX = Val(Custsplit(0))
  1034. BijY = Val(Custsplit(1))
  1035. Else
  1036. BijX = Val(Custsplit(1))
  1037. BijY = Val(Custsplit(0))
  1038. End If
  1039.  
  1040.  
  1041.  
  1042. Walksplit = Split(Walkmp, Chr(13))
  1043. For ForX = Fx To Fx + BijX - 1
  1044. For ForY = Fy To Fy + BijY - 1
  1045. 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)
  1046. FSO.CopyFile DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt", DBP & "privaterooms\" & Client(Index).InRoom & "\rotationb.txt", True
  1047. TopID = ReadINI("furnies", ForX & "," & ForY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
  1048. If TopID = FurniID Then
  1049. StackHere = ReadINI("stacked", ForX & "," & ForY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
  1050. If StackHere <> "" Then
  1051. WriteINI "furnies", ForX & "," & ForY, StackHere, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"
  1052. WriteINI "stacked", ForX & "," & ForY, "", DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"
  1053. 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)
  1054. Else
  1055. WriteINI "furnies", ForX & "," & ForY, "", DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"
  1056. End If
  1057. Else
  1058. FurniHere = ReadINI("stacked", ForX & "," & ForY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
  1059. If FurniHere <> "" Then
  1060. WriteINI "stacked", ForX & "," & ForY, "", DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"
  1061. 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)
  1062. Else
  1063. WriteINI "stacked", ForX & "," & ForY, "", DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"
  1064. End If
  1065. End If
  1066. Next ForY
  1067. Next ForX
  1068. Walkmp = Join(Walksplit, Chr(13))
  1069. FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\walk.txt", ForWriting).Write Walkmp
  1070. 'make space
  1071.  
  1072. NewLijst = ";"
  1073. Lijst2 = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\furni.txt", ForReading).ReadAll
  1074. Lijst = Split(Lijst2, ";")
  1075. For a = 0 To UBound(Lijst)
  1076. If Lijst(a) <> "" And Lijst(a) <> FurniID Then NewLijst = NewLijst & ";" & Lijst(a)
  1077. Next a
  1078. NewLijst = Replace(NewLijst, ";;", ";")
  1079. FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\furni.txt", ForWriting).Write NewLijst
  1080.  
  1081. FSO.OpenTextFile(DBP & "furni\" & FurniID & "\inroom.txt", ForWriting).Write 0
  1082.  
  1083. Credits = FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\credits.txt", ForReading).ReadAll
  1084. amount = FSO.OpenTextFile(DBP & "furni\" & FurniID & "\name.txt", ForReading).ReadAll
  1085. 'If FurniID = "P]" Then
  1086. If amount = "CF_50_goldbar" Then
  1087. NewCredits = Credits + 50 'CF_20_moneybag
  1088. ElseIf amount = "CF_20_moneybag" Then
  1089. NewCredits = Credits + 20
  1090. ElseIf amount = "CF_10_coin_gold" Then
  1091. NewCredits = Credits + 10
  1092. ElseIf amount = "CF_5_coin_silver" Then
  1093. NewCredits = Credits + 5
  1094. ElseIf amount = "CF_1_coin_bronze" Then
  1095. NewCredits = Credits + 1
  1096. End If
  1097. sendAll "A^" & FurniID & Chr(1), (Client(Index).InRoom)
  1098. FSO.OpenTextFile(DBP & "habbos\" & LCase(Client(Index).Name) & "\credits.txt", ForWriting).Write NewCredits
  1099. If socket(Index).State = sckConnected Then socket(Index).SendData "@F" & NewCredits & ".00" & Chr(1)
  1100. FSO.DeleteFolder DBP & "furni\" & FurniID, True
  1101.  
  1102. Case "CN"
  1103. If socket(Index).State = sckConnected Then frmMain.socket(Index).SendData "DUIH" & Chr(1)
  1104.  
  1105. 'some things that don't need a function
  1106. Case "BC"
  1107. If socket(Index).State = sckConnected Then socket(Index).SendData "CV" & Chr(1)
  1108.  
  1109. Case "CE"
  1110. If socket(Index).State = sckConnected Then socket(Index).SendData "DO" & Chr(1)
  1111.  
  1112. Case "BR"
  1113. If socket(Index).State = sckConnected Then socket(Index).SendData "CY1" & Chr(1)
  1114.  
  1115. Case "@n"
  1116. If socket(Index).State = sckConnected Then socket(Index).SendData "DO" & Chr(1)
  1117.  
  1118.  
  1119. End Select
  1120. 'HANDLING
  1121. Next
  1122. fuckyomom:
  1123. End Sub
  1124.  
  1125.  
  1126. Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
  1127. If KeyCode = vbKeyEscape Then
  1128. If Text2.Visible = False Then
  1129. Text2.Visible = True
  1130. Else
  1131. Text2.Visible = False
  1132. End If
  1133. End If
  1134. If KeyCode = vbKeyReturn Then
  1135. If Text2.Text = "´commands´" Then
  1136. 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"
  1137. Exit Sub
  1138. End If
  1139. If Text2.Text = "´showcfh´" Then
  1140. Packet = "CALL FOR HELP STOREDDATA"
  1141. For a = 1 To CFHs
  1142. If Len(CFH(a).Text) > 1 Then
  1143. Packet = Packet & vbNewLine & CFH(a).Text
  1144. End If
  1145. Next a
  1146. Text2.Text = ""
  1147. MsgBox Packet, vbInformation, "Server"
  1148. Exit Sub
  1149. End If
  1150. If Text2.Text = "´dicetimers´" Then
  1151. Text2.Text = ""
  1152. MsgBox frmMain.dices, vbInformation, "Server"
  1153. Exit Sub
  1154. End If
  1155. If Text2.Text = "´loadedrollers´" Then
  1156. Text2.Text = ""
  1157. MsgBox frmMain.LoadedRollers, vbInformation, "Server"
  1158. Exit Sub
  1159. End If
  1160. If InStr(Text2.Text, "´sendall´") = 1 Then
  1161. Packet = Mid(Text2.Text, InStr(Text2.Text, " ") + 1)
  1162. Packet = Replace(Packet, "´1´", Chr(1))
  1163. Packet = Replace(Packet, "´2´", Chr(2))
  1164. Packet = Replace(Packet, "´13´", Chr(13))
  1165. For a = 1 To SockI
  1166. If socket(a).State = sckConnected Then
  1167. socket(a).SendData Packet
  1168. End If
  1169. Next a
  1170. Text2.Text = ""
  1171. Exit Sub
  1172. End If
  1173. End If
  1174. End Sub
  1175.  
  1176. Private Sub Timer1_Timer()
  1177.  
  1178. End Sub
  1179.  
  1180. Private Sub TimerBotAction_Timer(Index As Integer)
  1181. If Bot(Index).Otheraction = True Then
  1182. Bot(Index).Otheraction = False
  1183. Exit Sub
  1184. End If
  1185. For b = 1 To SockI
  1186. If socket(b).State = sckConnected Then
  1187. If Client(b).Publicnum = Bot(Index).Publicnum Then GoTo ThereAreGuests
  1188. End If
  1189. Next b
  1190. Exit Sub
  1191. ThereAreGuests:
  1192. Randomize
  1193. BotAction = Int((2 - 1 + 1) * Rnd) + 1
  1194. If BotAction = 1 Then
  1195. Tries = 0
  1196. TryAgain1:
  1197. Randomize
  1198. SayNum = Int((7 - 1 + 1) * Rnd) + 1
  1199. Saying = ReadINI("bot", "talk" & SayNum, DBP & "pub\" & Bot(Index).Publicnum & "\data.ini")
  1200. If Saying <> "0" And Saying <> "" Then
  1201. If InStr(Saying, Chr(2)) = 0 Then Saying = "say" & Chr(2) & Saying
  1202. If Split(Saying, Chr(2))(0) = "say" Then
  1203. For a = 1 To frmMain.SockI
  1204. 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
  1205. Send a, "@X" & VL64encode(Bot(Index).Num) & Split(Saying, Chr(2))(1) & Chr(2) & Chr(1)
  1206. End If
  1207. Next a
  1208. Else
  1209. sendAllP "@Z" & VL64encode(Bot(Index).Num) & Split(Saying, Chr(2))(1) & Chr(2) & Chr(1), (Bot(Index).Publicnum)
  1210. End If
  1211. Tijd = Len(Saying) * 100
  1212. If Tijd < 500 Then Tijd = 500
  1213. Bot(Index).Talking = True
  1214. TimerBotTalk(Index).Interval = Tijd
  1215. TimerBotTalk(Index).Enabled = True
  1216. Bot(Index).Update = True
  1217. Exit Sub
  1218. Else
  1219. Tries = Tries + 1
  1220. If Tries >= 20 Then
  1221. Exit Sub
  1222. End If
  1223. GoTo TryAgain1
  1224. End If
  1225. Else
  1226. Tries = 0
  1227. Walks = Split(ReadINI("bot", "walkspace", DBP & "pub\" & Bot(Index).Publicnum & "\data.ini"), ",")
  1228. TryAgain2:
  1229. Randomize
  1230. NewDest = Int((UBound(Walks) - 1 + 1) * Rnd) + 1
  1231. NewDest = Walks(NewDest)
  1232. If InStr(NewDest, " ") <> 0 Then
  1233. If IsNumeric(Split(NewDest, " ")(0)) = True And IsNumeric(Split(NewDest, " ")(1)) = True Then
  1234. Bot(Index).DestX = Split(NewDest, " ")(0)
  1235. Bot(Index).DestY = Split(NewDest, " ")(1)
  1236. Bot(Index).Update = True
  1237. Exit Sub
  1238. Else
  1239. Tries = Tries + 1
  1240. If Tries >= 20 Then
  1241. Exit Sub
  1242. End If
  1243. GoTo TryAgain2
  1244. End If
  1245. Else
  1246. Tries = Tries + 1
  1247. If Tries >= 20 Then
  1248. Exit Sub
  1249. End If
  1250. GoTo TryAgain2
  1251. End If
  1252. End If
  1253. End Sub
  1254.  
  1255. Private Sub TimerBotTalk_Timer(Index As Integer)
  1256. On Error GoTo lol
  1257. TimerBotTalk(Index).Enabled = False
  1258. Bot(Index).Talking = False
  1259. Bot(Index).Update = True
  1260. lol:
  1261. End Sub
  1262.  
  1263. Private Sub TimerBotUpdate_Timer(Index As Integer)
  1264. If Bot(Index).Update = True Then
  1265. extb = ""
  1266. FirstHeBot = Bot(Index).He
  1267. If Bot(Index).Talking = True Then
  1268. extb = extb & "talk/"
  1269. End If
  1270. If Bot(Index).PosX <> Bot(Index).DestX Or Bot(Index).PosY <> Bot(Index).DestY Then
  1271. HeightMap = FSO.OpenTextFile(DBP & "pub\" & Bot(Index).Publicnum & "\heightmap.map", ForReading).ReadAll
  1272. NwPB = FindPathBot(Index, Bot(Index).PosX, Bot(Index).PosY, Bot(Index).DestX, Bot(Index).DestY, HeightMap)
  1273. If NwPB = "NoPath" Then
  1274. Bot(Index).DestX = Bot(Index).PosX
  1275. Bot(Index).DestY = Bot(Index).PosY
  1276. NwPB = Bot(Index).PosX & "," & Bot(Index).PosY
  1277. Else
  1278. extb = extb & "mv " & NwPB & "," & Bot(Index).He & "/"
  1279. End If
  1280. End If
  1281. If Bot(Index).DestX = Bot(Index).PosX And Bot(Index).DestY = Bot(Index).PosY Then
  1282. Bot(Index).InUse = False
  1283. Bot(Index).Look = Bot(Index).Standartlook
  1284. Bot(Index).Update = False
  1285. End If
  1286. sendAllP "@b" & Bot(Index).Num & " " & Bot(Index).PosX & "," & Bot(Index).PosY & "," & FirstHeBot & "," & Bot(Index).Look & "/" & extb & Chr(13) & Chr(1), (Bot(Index).Publicnum)
  1287. If NwPB <> "" Then
  1288. Bot(Index).PosX = Split(NwPB, ",")(0)
  1289. Bot(Index).PosY = Split(NwPB, ",")(1)
  1290. End If
  1291. End If
  1292. End Sub
  1293. Private Sub TimerDC_Timer(Index As Integer)
  1294. frmMain.socket(Index).Close
  1295. End Sub
  1296.  
  1297. Private Sub TimerDice_Timer(Index As Integer)
  1298. Dim getal As Long, DiceID As Long
  1299. DiceID = Split(TimerDice(Index).Tag, ".")(0)
  1300. TheRom = Split(TimerDice(Index).Tag, ".")(1)
  1301. Randomize Timer
  1302. getal = Int((6 - 1 + 1) * Rnd) + 1
  1303. FSO.OpenTextFile(DBP & "furni\" & DiceID & "\var.txt", ForWriting).Write "H" & getal
  1304. getal = (DiceID * 38) + getal
  1305. sendAll "AZ" & DiceID & Chr(20) & getal & Chr(1), (TheRom)
  1306. dices = Replace(dices, "<" & Index & ">", "")
  1307. Unload TimerDice(Index)
  1308. End Sub
  1309.  
  1310. Private Sub TimerDiveGuard_Timer()
  1311. If txtDiving.Text = "0" = False Then
  1312. txtDiving.Text = "0"
  1313. txtDiveDoors.Text = "1"
  1314. sendAllP "AGdoor open" & Chr(1), 12
  1315. TimerDiveGuard.Enabled = False
  1316. End If
  1317. End Sub
  1318.  
  1319. Private Sub TimerDrink_Timer(Index As Integer)
  1320. On Error GoTo lol
  1321. Client(Index).DoDrink = True
  1322. Client(Index).Update = True
  1323. lol:
  1324. End Sub
  1325.  
  1326. Private Sub TimerGesture_Timer(Index As Integer)
  1327. On Error GoTo lol
  1328. TimerGesture(Index).Enabled = False
  1329. Client(Index).Gesture = ""
  1330. Client(Index).Update = True
  1331. lol:
  1332. End Sub
  1333.  
  1334. Private Sub TimerLidoVote_Timer()
  1335. ''take the total votes, and calculate the average of them
  1336. VoteSum = LidoVoteSum.Text
  1337. TotalVotes = LidoTotalVotes.Text
  1338. VotedDiver = LastDiver.Text
  1339. DiversNum = LastDiverNum.Text
  1340. 'calculate it
  1341. If Val(TotalVotes) = "0" Or Val(VoteSum) = "0" Then 'nobody has voted
  1342. GoTo ResetSystem
  1343. Else
  1344. DiveRating = Val(VoteSum) / Val(TotalVotes)
  1345. DiveRating = Replace(DiveRating, ",", ".")
  1346. DiveRating = Mid(DiveRating, 1, 4)
  1347. End If
  1348.  
  1349. 'send the result
  1350. frmMain.LidoCammed.Text = frmMain.LastDiverNum.Text
  1351. sendAllP "AGcam1 targetcamera " & DiversNum & "" & Chr(1), 36
  1352. sendAllP "AGcam1 showtext " & locale("diving_score") & "/" & VotedDiver & " " & DiveRating & "" & Chr(1) & "AGcam1 transition fade" & Chr(1), 36
  1353.  
  1354. 'reset stuff
  1355. ResetSystem:
  1356. LidoVoteSum.Text = "0"
  1357. LidoTotalVotes.Text = "0"
  1358. LastDiver.Text = ""
  1359. LastDiverNum.Text = ""
  1360. sendAllP "AGdoor open" & Chr(1), 36
  1361. frmMain.txtDiveDoors.Text = "1"
  1362. frmMain.txtDiving.Text = "0"
  1363. For a = 1 To frmMain.SockI
  1364. If frmMain.socket(a).State = sckConnected Then Client(a).HasVoted = False
  1365. Next a
  1366. TimerLidoVote.Enabled = False
  1367. End Sub
  1368. Private Sub TimerTalk_Timer(Index As Integer)
  1369. On Error GoTo lol
  1370. TimerTalk(Index).Enabled = False
  1371. Client(Index).Talking = False
  1372. Client(Index).Update = True
  1373. lol:
  1374. End Sub
  1375.  
  1376. Private Sub TimerTeleport1_Timer(Index As Integer)
  1377. On Error GoTo lol
  1378. Fname = FSO.OpenTextFile(DBP & "furni\" & TimerTeleport1(Index).Tag & "\name.txt", ForReading).ReadAll
  1379. FRoom = FSO.OpenTextFile(DBP & "furni\" & TimerTeleport1(Index).Tag & "\inroom.txt", ForReading).ReadAll
  1380. If FRoom = Client(Index).InRoom Then
  1381. sendAll "AY" & TimerTeleport1(Index).Tag & "/" & Client(Index).Name & "/" & Fname & Chr(1) & "AY" & TimerTeleport1(Index).Tag & "/" & Client(Index).Name & "/" & Fname & Chr(1), (FRoom)
  1382. TimerTeleport1(Index).Enabled = False
  1383. TimerTeleport2(Index).Enabled = True
  1384. Else
  1385. TimerTeleport1(Index).Enabled = False
  1386. sendAll "@]" & Client(Index).Num & Chr(1), (Client(Index).InRoom)
  1387.  
  1388. RoomNum = FRoom
  1389.  
  1390. Client(Index).Teled = True
  1391. Client(Index).InRoom = RoomNum
  1392. 'frmMain.socket(index).SendData "@S" & Chr(1)
  1393.  
  1394. End If
  1395. lol:
  1396. End Sub
  1397.  
  1398. Private Sub TimerTeleport2_Timer(Index As Integer)
  1399. On Error GoTo lol
  1400. FLoc = Split(FSO.OpenTextFile(DBP & "furni\" & TimerTeleport1(Index).Tag & "\loc.txt", ForReading).ReadAll, " ")
  1401. Client(Index).PosX = FLoc(0)
  1402. Client(Index).PosY = FLoc(1)
  1403. Client(Index).Look = FLoc(2) & "," & FLoc(2)
  1404. If Val(FLoc(2)) = 0 Or Val(FLoc(2)) = 2 Then
  1405. Client(Index).DestX = Client(Index).PosX + 1
  1406. Client(Index).DestY = Client(Index).PosY
  1407. Else
  1408. Client(Index).DestX = Client(Index).PosX
  1409. Client(Index).DestY = Client(Index).PosY + 1
  1410. End If
  1411. Hab_AJ "AJ" & encodeB64(TimerTeleport1(Index).Tag) & TimerTeleport1(Index).Tag & "@DTRUE", Index
  1412. Client(Index).Update = True
  1413. TimerTeleport2(Index).Enabled = False
  1414. TimerTeleport3(Index).Enabled = True
  1415. lol:
  1416. End Sub
  1417.  
  1418. Private Sub TimerTeleport3_Timer(Index As Integer)
  1419. On Error GoTo lol
  1420. Hab_AJ "AJ" & encodeB64(TimerTeleport1(Index).Tag) & TimerTeleport1(Index).Tag & "@DFALSE", Index
  1421. TimerTeleport3(Index).Enabled = False
  1422. lol:
  1423. End Sub
  1424.  
  1425. Private Sub TimerUpdate_Timer(Index As Integer)
  1426. On Error GoTo lol
  1427. Dim Splitt() As String
  1428.  
  1429. FirstHe = Client(Index).He
  1430.  
  1431. If TimerUpdate(Index).Interval > 500 Then TimerUpdate(Index).Interval = 500
  1432.  
  1433. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  1434. If Client(Index).InRoom > 0 Then
  1435. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  1436. If Client(Index).RollerUpdate = True Then
  1437. Client(Index).RollerUpdate = False
  1438.  
  1439. Owner = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\owner.txt").ReadAll
  1440. rights = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\rights.txt").ReadAll
  1441.  
  1442. If Owner = Client(Index).Name Then extbt = extbt & "flatctrl useradmin/"
  1443. If FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\allrights.txt").ReadAll = "1" Then
  1444. extbt = extbt & "flatctrl useradmin/"
  1445. Else
  1446.  
  1447. Splitt = Split(rights, ";")
  1448. For Q = 0 To UBound(Splitt())
  1449. If Splitt(Q) = Client(Index).Name Then
  1450. extbt = extbt & "flatctrl useradmin/"
  1451. Exit For
  1452. End If
  1453. Next Q
  1454. End If
  1455.  
  1456. If Client(Index).Wave = True Then
  1457. extbt = extbt & "wave/"
  1458. End If
  1459. If Client(Index).Dance = True Then
  1460. extbt = extbt & Client(Index).Dancetype & "/"
  1461. End If
  1462. If Val(Client(Index).Carrying) > 0 Then
  1463. If Client(Index).NoDrink = False Then
  1464. If Client(Index).DoDrink = False Then
  1465. extbt = extbt & "carryd " & Client(Index).Carrying & "/"
  1466. Else
  1467. extbt = extbt & "drink " & Client(Index).Carrying & "/"
  1468. Client(Index).DoDrink = False
  1469. Client(Index).Update = True
  1470. End If
  1471. Else
  1472. If Client(Index).UseItem = False Then
  1473. extbt = extbt & "cri " & Client(Index).Carrying & "/"
  1474. Else
  1475. extbt = extbt & "usei " & Client(Index).Carrying & "/"
  1476. End If
  1477. End If
  1478. End If
  1479. If Client(Index).Talking = True Then
  1480. extbt = extbt & "talk/"
  1481. End If
  1482. If Client(Index).Gesture <> "" Then
  1483. extbt = extbt & "gest " & Client(Index).Gesture & "/"
  1484. End If
  1485. If Client(Index).Trading = True Then
  1486. extbt = extbt & "trd/"
  1487. End If
  1488. If Client(Index).Sit = True Then
  1489. Client(Index).Look = ReadINI("rotation", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
  1490. Hoogte = Val(ReadINI("offset", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"))
  1491. 'Hoogte = Hoogte + Val(Client(Index).He)
  1492. 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
  1493. Hoogte = Replace(Hoogte, ",", ".")
  1494. If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
  1495. extbt = extbt & "sit " & Hoogte & "/"
  1496. End If
  1497. If Client(Index).Lay = True Then
  1498. Client(Index).Look = ReadINI("rotation", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
  1499. Hoogte = Val(ReadINI("offset", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"))
  1500. 'Hoogte = Hoogte + Val(Client(Index).He)
  1501. 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
  1502. Hoogte = Replace(Hoogte, ",", ".")
  1503. If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
  1504. extbt = extbt & "lay " & Hoogte & " null/"
  1505. End If
  1506.  
  1507. Client(Index).He = Replace(Client(Index).He, ",", ".")
  1508. If InStr(Client(Index).He, ".") = 0 Then Client(Index).He = Client(Index).He & ".0"
  1509. 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)
  1510. Exit Sub
  1511. End If
  1512.  
  1513.  
  1514. If Client(Index).InRoom > 0 Then
  1515. htmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\shtmp.txt").ReadAll
  1516. Walkmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\walk.txt").ReadAll
  1517.  
  1518. Hoogte = Replace(Client(Index).He, ",", ".")
  1519. If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
  1520. 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
  1521. If Mid(Split(htmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) <> "x" Then
  1522. Client(Index).He = Mid(Split(htmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) & ".0"
  1523. FirstHe = Client(Index).He
  1524. Client(Index).Update = True
  1525. End If
  1526. End If
  1527.  
  1528. 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
  1529. Client(Index).He = Replace(0.4 + Val(Mid(Split(htmp, Chr(13))(Val(Client(Index).PosY)), Val(Client(Index).PosX) + 1, 1)), ",", ".")
  1530. FirstHe = Client(Index).He
  1531. Client(Index).Update = True
  1532. End If
  1533.  
  1534. If Mid(Split(Walkmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) = "S" Then
  1535. If Client(Index).Sit = False Then
  1536. Client(Index).Sit = True
  1537. Client(Index).Dance = False
  1538. Client(Index).Lay = False
  1539. Client(Index).Update = True
  1540. End If
  1541. End If
  1542. If Mid(Split(Walkmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) = "L" Then
  1543. If Client(Index).Lay = False Then
  1544. Client(Index).Sit = False
  1545. Client(Index).Dance = False
  1546. Client(Index).Lay = True
  1547. Client(Index).Update = True
  1548. End If
  1549. End If
  1550. 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
  1551. If Client(Index).Lay = True Or Client(Index).Sit = True Then
  1552. Client(Index).Sit = False
  1553. Client(Index).Lay = False
  1554. Client(Index).Update = True
  1555. End If
  1556. End If
  1557. 'roller
  1558. If Mid(Split(Walkmp, Chr(13))(Client(Index).PosY), Client(Index).PosX + 1, 1) = "R" Then
  1559. FurniOP = ReadINI("furnies", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
  1560. If FurniOP <> "" Then
  1561. FurniType = FSO.OpenTextFile(DBP & "furni\" & FurniOP & "\type.txt", ForReading).ReadAll
  1562.  
  1563. 'sit
  1564. If FurniType = "sit" And Client(Index).Sit = False Then
  1565. Client(Index).Sit = True
  1566. Client(Index).Dance = False
  1567. Client(Index).Lay = False
  1568. Client(Index).Update = True
  1569. End If
  1570. 'sit
  1571. 'lay
  1572. If FurniType = "bed" And Client(Index).Lay = False Then
  1573. Client(Index).Sit = False
  1574. Client(Index).Dance = False
  1575. Client(Index).Lay = True
  1576. Client(Index).Update = True
  1577. End If
  1578. 'lay
  1579. Else
  1580. If Client(Index).Sit = True Then
  1581. Client(Index).Sit = False
  1582. Client(Index).Update = True
  1583. End If
  1584. If Client(Index).Lay = True Then
  1585. Client(Index).Lay = False
  1586. Client(Index).Update = True
  1587. End If
  1588. End If
  1589. End If
  1590. 'roller
  1591. End If
  1592.  
  1593. If Client(Index).Update = True And Client(Index).InRoom > 0 Then
  1594. Client(Index).Update = False
  1595. Owner = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\owner.txt").ReadAll
  1596. rights = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\rights.txt").ReadAll
  1597.  
  1598. If Owner = Client(Index).Name Then extbt = extbt & "flatctrl useradmin/"
  1599. If FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\allrights.txt").ReadAll = "1" Then
  1600. extbt = extbt & "flatctrl useradmin/"
  1601. Else
  1602. Splitt = Split(rights, ";")
  1603. For Q = 0 To UBound(Splitt())
  1604. If Splitt(Q) = Client(Index).Name Then
  1605. extbt = extbt & "flatctrl useradmin/"
  1606. Exit For
  1607. End If
  1608. Next Q
  1609. End If
  1610.  
  1611.  
  1612.  
  1613.  
  1614. If Client(Index).DestX <> Client(Index).PosX Or Client(Index).DestY <> Client(Index).PosY Then
  1615. Client(Index).Update = True
  1616.  
  1617. htmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\shtmp.txt").ReadAll
  1618. Walkmp = FSO.OpenTextFile(DBP & "privaterooms\" & Client(Index).InRoom & "\walk.txt").ReadAll
  1619. NwP = findPath(Index, Client(Index).PosX, Client(Index).PosY, Client(Index).DestX, Client(Index).DestY, Client(Index).InRoom, (Walkmp), (htmp))
  1620. If NwP = "NoPath" Then
  1621. Client(Index).DestX = Client(Index).PosX
  1622. Client(Index).DestY = Client(Index).PosY
  1623. NwP = Client(Index).PosX & "," & Client(Index).PosY
  1624. Else
  1625. Client(Index).Sit = False
  1626. Client(Index).Lay = False
  1627. extbt = extbt & "mv " & NwP & "," & Client(Index).He & "/"
  1628. End If
  1629.  
  1630.  
  1631. End If
  1632.  
  1633. If Client(Index).DestX = Client(Index).PosX And Client(Index).DestY = Client(Index).PosY Then
  1634. Client(Index).Update = False
  1635. If Client(Index).Kick = True Then
  1636. Client(Index).Kick = False
  1637. Hab_Kick Index
  1638. End If
  1639. End If
  1640.  
  1641. If Client(Index).TelMove = True Then
  1642. extbt = extbt & "mv " & Client(Index).TelX & "," & Client(Index).TelY & "," & Client(Index).TelHe & "/"
  1643. End If
  1644. If Client(Index).Wave = True Then
  1645. extbt = extbt & "wave/"
  1646. End If
  1647. If Client(Index).Dance = True Then
  1648. extbt = extbt & Client(Index).Dancetype & "/"
  1649. End If
  1650. If Val(Client(Index).Carrying) > 0 Then
  1651. If Client(Index).NoDrink = False Then
  1652. If Client(Index).DoDrink = False Then
  1653. extbt = extbt & "carryd " & Client(Index).Carrying & "/"
  1654. Else
  1655. extbt = extbt & "drink " & Client(Index).Carrying & "/"
  1656. Client(Index).DoDrink = False
  1657. Client(Index).Update = True
  1658. End If
  1659. Else
  1660. If Client(Index).UseItem = False Then
  1661. extbt = extbt & "cri " & Client(Index).Carrying & "/"
  1662. Else
  1663. extbt = extbt & "usei " & Client(Index).Carrying & "/"
  1664. End If
  1665. End If
  1666. End If
  1667. If Client(Index).Talking = True Then
  1668. extbt = extbt & "talk/"
  1669. End If
  1670. If Client(Index).Gesture <> "" Then
  1671. extbt = extbt & "gest " & Client(Index).Gesture & "/"
  1672. End If
  1673. If Client(Index).Trading = True Then
  1674. extbt = extbt & "trd/"
  1675. End If
  1676. If Client(Index).Sit = True Then
  1677. 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")
  1678. Hoogte = Val(ReadINI("offset", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"))
  1679. 'Hoogte = Hoogte + Val(Client(Index).He)
  1680. 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
  1681. Hoogte = Replace(Hoogte, ",", ".")
  1682. If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
  1683. extbt = extbt & "sit " & Hoogte & "/"
  1684. End If
  1685. If Client(Index).Lay = True Then
  1686. Client(Index).Look = ReadINI("rotation", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt")
  1687. Hoogte = Val(ReadINI("offset", Client(Index).PosX & "," & Client(Index).PosY, DBP & "privaterooms\" & Client(Index).InRoom & "\rotation.txt"))
  1688. 'Hoogte = Hoogte + Val(Client(Index).He)
  1689. 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
  1690. Hoogte = Replace(Hoogte, ",", ".")
  1691. If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
  1692. extbt = extbt & "lay " & Hoogte & " null/"
  1693. End If
  1694.  
  1695. FirstHe = Replace(FirstHe, ",", ".")
  1696. If InStr(FirstHe, ".") = 0 Then FirstHe = FirstHe & ".0"
  1697. sendAll "@b" & Client(Index).Num & " " & Client(Index).PosX & "," & Client(Index).PosY & "," & FirstHe & "," & Client(Index).Look & "/" & extbt & Chr(13) & Chr(1), (Client(Index).InRoom)
  1698. If Client(Index).TelMove = True Then
  1699. Client(Index).TelMove = False
  1700. Client(Index).PosX = Client(Index).TelX
  1701. Client(Index).PosY = Client(Index).TelY
  1702. Client(Index).He = Client(Index).TelHe
  1703. Client(Index).DestX = Client(Index).TelX
  1704. Client(Index).DestY = Client(Index).TelY
  1705. End If
  1706.  
  1707. If NwP <> "" Then
  1708. Client(Index).PosX = Split(NwP, ",")(0)
  1709. Client(Index).PosY = Split(NwP, ",")(1)
  1710. End If
  1711.  
  1712. End If
  1713. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  1714. Else
  1715. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  1716. Hoogte = Replace(Client(Index).He, ",", ".")
  1717. If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
  1718. 'If PublicWalk(Client(index).Publicnum, Client(index).PosX, Client(index).PosY) & ".0" <> Hoogte And Client(index).Sit = False And Client(index).Lay = False Then
  1719. 'If PublicWalk(Client(index).Publicnum, Client(index).PosX, Client(index).PosY) <> "X" Then
  1720. 'Client(index).He = PublicWalk(Client(index).Publicnum, Client(index).PosX + 1, Client(index).PosY) & ".0"
  1721. 'FirstHe = Client(index).He
  1722. 'Client(index).UpDate = True
  1723. 'End If
  1724. 'End If
  1725.  
  1726. '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
  1727. 'Client(index).He = Replace(0.4 + Val(Mid(Split(Htmp, Chr(13))(Val(Client(index).PosY)), Val(Client(index).PosX) + 1, 1)), ",", ".")
  1728. 'FirstHe = Client(index).He
  1729. 'Client(index).UpDate = True
  1730. 'End If
  1731.  
  1732. 'If IsNumeric(PublicWalk(Client(index).Publicnum, Client(index).PosX, Client(index).PosY)) = False Then
  1733. 'If Client(index).Sit = False Then
  1734. 'Client(index).Sit = True
  1735. 'Client(index).Dance = False
  1736. 'Client(index).Lay = False
  1737. 'Client(index).UpDate = True
  1738. 'End If
  1739. 'End If
  1740. 'If IsNumeric(PublicWalk(Client(index).Publicnum, Client(index).PosX, Client(index).PosY)) = True Then
  1741. 'If Client(index).Lay = True Or Client(index).Sit = True Then
  1742. 'Client(index).Sit = False
  1743. 'Client(index).Lay = False
  1744. 'Client(index).UpDate = True
  1745. 'End If
  1746. 'End If
  1747.  
  1748. If PublicWalk(Client(Index).Publicnum, Client(Index).PosX, Client(Index).PosY) = "S" Then
  1749. If Client(Index).Sit = False Then
  1750. Client(Index).Sit = True
  1751. Client(Index).Look = PublicRot(Client(Index).Publicnum, Client(Index).PosX, Client(Index).PosY)
  1752. Client(Index).Lay = False
  1753. Client(Index).Dance = False
  1754. Client(Index).Update = True
  1755. End If
  1756. Else
  1757. Client(Index).Sit = False
  1758. End If
  1759.  
  1760. If Client(Index).DestX <> Client(Index).PosX Or Client(Index).DestY <> Client(Index).PosY Then
  1761. Client(Index).Update = True
  1762.  
  1763. HeightMap = FSO.OpenTextFile(DBP & "pub\" & Client(Index).Publicnum & "\heightmap.map", ForReading).ReadAll
  1764.  
  1765. NwP = FindPathP(Index, Client(Index).PosX, Client(Index).PosY, Client(Index).DestX, Client(Index).DestY, HeightMap)
  1766. If NwP = "NoPath" Then
  1767. Client(Index).DestX = Client(Index).PosX
  1768. Client(Index).DestY = Client(Index).PosY
  1769. NwP = Client(Index).PosX & "," & Client(Index).PosY
  1770. Else
  1771. 'MsgBox "YAY!"
  1772. Client(Index).Sit = False
  1773. Client(Index).Lay = False
  1774. extbt = extbt & "mv " & NwP & "," & Client(Index).He & "/"
  1775. End If
  1776.  
  1777.  
  1778. End If
  1779.  
  1780. If Client(Index).DestX = Client(Index).PosX And Client(Index).DestY = Client(Index).PosY Then
  1781. Client(Index).Update = False
  1782. If Client(Index).Kick = True Then
  1783. Client(Index).Kick = False
  1784. Hab_Kick Index
  1785. GoTo Ntb
  1786. End If
  1787. CheckPosition Index
  1788. End If
  1789. Ntb:
  1790. If Client(Index).Wave = True Then
  1791. extbt = extbt & "wave/"
  1792. End If
  1793. If Client(Index).Dance = True Then
  1794. extbt = extbt & Client(Index).Dancetype & "/"
  1795. End If
  1796. If Val(Client(Index).Carrying) > 0 Then
  1797. If Client(Index).NoDrink = False Then
  1798. If Client(Index).DoDrink = False Then
  1799. extbt = extbt & "carryd " & Client(Index).Carrying & "/"
  1800. Else
  1801. extbt = extbt & "drink " & Client(Index).Carrying & "/" Or extbt & Client(Index).Carrying
  1802. Client(Index).DoDrink = False
  1803. Client(Index).Update = True
  1804. End If
  1805. Else
  1806. If Client(Index).UseItem = False Then
  1807. extbt = extbt & "cri " & Client(Index).Carrying & "/"
  1808. Else
  1809. extbt = extbt & "usei " & Client(Index).Carrying & "/"
  1810. End If
  1811. End If
  1812. End If
  1813. If Client(Index).Talking = True Then
  1814. extbt = extbt & "talk/"
  1815. End If
  1816. If Client(Index).Gesture <> "" Then
  1817. extbt = extbt & "gest " & Client(Index).Gesture & "/"
  1818. End If
  1819. If Client(Index).Trading = True Then
  1820. extbt = extbt & "trd/"
  1821. End If
  1822. If Client(Index).Sit = True Then
  1823. Hoogte = "1"
  1824. 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)
  1825. 'Hoogte = Hoogte + Val(Client(Index).He)
  1826. 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
  1827. Hoogte = Replace(Hoogte, ",", ".")
  1828. If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
  1829. extbt = extbt & "sit " & Hoogte & "/"
  1830. End If
  1831. If Client(Index).Lay = True Then
  1832. Client(Index).Look = "1,1"
  1833. Hoogte = "1"
  1834. 'Hoogte = Hoogte + Val(Client(Index).He)
  1835. 'If Client(Index).InBig = True Then Hoogte = Hoogte / 3
  1836. Hoogte = Replace(Hoogte, ",", ".")
  1837. If InStr(Hoogte, ".") = 0 Then Hoogte = Hoogte & ".0"
  1838. extbt = extbt & "lay " & Hoogte & " null/"
  1839. End If
  1840.  
  1841. FirstHe = Replace(FirstHe, ",", ".")
  1842. If InStr(FirstHe, ".") = 0 Then FirstHe = FirstHe & ".0"
  1843. sendAllP "@b" & Client(Index).Num & " " & Client(Index).PosX & "," & Client(Index).PosY & "," & FirstHe & "," & Client(Index).Look & "/" & extbt & Chr(13) & Chr(1), (Client(Index).Publicnum)
  1844. If Client(Index).TelMove = True Then
  1845. Client(Index).TelMove = False
  1846. Client(Index).PosX = Client(Index).TelX
  1847. Client(Index).PosY = Client(Index).TelY
  1848. Client(Index).He = Client(Index).TelHe
  1849. Client(Index).DestX = Client(Index).TelX
  1850. Client(Index).DestY = Client(Index).TelY
  1851. End If
  1852.  
  1853. If NwP <> "" Then
  1854. Client(Index).PosX = Split(NwP, ",")(0)
  1855. Client(Index).PosY = Split(NwP, ",")(1)
  1856. End If
  1857.  
  1858. ''''''
  1859. End If
  1860. ''''''
  1861.  
  1862.  
  1863. lol:
  1864. End Sub
  1865.  
  1866. Public Sub DoTimer(Index As Integer)
  1867. TimerTeleport1_Timer Index
  1868. End Sub
  1869.  
  1870.  
  1871.  
  1872. Private Sub TimerVanish_Timer(Index As Integer)
  1873. If TimerVanish(Index).Tag = 2 Then
  1874. Client(Index).NoDrink = True
  1875. Client(Index).UseItem = False
  1876. Client(Index).Carrying = 0
  1877. TimerVanish(Index).Enabled = False
  1878. TimerDrink(Index).Enabled = False
  1879. Client(Index).Update = True
  1880. Else
  1881. TimerVanish(Index).Tag = Val(TimerVanish(Index).Tag) + 1
  1882. End If
  1883. End Sub
  1884.  
  1885. Private Sub TimerVote_Timer(Index As Integer)
  1886. On Error GoTo EscapeVote
  1887. If Client(Index).SwimVote = True Then
  1888. Client(Index).Dance = True
  1889. Client(Index).Dancetype = "Swim"
  1890. Client(Index).Update = True
  1891. ElseIf Client(Index).SwimVote = False And Client(Index).Vote = True Then
  1892. Client(Index).Dance = False
  1893. Client(Index).Update = True
  1894. Client(Index).Dancetype = "walk"
  1895. End If
  1896. Client(Index).SwimVote = False
  1897. Client(Index).Vote = False
  1898. TimerVote(Index).Enabled = False
  1899. EscapeVote:
  1900. End Sub
  1901.  
  1902. Private Sub TimerWave_Timer(Index As Integer)
  1903. On Error GoTo lol
  1904. TimerWave(Index).Enabled = False
  1905. Client(Index).Wave = False
  1906. Client(Index).Update = True
  1907. lol:
  1908. End Sub
  1909. Public Function RandomValue(ByVal Low As Long, _
  1910. ByVal High As Long) As Long
  1911. RandomValue = Int((High - Low + 1) * Rnd) + Low
  1912. End Function
  1913.  
  1914. Private Sub tmrCloseServer_Timer()
  1915. For a = 1 To frmMain.SockI
  1916. If frmMain.socket(a).State = sckConnected Then frmMain.socket(a).SendData "BKHotel stats: OFFLINE" & Chr(1)
  1917. End
  1918. Next a
  1919. End Sub
  1920.  
  1921. Private Sub tmrLido1_Timer()
  1922. frmMain.Lido1.Text = "3"
  1923. tmrLido1.Enabled = False
  1924. End Sub
  1925. Private Sub tmrLido2_Timer()
  1926. frmMain.Lido2.Text = "3"
  1927. tmrLido2.Enabled = False
  1928. End Sub
  1929. Private Sub tmrRumble1_Timer()
  1930. frmMain.Rumble1.Text = "3"
  1931. tmrRumble1.Enabled = False
  1932. End Sub
  1933. Private Sub tmrRumble2_Timer()
  1934. frmMain.Rumble2.Text = "3"
  1935. tmrRumble2.Enabled = False
  1936. End Sub
  1937. Private Sub tmrLidoCam_Timer()
  1938. TrackInterval = RandomValue(2500, 4500)
  1939. sendAllP "AGcam1 targetcamera " & frmMain.LidoCammed.Text & "" & Chr(1), 36
  1940. tmrLidoCam.Interval = TrackInterval
  1941. End Sub
  1942.  
  1943. Private Sub tmrLidoCamUpdate_Timer()
  1944. For a = 1 To frmMain.SockI
  1945. If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "36" And Client(a).Wave = True Then LidoCammed.Text = Client(a).Num
  1946. 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
  1947. 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
  1948. If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "36" And Client(a).Talking = True Then LidoCammed.Text = Client(a).Num
  1949. Next a
  1950. End Sub
  1951. Private Sub tmrLidoZoom_Timer()
  1952. ZoomMode = RandomValue(1, 2)
  1953. ZoomInterval = RandomValue(1500, 9000)
  1954. sendAllP "AGcam1 setcamera" & " " & ZoomMode & Chr(1), 36
  1955. tmrLidoZoom.Interval = ZoomInterval
  1956. End Sub
  1957. Private Sub tmrRumbleCam_Timer()
  1958. TrackInterval = RandomValue(2500, 4500)
  1959. sendAllP "AGcam1 targetcamera " & frmMain.RumbleCammed.Text & "" & Chr(1), 27
  1960. tmrRumbleCam.Interval = TrackInterval
  1961. End Sub
  1962.  
  1963. Private Sub tmrRumbleCamUpdate_Timer()
  1964. For a = 1 To frmMain.SockI
  1965. If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "27" And Client(a).Wave = True Then RumbleCammed.Text = Client(a).Num
  1966. 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
  1967. 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
  1968. If frmMain.socket(a).State = sckConnected And Client(a).Publicnum = "27" And Client(a).Talking = True Then RumbleCammed.Text = Client(a).Num
  1969. Next a
  1970. End Sub
  1971. Private Sub tmrRumbleZoom_Timer()
  1972. ZoomMode = RandomValue(1, 2)
  1973. ZoomInterval = RandomValue(1500, 9000)
  1974. sendAllP "AGcam1 setcamera" & " " & ZoomMode & Chr(1), 27
  1975. tmrRumbleZoom.Interval = ZoomInterval
  1976. End Sub
  1977.  
  1978.  
  1979.  
  1980. Private Sub txtLog_Change()
  1981. If Len(txtLog.Text) > 32000 Then txtLog.Text = ""
  1982. End Sub
  1983.  
  1984. 'Private Sub txtLog_KeyDown(KeyCode As Integer, Shift As Integer)
  1985. 'If KeyCode = vbKeyEscape Then
  1986. ' If Text2.Visible = False Then Text2.Visible = True Else Text2.Visible = False
  1987. 'End If
  1988. 'End Sub
  1989.  
  1990. Private Sub UpdateFurni_Timer(Index As Integer)
  1991. On Error GoTo lol
  1992. If Index > 0 Then
  1993. Fname = FSO.OpenTextFile(DBP & "furni\" & Index & "\name.txt", ForReading).ReadAll
  1994. FCol = Split(FSO.OpenTextFile(DBP & "furni\" & Index & "\cust.txt", ForReading).ReadAll, Chr(30))(2)
  1995. Var = FSO.OpenTextFile(DBP & "furni\" & Index & "\var.txt", ForReading).ReadAll
  1996. FHeight = FSO.OpenTextFile(DBP & "furni\" & Index & "\height.txt", ForReading).ReadAll
  1997. loca = Split(FSO.OpenTextFile(DBP & "furni\" & Index & "\loc.txt", ForReading).ReadAll, " ")
  1998. Custsplit = Split(FSO.OpenTextFile(DBP & "furni\" & Index & "\cust.txt", ForReading).ReadAll, "")
  1999.  
  2000. 'pet part
  2001. If Fname = "nest" Then
  2002. splitP = Split(frmMain.Hpets, ";")
  2003. For b = 0 To UBound(splitP)
  2004. If splitP(b) <> "" Then
  2005. If Pet(splitP(b)).FurniID = Index Then
  2006. Pet(splitP(b)).NestX = loca(0)
  2007. Pet(splitP(b)).NestY = loca(1)
  2008. End If
  2009. End If
  2010. Next b
  2011. End If
  2012. 'pet part
  2013.  
  2014. FHeight = Replace(FHeight, ",", ".")
  2015. If InStr(FHeight, ".") = 0 Then FHeight = FHeight & ".0"
  2016.  
  2017. 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)
  2018. Unload UpdateFurni(Index)
  2019. End If
  2020. lol:
  2021. End Sub
  2022.  
  2023. Private Sub useronline_Timer()
  2024. 'User online
  2025. HabboList = ""
  2026. HabboList2 = ""
  2027. HabboCount = 0
  2028. BlockedIPs = ""
  2029. For a = 1 To SockI
  2030. If socket(a).State = sckConnected And Client(a).Name <> "" Then
  2031. If InStr(BlockedIPs, socket(a).RemoteHostIP) Then GoTo NextA
  2032. If HabboCount <= 30 Then HabboList = HabboList & "<br>" & Client(a).Name & " " & socket(a).RemoteHostIP Else HabboList2 = HabboList2 & "<br>" & Client(a).Name & " " & socket(a).RemoteHostIP
  2033. HabboCount = HabboCount + 1
  2034. For b = 1 To frmMain.SockI
  2035. If socket(a).RemoteHostIP = socket(b).RemoteHostIP And a <> b And socket(b).State = sckConnected And Client(b).Name <> "" Then
  2036. If HabboCount <= 30 Then HabboList = HabboList & "<br>" & Client(b).Name & " " & socket(b).RemoteHostIP Else HabboList2 = HabboList2 & "<br>" & Client(b).Name & " " & socket(b).RemoteHostIP
  2037. HabboCount = HabboCount + 1
  2038. End If
  2039. Next b
  2040. BlockedIPs = BlockedIPs & socket(a).RemoteHostIP & ","
  2041. End If
  2042. NextA:
  2043. Next a
  2044. Label2.Caption = HabboCount
  2045. End Sub
  2046.  
  2047. Private Sub UseTimer_Timer(Index As Integer)
  2048. On Error GoTo lol
  2049. Client(Index).UseItem = False
  2050. UseTimer(Index).Enabled = False
  2051. Client(Index).Update = True
  2052. lol:
  2053. End Sub
  2054. Private Sub mPopExit_Click()
  2055. Unload Me
  2056. End Sub
  2057.  
  2058. Private Sub mPopRestore_Click()
  2059. Dim Result As Long
  2060. Me.WindowState = vbNormal
  2061. Result = SetForegroundWindow(Me.hwnd)
  2062. Me.Show
  2063. End Sub
  2064.  
  2065. Private Sub timer_automessage_Timer()
  2066. If frmAutoClose.timemessage.Caption = Format(Time, "hh/mm/ss") Then
  2067. For a = 1 To frmMain.SockI
  2068. If frmMain.socket(a).State = sckConnected And Client(a).Name <> "" Then
  2069. frmMain.socket(a).SendData "BK" & Split(ReadINI("server", "auto_close_message", SettingIni), ",", 2)(1) & Chr(1)
  2070. End If
  2071. Next a
  2072. start = Timer
  2073. Do
  2074. DoEvents
  2075. Zeit = Timer - start
  2076. Loop Until Zeit >= 2
  2077. ' Send Index, "BK" & Split(ReadINI("server", "auto_close_message", SettingIni), ",", 2)(1) & Chr(1)
  2078. End If
  2079.  
  2080. End Sub
  2081.  
  2082. Private Sub timer_poweroff_Timer()
  2083. If frmAutoClose.timeselected.Caption = Format(Time, "hh/mm/ss") Then
  2084. If frmAutoClose.auto_poweroff_pc.Value = 1 Then
  2085. Call Shutdown
  2086. Else
  2087. Unload frmMain
  2088. Unload frmToolsaaa
  2089. Unload frmSettings
  2090. Unload frmInfo
  2091. Unload frmUseronline
  2092. Unload frmAutoClose
  2093. Unload frmBan
  2094. Unload frmCredits
  2095. Unload frmAlert
  2096. Unload frmTab_publicroom
  2097. Unload frmTab_publicroom_infobus
  2098. Unload frmTab_publicroom_layout
  2099. Unload frmTab_publicroom_booteditor
  2100.  
  2101. End
  2102. End If
  2103. End If
  2104. End Sub
  2105. Public Sub Shutdown()
  2106. 'Procedura che provoca lo spengimento del PC:
  2107. 'se l'OS è Win NT/2000/XP allora prima di spengere setta i privilegi
  2108. If glngWhichWindows32 = mlngWindowsNT Then
  2109. 'aggiusta i privilegi per poter spengere il PC
  2110. AdjustToken
  2111. 'se AdjustToken va in errore allora visualizzo il tipo di errore
  2112. If GetLasrError <> 0 Then MsgBox "Post-AdjustToken's GetLastError " & GetLastError
  2113. End If
  2114. 'Eseguo l'operazione scelta: EWX_LOGOFF(disconnette pc), EWX_REBOOT(riavvia il pc), EWX_POWEROFF(spegne pc)
  2115. ExitWindowsEx EWX_POWEROFF, &HFFFF
  2116. 'se ExitWindowsEx va in errore allora visualizzo il tipo di errore
  2117. If GetLasrError <> 0 Then MsgBox "ExitWindowsEx's GetLastError " & GetLastError
  2118. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement