This will be a frequently-updated thread on finishing/completing the USA111-based HabboSQL! server source. I will be 100% right now, many fixes will be ported from the Debbov3 source. A few will probably be done by me, based on logic. The source can be found
Adding support for the Chinese Exchange, like the Gold Bar (China) and such:
Follow my simple tutorial in this thread.
Let's start with fixing @h which is the packet for deleting a friend. Find the function Hab_Ath2 and you'll see it's all commented out, and partially fixed.
Just replace the entire function with this fixed code:
Now in the code for frmMain, search for Case "@h"
Replace that Case code with:
Finished with adding support for deleting friends.
You must be registered to see links
, but it didn't seem to come with an SQL file. If anyone finds it, please share.Adding support for the Chinese Exchange, like the Gold Bar (China) and such:
Follow my simple tutorial in this thread.
Let's start with fixing @h which is the packet for deleting a friend. Find the function Hab_Ath2 and you'll see it's all commented out, and partially fixed.
Just replace the entire function with this fixed code:
Code:
Public Function Hab_Ath2(info As String, Index As Integer) 'Delete Friend "@h"
TheirID = VL64Decode(Right(info, Len(info) - 3))
Theirname = unUserID(TheirID)
If MySQLQuery("SELECT friendlist FROM habbos WHERE name = '" & Client(Index).name & "'") = "" = False Then
If InStr(MySQLQuery("SELECT friendlist FROM habbos WHERE name = '" & Client(Index).name & "'"), "<" & LCase(Theirname) & ">") Then
NewList = MySQLQuery("SELECT friendlist FROM habbos WHERE name = '" & Client(Index).name & "'")
NewList = Replace(NewList, "<" & LCase(Theirname) & ">", "")
MySQLWrite ("UPDATE habbos SET friendlist = '" & NewList & "' WHERE name = '" & Client(Index).name & "'")
End If
End If
If MySQLQuery("SELECT friendlist FROM habbos WHERE name = '" & LCase(Theirname) & "'") = "" = False Then
If InStr(MySQLQuery("SELECT friendlist FROM habbos WHERE name = '" & LCase(Theirname) & "'"), "<" & LCase(Client(Index).name) & ">") Then
NewList = MySQLQuery("SELECT friendlist FROM habbos WHERE name = '" & LCase(Theirname) & "'")
NewList = Replace(NewList, "<" & LCase(Client(Index).name) & ">", "")
MySQLWrite ("UPDATE habbos SET friendlist = '" & NewList & "' WHERE name = '" & LCase(Theirname) & "'")
End If
End If
idp = UserID(Theirname)
idh = UserID(Client(Index).name)
Send Index, "BJI" & VL64encode(idp) & Chr(1)
Dim a As Integer
For a = 1 To frmMain.SockI
If LCase(Client(a).name) = LCase(Theirname) And frmMain.socket(a).State = sckConnected Then
frmMain.socket(a).SendData "BJI" & VL64encode(idh) & Chr(1)
Exit Function
End If
Next a
End Function
Now in the code for frmMain, search for Case "@h"
Replace that Case code with:
Code:
Case "@h" 'Delete Friend
Hab_Ath2 NewInfo, Index