[REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

Page 1 of 2 12 LastLast
Results 1 to 25 of 40
  1. #1
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,486Posts

    [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Decompiled Habbo Clients
    By Quackster

    What is this?

    I have decompiled every shockwave Habbo client myself from version 5 which is 2003-ish all the way up to v39 which is the end of 2009. These clients have had their CCT's reverse engineered and the Lingo interpreted. This is the first release of its kind on RaGEZONE and I hope to see the innovation that comes out of it.

    Download:

    Fixed Lingo only: https://github.com/Quackster/habbo_src

    An archive with all versions come with their original ccts bundled next to them, as well as the decompressed .cst files that maintain their original bytecode.

    habbo_swclient_src

    Screenshots?

    Directory structure:



    Source code:



    Can you recover cct files if you have the Lingo?

    Sure can! Here's a few restorations done by the team over at Puomi: Index of /dcr/restorations
    You can look at what they've done by opening up the .cst in Director MX 2004 and looking at the script files.

    Scripting references:

    - https://archive.org/download/directo..._reference.pdf
    - https://archive.org/download/directo..._Reference.txt

    What's the best way restore a CCT?

    Spoiler:

    Download these two:

    - https://archive.org/details/recover_cct

    Make sure you have the /Xtras/ folder in the same folder as recover-cct.

    - https://archive.org/details/director_mx_2004 (install by using this file, serial key provided in the page.

    Open recover-cct select the file and make sure you select it both times.

    Open it with Director MX 2004.

    Lets say I open hh_room_bar and I find the "bar_b Class" script and it's blank.



    I locate bar_b Class.ls in "/script_hh_room_bar/bar_b Class.ls" and I copy and paste the code back into the Director MX 2004 script member.



    We have an error when trying to save it!




    Warning!

    Some code may have if statements that check against the "me" variable, such as in the RC4 screenshot I supplied above, these are wrong, and some decompiled code has .getAt(undefined), this is also wrong and require manual fixing.

    I'll need to add the global properties back and fix a few errors otherwise the script won't compile, so I add back at the top:

    Code:
    property pDiscoTimer


    And I had to fix other errors, the full script fixed is now:

    Code:
    property pDiscoTimer
    
    on construct(me)
      pDiscoTimer = 0
      return(1)
      exit
    end
    
    on deconstruct(me)
      return(removeUpdate(me.getID()))
      exit
    end
    
    on prepare(me)
      return(receiveUpdate(me.getID()))
      exit
    end
    
    on update(me)
      if the milliSeconds < pDiscoTimer + 500 then
        return(1)
      end if
      pDiscoTimer = the milliSeconds
      tThread = getThread(#room)
      if tThread = 0 then
        return(0)
      end if
      tRoomVis = tThread.getInterface().getRoomVisualizer()
      if tRoomVis = 0 then
        return(0)
      end if
      tDst = "df" & random(3)
      tCmd = "setfloor" & ["a", "b"].getAt(random(2))
      tNum = string(random(12))
      tSpr = tRoomVis.getSprById("show_" & tDst)
      if not tSpr then
        return(error(me, "Sprite not found:" && "show_" & tDst, #showprogram))
      else
        if tCmd = "setfloora" then
          tSpr.member.paletteRef = member(getmemnum("clubfloorparta" & tNum))
        else
          if tCmd = "setfloorb" then
            tSpr.member.paletteRef = member(getmemnum("clubfloorpartb" & tNum))
          end if
        end if
      end if
      exit
    end
    
    on showprogram(me, tMsg)
      if voidp(tMsg) then
        return(0)
      end if
      tThread = getThread(#room)
      if tThread = 0 then
        return(0)
      end if
      tRoomVis = tThread.getInterface().getRoomVisualizer()
      if tRoomVis = 0 then
        return(0)
      end if
      tDst = tMsg.getAt(#show_dest)
      tCmd = tMsg.getAt(#show_command)
      tNum = tMsg.getAt(#show_params)
      tSpr = tRoomVis.getSprById("show_" & tDst)
      if not tSpr then
        return(error(me, "Sprite not found:" && "show_" & tDst, #showprogram))
      else
        if tCmd = "setlamp" then
          tSpr.member.paletteRef = member(getmemnum("lattialamppu" & tNum))
        end if
      end if
      exit
    end
    In future cases multiple properties are separated by commas, example:

    Code:
    property pDiscoTimer, pTest, pTesting
    If I save the file either by using the file menu or CTRL+S and there's no compile errors, then congrats we can make the CCT again by using the Xtras -> Update Movies menu.



    Make sure "Convert to Shockwave Movie(s)" is selected and it's highly advisable you do backups, and now you can test your newly created CCT!


    Fuckings to Sulake for removing the classic features
    Last edited by Quackster; 07-06-19 at 11:27 PM.


  2. #2
    Elite Member treebeard is offline
    Member +Rank
    Jun 2018 Join Date
    Middle EarthLocation
    102Posts

    Re: [REL] [v5-v39] Completely decompiled shockwave Habbo clients

    Hot damn!!

    This really may be the best release the section has ever seen.

    Gonna be digging through all of these.

    Thanks a ton Alex.

  3. #3
    Sorcerer Supreme pipitt05000 is offline
    Member +Rank
    Feb 2009 Join Date
    FranceLocation
    350Posts

    Re: [REL] [v5-v39] Completely decompiled shockwave Habbo clients

    Just awesome ! But so late... :/

    Something better must be made for play to this old versions easily !

  4. #4
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,486Posts

    Re: [REL] [v5-v39] Completely decompiled shockwave Habbo clients

    Quote Originally Posted by pipitt05000 View Post
    Just awesome ! But so late... :/

    Something better must be made for play to this old versions easily !
    It's pretty easy to install Shockwave and use Pale Moon 32-bit...

  5. #5
    Sorcerer Supreme Hoshiko is online now
    Member +Rank
    May 2013 Join Date
    сикаLocation
    286Posts

    Re: [REL] [v5-v39] Completely decompiled shockwave Habbo clients

    inb4 Quackster sued

  6. #6
    Member Sylas is offline
    MemberRank
    Jan 2012 Join Date
    80Posts

    Re: [REL] [v5-v39] Completely decompiled shockwave Habbo clients

    Lingo code right? No way!

  7. #7
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,486Posts

    Re: [REL] [v5-v39] Completely decompiled shockwave Habbo clients

    Quote Originally Posted by Sylas View Post
    Lingo code right? No way!
    Yeah, it's all Lingo.

    It's not perfectly decompiled but most of it can easily be fixed. I've noticed that the nested if statements were once switch cases etc. I've provided documents for others to learn Lingo script.

  8. #8
    Member Sylas is offline
    MemberRank
    Jan 2012 Join Date
    80Posts

    Re: [REL] [v5-v39] Completely decompiled shockwave Habbo clients

    Damn, I thought it was impossible to actually recover it. Damn. :D

  9. #9
    Member Relevance is offline
    MemberRank
    May 2018 Join Date
    30Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Awesome release! We will be able to do a lot with this

  10. #10
    Grand Master Emily is offline
    Grand MasterRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    You actually decompiled and done all the CCTs? I was gonna suggest this to you, seems like you've done something I didn't expect. I guess this will be useful to some people here at least, and it's cool to look into the actual code of those old versions.

    My respect and lots of thanks!

    Edit:
    Puomi is down?

  11. #11
    Member Sylas is offline
    MemberRank
    Jan 2012 Join Date
    80Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Quote Originally Posted by Emily View Post
    You actually decompiled and done all the CCTs? I was gonna suggest this to you, seems like you've done something I didn't expect. I guess this will be useful to some people here at least, and it's cool to look into the actual code of those old versions.

    My respect and lots of thanks!

    Edit:
    Puomi is down?
    Ye, Puomi is down for some unknown reason.

    Edit; Seems like Puomi is up again.

  12. #12
    Grand Master Emily is offline
    Grand MasterRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Quote Originally Posted by Sylas View Post
    Ye, Puomi is down for some unknown reason.
    Seems like something's wrong with their site, sometimes it works (like now) and sometimes it doesn't work.

  13. #13
    Newbie joniz is offline
    MemberRank
    Mar 2019 Join Date
    9Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Quote Originally Posted by Emily View Post
    Seems like something's wrong with their site, sometimes it works (like now) and sometimes it doesn't work.
    Ascii hosts the site and server on his own machine, he has had issues with his internet (Router?) before

  14. #14
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,486Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Quote Originally Posted by Emily View Post
    You actually decompiled and done all the CCTs? I was gonna suggest this to you, seems like you've done something I didn't expect. I guess this will be useful to some people here at least, and it's cool to look into the actual code of those old versions.

    My respect and lots of thanks!

    Edit:
    Puomi is down?
    I have the Puomi restorations backed up, this should work: Index of /archive/puomi_restorations

  15. #15
    Member Sylas is offline
    MemberRank
    Jan 2012 Join Date
    80Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    I managed to play with some of the hotel views and got them to work after lightly editing them, like changing color. For example, the Chinese one I got the clouds working (Literally copied the Entry cloud class from Puomi restorations) got the cars and buses to work from the lingo code that Alex provided, but the bicycles seem to be dead even if the code exists under Entry Bicycle Class.

    I also realized if you change the "Habbo Hotel" corner_element in ps or other photo editor and replace it the loader just gives you the grey error box.

  16. #16
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,613Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Quote Originally Posted by Sylas View Post
    I also realized if you change the "Habbo Hotel" corner_element in ps or other photo editor and replace it the loader just gives you the grey error box.
    Perhaps wrong image format / bitdepth?

  17. #17
    Member Sylas is offline
    MemberRank
    Jan 2012 Join Date
    80Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Quote Originally Posted by The General View Post
    Perhaps wrong image format / bitdepth?
    I doubt that. I just copy the cast member directly to PS and edit it just like the hotel view (which works like normal) but not with the corner_element. But well, I will try to figure it out. :)

    Update: Just erased both corner_element and corner_elemet_shadow in Director with the eraser so they're white but in the loader, both corner_element and corner_element_shadow are completely transparent now. Not what I really wanted but hey it looks clean at least.
    Last edited by Sylas; 31-03-19 at 12:40 AM.

  18. #18
    ส็็็็็็็ Bloodraven is offline
    Grand MasterRank
    Sep 2009 Join Date
    AntarcticaLocation
    2,414Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Fuck, back in the day we'd have killed for this.

  19. #19
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,486Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Quote Originally Posted by Bloodraven View Post
    Fuck, back in the day we'd have killed for this.
    Also in the present day too, Shockwave Habbo is still awesome. And contains features that never came back into flash Habbo, that's why I released this. I also didn't have the knowledge to decompile CCT's until early last year.
    Last edited by Quackster; 04-04-19 at 04:00 AM.

  20. #20
    Elite Member treebeard is offline
    Member +Rank
    Jun 2018 Join Date
    Middle EarthLocation
    102Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Quote Originally Posted by Bloodraven View Post
    Fuck, back in the day we'd have killed for this.
    User counts aren't the best but Shockwave servers have never been better! Content that was once thought impossible has been put out, features never implemented are actively being worked on, old rooms and furni are being restored that were once lost.

    Download PaleMoon and check it out [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo



    Sent from my Pixel 3 using Tapatalk

  21. #21
    Sorcerer Supreme Jambokill is offline
    Member +Rank
    Dec 2010 Join Date
    PhilippinesLocation
    264Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Thanks, going to mirror this files.

  22. #22
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,486Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    I've been improving my decompiler in several ways, now global properties are automatically added to the top. The decompiler now can distinguish between dictionary and list initializations, and it now reads 4 byte integers and floats, which the bytecode was unsupported before. And also more code that was omitted due to an error encountered is now dumped inside the script so there's less information lost, but still may encounter errors

    For example pool_a Class.ls the array was completely hidden:

    Spoiler:

    Code:
      repeat while me <= undefined
    And now it's:

    Code:
      repeat while ["pool_clickarea", "floor", "hiliter", "vesi1", "portaat0"] <= undefined
    Which, while still code that cannot be compiled, you now know what the loop is with the correct information and it can be rewritten to successfully turn back into a .cct for the Habbo client.

    For example:

    Code:
      repeat while me <= undefined
        tid = getAt(undefined, undefined)
        tSpr = getThread(#room).getInterface().getRoomVisualizer().getSprById(tid)
        registerProcedure(tSpr, #poolTeleport, me.getID(), #mouseDown)
      end repeat
    Turns into:

    Code:
      tSprList = ["pool_clickarea", "floor", "hiliter", "vesi1", "portaat0"]
      i = 1
      repeat while i <= count(tSprList)
        tid = tSprList.getAt(i)
        tSpr = getThread(#room).getInterface().getRoomVisualizer().getSprById(tid)
        registerProcedure(tSpr, #poolTeleport, me.getID(), #mouseDown)
    	i = i + 1
      end repeat


    All of the improved decompiled source with the updates I've mentioned are now on GitHub: https://github.com/Quackster/habbo_src/

    Here's a few before/after for a few methods that have been fixed with the updates:

    checkCS in Photo Component Class.ls/hh_photo.cct:

    Spoiler:

    Before:

    Code:
    on countCS(me, tImg)
      tL = [3, 2, 73, 28, 83, 21, 43, 90, 92, 91, 37, 4, 3, 84, 12, 102, 103, 108, 97, 43, 44, 89, 109, 65, 61, -4, 76]
      tA = 0
      tW = tImg.width
      tH = tImg.height
      i = 1
      repeat while i <= 100
        tA = ERROR mod ERROR mod tA + tImg.getPixel(i mod tW, i * i mod tH).paletteIndex * tL.getAt(i mod tL.count + 1).undefined
        i = 1 + i
      end repeat
      return(tA)
      exit
    end
    After:

    Code:
    on countCS me, tImg 
      tL = [3, 2, 73, 28, 83, 21, 43, 90, 92, 91, 37, 4, 3, 84, 12, 102, 103, 108, 97, 43, 44, 89, 109, 65, 61, -4, 76]
      tA = 0
      tW = tImg.width
      tH = tImg.height
      i = 1
      repeat while i <= 100
        tA = tA + tImg.getPixel(i mod tW, i * i mod tH).paletteIndex * tL.getAt(i mod tL.count + 1) mod 85000
        i = 1 + i
      end repeat
      return(tA)
    end


    NotKeyDown from Jumping Pelle Class.ls/hh_room_pool.cct

    Spoiler:

    Before:

    Code:
    on NotKeyDown(me)
      -- UNK_C8 331925
      -- UNK_6A 138
      exit
      -- UNK_AB 35330
      if ERROR > ERROR or ERROR then
        pStatus = #Run
        jumpAction = "run"
        pSpeed = 2
      end if
      if not voidp(pJumpData) then
        if pJumpData.getProp(#char, length(pJumpData)) = "a" then
          presskey = "d"
        else
          presskey = "a"
        end if
        me.MykeyDown(presskey, void(), 1)
      else
        pJumpData = pJumpData & "a"
      end if
      pJumpData = pJumpData & "0"
      pJumpMode = #inactive
      me.JumpingExitFrame()
      exit
    end
    After:

    Code:
    on NotKeyDown me 
      if the milliSeconds > pRemoveJumperTime + 45000 then
        if pMyLoc.locH > pjumpBoardEnd then
          pStatus = #Run
          jumpAction = "run"
          pSpeed = 2
        end if
        if not voidp(pJumpData) then
          if pJumpData.getProp(#char, length(pJumpData)) = "a" then
            presskey = "d"
          else
            presskey = "a"
          end if
          me.MykeyDown(presskey, void(), 1)
        else
          pJumpData = pJumpData & "a"
        end if
      else
        pJumpData = pJumpData & "0"
        pJumpMode = #inactive
        me.JumpingExitFrame()
      end if
    end
    Last edited by Quackster; 08-05-19 at 02:07 AM.

  23. #23
    Member Sylas is offline
    MemberRank
    Jan 2012 Join Date
    80Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Great release as always Alex. :)

  24. #24
    Grand Master Emily is offline
    Grand MasterRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,408Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Still improving greatly I see. Good job!

  25. #25
    Grand Master Chapo is offline
    Grand MasterRank
    Jul 2010 Join Date
    United StatesLocation
    944Posts

    Re: [REL] [v5-v39] Decompiled Lingo from Shockwave Habbo

    Wow, you are the best! Love Quackquack



Page 1 of 2 12 LastLast

Advertisement