View Single Post
Old 04-19-2006, 03:28 AM   #6
Slocket
Junior Member
 
Join Date: Jan 2006
Posts: 309
Hey, the old demo is written slightly different than the final game release Lup. I manage to follow you advice for the old demo file Lua 5.0 and it decompiled quite a bit until it crashed! lol

I thought you may find this interesting. I only used LuaDec on BuildTurboLaser.lua of the old demo. I change the header from Lua(51) to Lua(50). No other change yet and it decompiled the bugger until it hit the 'end' or that integer thingy. The other thing it seems to have a problem with handling End of Line.

If you can show me what you did with the LuaDec I think with this information; you will have a decompiler of some sort.

BuildTurboLasers.lua output before crash:

----------------------------------------------
1 GETGLOBAL 0 0
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{require}

----------------------------------------------
2 LOADK 1 1
SET_CTR(Tpend) = 1

next bool: 0
locals(0):
vpend(0):
tpend(2): 0{require} 1{"pgevents"}

----------------------------------------------
3 CALL 0 2 1

next bool: 0
locals(0):
vpend(0):
tpend(0):
require("pgevents")

----------------------------------------------
4 CLOSURE 0 0
----------------------------------------------
1 LOADK 0 1
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{"Build_Turbolasers"}
()

----------------------------------------------
2 SETGLOBAL 0 0
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(1): -1{Category="Build_Turbolasers"}
tpend(0):
()

----------------------------------------------
3 LOADBOOL 0 1 0
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{true}
()
Category = "Build_Turbolasers"

----------------------------------------------
4 SETGLOBAL 0 2
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(1): -1{IgnoreTarget=true}
tpend(0):
()
Category = "Build_Turbolasers"

----------------------------------------------
5 NEWTABLE 0 1 0

next bool: 0
locals(0):
vpend(0):
tpend(0):
()
Category = "Build_Turbolasers"
IgnoreTarget = true

----------------------------------------------
6 NEWTABLE 1 2 0

next bool: 0
locals(0):
vpend(0):
tpend(0):
()
Category = "Build_Turbolasers"
IgnoreTarget = true

----------------------------------------------
7 LOADK 2 4
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 2{"StructureForce"}
()
Category = "Build_Turbolasers"
IgnoreTarget = true

----------------------------------------------
8 LOADK 3 5
SET_CTR(Tpend) = 1

next bool: 0
locals(0):
vpend(0):
tpend(2): 2{"StructureForce"} 3{"Q_Galactic_Turbolaser_Tower_Defenses | X_Galactic_Turbolaser_Tower_Defenses = 1"}
()
Category = "Build_Turbolasers"
IgnoreTarget = true

----------------------------------------------
9 SETLIST 1 1
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 1{{"StructureForce", "Q_Galactic_Turbolaser_Tower_Defenses | X_Galactic_Turbolaser_Tower_Defenses = 1"}}
()
Category = "Build_Turbolasers"
IgnoreTarget = true

----------------------------------------------
10 SETLIST 0 0
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{{{"StructureForce", "Q_Galactic_Turbolaser_Tower_Defenses | X_Galactic_Turbolaser_Tower_Defenses = 1"}}}
()
Category = "Build_Turbolasers"
IgnoreTarget = true

----------------------------------------------
11 SETGLOBAL 0 3
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(1): -1{TaskForce={{"StructureForce", "Q_Galactic_Turbolaser_Tower_Defenses | X_Galactic_Turbolaser_Tower_Defenses = 1"}}}
tpend(0):
()
Category = "Build_Turbolasers"
IgnoreTarget = true

----------------------------------------------
12 RETURN 0 1 0

next bool: 0
locals(0):
vpend(0):
tpend(0):
()
Category = "Build_Turbolasers"
IgnoreTarget = true
TaskForce = {{"StructureForce", "Q_Galactic_Turbolaser_Tower_Defenses | X_Galactic_Turbolaser_Tower_Defenses = 1"}}

SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{function()
Category = "Build_Turbolasers"
IgnoreTarget = true
TaskForce = {{"StructureForce", "Q_Galactic_Turbolaser_Tower_Defenses | X_Galactic_Turbolaser_Tower_Defenses = 1"}}
end
}
require("pgevents")

