Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Finishing/Completing the HabboSQL! source [WIP]

Status
Not open for further replies.
Newbie Spellweaver
Joined
Nov 8, 2008
Messages
17
Reaction score
3
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 , 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
Finished with adding support for deleting friends.
 
Newbie Spellweaver
Joined
Nov 8, 2008
Messages
17
Reaction score
3
Thought edits of servers are not allowed and this is just a release for a fix. I don't see why one would create a development thread for this.

Please, read the thread. Much more than just a "fix", it is a work-in-progress guide on finishing an incomplete source.

You reading the thread would've saved me the time it took to reply to your post.
 
Status
Not open for further replies.
Back
Top