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!