----------------------------------------------
5 SETGLOBAL 0 2
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(1): -1{Definitions=function()
Category = "Build_Turbolasers"
IgnoreTarget = true
TaskForce = {{"StructureForce", "Q_Galactic_Turbolaser_Tower_Defenses | X_Galactic_Turbolaser_Tower_Defenses = 1"}}
end
}
tpend(0):
require("pgevents")

----------------------------------------------
6 CLOSURE 0 1
----------------------------------------------
1 GETGLOBAL 0 0
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{Sleep}
()

----------------------------------------------
2 LOADK 1 1
SET_CTR(Tpend) = 1

next bool: 0
locals(0):
vpend(0):
tpend(2): 0{Sleep} 1{1}
()

----------------------------------------------
3 CALL 0 2 1

next bool: 0
locals(0):
vpend(0):
tpend(0):
()
Sleep(1)

----------------------------------------------
4 GETGLOBAL 0 2
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{StructureForce}
()
Sleep(1)

----------------------------------------------
5 GETTABLE 0 0 253
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{StructureForce.Set_As_Goal_System_Removable}
()
Sleep(1)

----------------------------------------------
6 LOADBOOL 1 0 0
SET_CTR(Tpend) = 1

next bool: 0
locals(0):
vpend(0):
tpend(2): 0{StructureForce.Set_As_Goal_System_Removable} 1{false}
()
Sleep(1)

----------------------------------------------
7 CALL 0 2 1

next bool: 0
locals(0):
vpend(0):
tpend(0):
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)

----------------------------------------------
8 GETGLOBAL 0 4
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{AssembleForce}
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)

----------------------------------------------
9 GETGLOBAL 1 2
SET_CTR(Tpend) = 1

next bool: 0
locals(0):
vpend(0):
tpend(2): 0{AssembleForce} 1{StructureForce}
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)

----------------------------------------------
10 CALL 0 2 1

next bool: 0
locals(0):
vpend(0):
tpend(0):
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)
AssembleForce(StructureForce)

----------------------------------------------
11 GETGLOBAL 0 2
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{StructureForce}
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)
AssembleForce(StructureForce)

----------------------------------------------
12 GETTABLE 0 0 255
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{StructureForce.Set_Plan_Result}
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)
AssembleForce(StructureForce)

----------------------------------------------
13 LOADBOOL 1 1 0
SET_CTR(Tpend) = 1

next bool: 0
locals(0):
vpend(0):
tpend(2): 0{StructureForce.Set_Plan_Result} 1{true}
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)
AssembleForce(StructureForce)

----------------------------------------------
14 CALL 0 2 1

next bool: 0
locals(0):
vpend(0):
tpend(0):
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)
AssembleForce(StructureForce)
StructureForce.Set_Plan_Result(true)

----------------------------------------------
15 GETGLOBAL 0 6
SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{ScriptExit}
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)
AssembleForce(StructureForce)
StructureForce.Set_Plan_Result(true)

----------------------------------------------
16 CALL 0 1 1

next bool: 0
locals(0):
vpend(0):
tpend(0):
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)
AssembleForce(StructureForce)
StructureForce.Set_Plan_Result(true)
ScriptExit()

----------------------------------------------
17 RETURN 0 1 0

next bool: 0
locals(0):
vpend(0):
tpend(0):
()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)
AssembleForce(StructureForce)
StructureForce.Set_Plan_Result(true)
ScriptExit()

SET_CTR(Tpend) = 0

next bool: 0
locals(0):
vpend(0):
tpend(1): 0{function()
Sleep(1)
StructureForce.Set_As_Goal_System_Removable(false)
AssembleForce(StructureForce)
StructureForce.Set_Plan_Result(true)
ScriptExit()
end
}
require("pgevents")
Definitions = function()
Category = "Build_Turbolasers"
IgnoreTarget = true
TaskForce = {{"StructureForce", "Q_Galactic_Turbolaser_Tower_Defenses | X_Galactic_Turbolaser_Tower_Defenses =

Last edited by Slocket; 04-19-2006 at 04:17 AM.
Slocket is offline   you may: quote & reply,