Post Pacific  

Go Back   Post Pacific > Lineage 2 > Tutorials & Guides

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 13.07.2007, 20:07   #1
seway
Архивный участник
 
Join Date: Jun 2007
Posts: 21
Default

just a question:

Did anyone try decoding - modding - encoding recipe-c.dat ? I've tried Alzecs' pack, doesn't seem to be working, after I add one line to it, or mod anything in it, and re-encode, L2.exe crashes

"File was corrupted [Recipe-c.dat]. Please Full Check!!!"

is that possible to make with L2ScriptMaker?

thanks a lot
seway is offline  
Old 13.07.2007, 20:34   #2
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by seway View Post
just a question:

Did anyone try decoding - modding - encoding recipe-c.dat ? I've tried Alzecs' pack, doesn't seem to be working, after I add one line to it, or mod anything in it, and re-encode, L2.exe crashes

"File was corrupted [Recipe-c.dat]. Please Full Check!!!"

is that possible to make with L2ScriptMaker?

thanks a lot
yes, i do made this. All good.
HF is offline  
Old 13.07.2007, 20:15   #3
Forcer
Архивный участник
 
Join Date: Apr 2006
Posts: 554
Default

Quote:
Testing build will be share in the hour.
KG\Am, maybe u mean 1 week?
Forcer is offline  
Old 14.07.2007, 07:29   #4
Forcer
Архивный участник
 
Join Date: Apr 2006
Posts: 554
Default

Arrrghh... i updated to last ver, and now prog not work - invalid license.
I have one old, but not work. Wtf? >_<
Forcer is offline  
Old 14.07.2007, 08:44   #5
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Sorry. Tool has been recompiled with correct key. Download again same Rar archiv.
HF is offline  
Old 14.07.2007, 10:59   #6
ZeniMax
Архивный участник
 
Join Date: May 2006
Posts: 209
Default

HF I want to see that!!!!! Give me a demo license :P!!
ZeniMax is offline  
Old 14.07.2007, 17:25   #7
seway
Архивный участник
 
Join Date: Jun 2007
Posts: 21
Default

here i still cant open the program its asking for a license i`m using L2ScriptMaker4.0.24.1 i really need that license

HF pls contact me
seway is offline  
Old 14.07.2007, 17:28   #8
Forcer
Архивный участник
 
Join Date: Apr 2006
Posts: 554
Default

And how soon will be shared test version of ai dec? <_<
Forcer is offline  
Old 14.07.2007, 18:26   #9
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

2 day testing build

1. unpack to folder
2. add l2scriptmaker.license key file from L2SM
3. add function_c4.txt file from Sauron decompiler

tool ready to work
For correct working, you need fix function_c4.txt. 4th param must be set to '0' for all functions.

So, if this a testing - write me about bugs. But i tested with any combinations.

Tool work perfect for worked class and may crash on unknown error.

(new build in next posts)
HF is offline  
Old 14.07.2007, 19:05   #10
Forcer
Архивный участник
 
Join Date: Apr 2006
Posts: 554
Default

Quote:
4 params must be 0 for all functions.
WTF? More detail plz.
Forcer is offline  
Old 14.07.2007, 19:06   #11
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by Forcer View Post
WTF? More detail plz.
example

184549428|GetTimeHour,0,1
must be fix to
184549428|GetTimeHour,0,0
HF is offline  
Old 14.07.2007, 19:44   #12
ateh
Архивный участник
 
Join Date: Apr 2006
Posts: 118
Default

Few comments after quick look (I compare to NASC like version, so here it is...)

1)
Code:
	handler TALK_SELECTED (talker)
	{
		myself->ShowPage(talker, "noquest.htm");
	}
	handler_end
There shouldn't be this 'handler_end' line after each handler. Simply '}' closes the handler in nasc. Same for 'class_end'

2)
Code:
			Select Case ( reply )
			{
Select case ? Nooo... just Select(reply) { ..... }
and 'case ( 0 )' should be 'case 0:'

3) Not really important, but most people would expect to see words 'if','else', 'case','select' started with small letter, not 'If','Else','Case','Select'

4) 'parameter_define_begin' should be changed to 'parameter:'.
5) Parameters, for example 'int PosX 1' should look like this: 'int PosX = 1;'
6) After parameters, and before first handler in class there should be line with: 'handler:'
7) 'handler TALKED (talker)' should be 'EventHandler TALKED (talker)'
8) As far as I remember in nasc there was no 'elseif' condition, only 'else if' (with space)
9)
Code:
				ElseIf ( (reply == 532 || reply == 549) )
				{
				}
				Else 
				{
					myself->ShowMultisell(reply, talker);
				}
				Else 
				{
				}
				Else 
				{
					myself->ShowMultisell(reply, talker);
				}
Wooot? 2x Else too much for some reason...

10) Error while decompiling this code (from guard_move_around_fixed)
Code:
	push_event	//  myself
	push_const 704
	add
	fetch_i
	func_call 184549453	//  func[InstantRandomTeleportInMyTerritory]
	shift_sp -1
Stack empty, and it says number of some line (each time different number)
ateh is offline  
Old 15.07.2007, 08:46   #13
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by ateh View Post
Few comments after quick look (I compare to NASC like version, so here it is...)
all what you told - this a only my standarts. No hard to change.
I think what this better it is read.

Old
Code:
class ....
  handler ....
  {
     {
     }
  }
}
and my new
Code:
class ...
  handler ....
  {
     {
     }
  }
  handler_end
}
class_end
Or you no want +11 symbols?

Select Case () -> Select (). This is a only required to COMPILER what will be compile this code. Accept? If this compiler will be myself. Then all standarts can be any. Sure, i'll be made it combatible with all.
All defines and etc... this it a only debug and first standarts build. I dont good lines for all tellist, buysel list and etc. Only simple parsing.
Understund what i say?

about Else... I need check it. Tell me class what you decompile. But i teach all shemas for all select, case, if, ifelse, while, for blocks. My tool must be do it correct.

about function
184549453|InstantRandomTeleportInMyTerritory,0,0
all correct for me
myself->InstantRandomTeleportInMyTerritory();
HF is offline  
Old 15.07.2007, 10:14   #14
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Only two mans test it?
HF is offline  
Old 14.07.2007, 20:54   #15
Forcer
Архивный участник
 
Join Date: Apr 2006
Posts: 554
Default

Can someone share your fixed functions_c4.txt?
With my i can't decompile AI. (
Forcer is offline  
Old 15.07.2007, 13:50   #16
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

new build
fixed a lot exceptions, decompilation from debug window...
(attach deleted. tool released)
HF is offline  
Old 15.07.2007, 11:00   #17
ebosh
Архивный участник
 
Join Date: Sep 2006
Posts: 109
Default

HF give demo key
ebosh is offline  
Old 15.07.2007, 11:36   #18
m4rk
Архивный участник
 
Join Date: Jan 2006
Posts: 607
Default

HF I just tested it through all my custom AI jobs and it seems to decompile correctly.
About using your own syntax it is fine, it's not a big difference with the old c1 nasc ^^
m4rk is offline  
Old 15.07.2007, 11:47   #19
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by m4rk View Post
HF I just tested it through all my custom AI jobs and it seems to decompile correctly.
About using your own syntax it is fine, it's not a big difference with the old c1 nasc ^^
I'm right to understund? All your ai code decompled perfect? If yes, then i can shout "YAAahhooo!!". :santa:
You do tested manual code to decompile?


Yes. Syntaxys - it no problem. Main idea for Decompilation - show code to people in better readable mode. But if you have Compiler, then you need have compatible for it. I sure, what who have Compiler no have compatible on 100% with Sauron decompiler. And... i can do compatible with any compiler. But ... now testing time.
HF is offline  
Old 15.07.2007, 12:34   #20
ateh
Архивный участник
 
Join Date: Apr 2006
Posts: 118
Default

If you want your own standards then ok, it's up to you It's easy to convert anyway. I'm just kind of person who does not like to see 100 standards around
About this else's, turned out it was some mistake in my AI after some fixes(citizen class), so it's OK.

What else... many errors.
I put 1 class (citizen) in ai.obj and press start, and it shows error "Decompilaiton error for :Unkwnown error" "Error in : '0' line.
In error debug window: "0: -> class 1 citizen : default_npc"
I don't get what is wrong here... This class decompiles correctly in AI with all classes...

Another bug - when program shows errors it shows line number incorrectly. I put AI with around 4000 lines in it, and program shows error in line 7432...

Besides this things program decompiles OK. My custom classes were decompiled OK too.

Suggestion: Option 'Open decompiled file after compilation' would be better as off by default... It takes ages for it to open result file in notepad, especially if people like to use different editor.
ateh is offline  
Old 15.07.2007, 12:42   #21
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by ateh View Post
What else... many errors.
I put 1 class (citizen) in ai.obj and press start, and it shows error "Decompilaiton error for :Unkwnown error" "Error in : '0' line.
In error debug window: "0: -> class 1 citizen : default_npc"
I don't get what is wrong here... This class decompiles correctly in AI with all classes...

Another bug - when program shows errors it shows line number incorrectly. I put AI with around 4000 lines in it, and program shows error in line 7432...
Strange error in 0 line.

This errors i must see myself. Send me class if you want to debug it. On error tool show line number, class and saved class to file 'ai_out_abort.txt'.

I know one If tool crash - class incorrect
HF is offline  
Old 15.07.2007, 13:09   #22
ateh
Архивный участник
 
Join Date: Apr 2006
Posts: 118
Default

Class is OK. It happens when I copy one class from big AI to new file and try to decompile this file only. Then this 'line 0' error.
If I put two classes in new file, then first class decompile ok, and error on second class... So it seems like tool has error when trying to decompile last class in file, and it doesn't matter which class it is (if i switch them - first class 2, then class 1, then class 1 doesn't decompile...)
Strange...

Ps. Error exactly the same as m4rk posted in next post.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
ai.rar — 3251 байт
ateh is offline  
Old 15.07.2007, 13:14   #23
m4rk
Архивный участник
 
Join Date: Jan 2006
Posts: 607
Default

Mmmh, I only tried the manual decompilation (I didn't try all my AI, just some classes I wrote by myself).

However when I try the ai.obj file decompilationI have the same error in 0 line , I think it's a problem of mine, anyway I'll reproduce it here:

This is the ai.obj I try to decompile

This is an image of my folder and the options I use (default ones).

And the error given:
Quote:
Decompilation error for :Unknown error
Unkown error
Error in : '0' line
and the report:
Code:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at AFXwj.ANfNgbH3PV5J()
   at AFXwj.AKJylaLSc(String , String )
   at AFXwj.ALNV()
   at AFXwj.APjnPjxsY8TwBYl(Object , EventArgs )
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.507xx.xx (RTM.050727-4200)
    CodeBase: file:///H:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ezencryption_lib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.507xx.xx (RTM.050727-4200)
    CodeBase: file:///H:/WINDOWS/assembly/GAC_32/mscorlib/2.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.507xx.xx (RTM.050727-4200)
    CodeBase: file:///H:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.507xx.xx (RTM.050727-4200)
    CodeBase: file:///H:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.507xx.xx (RTM.050727-4200)
    CodeBase: file:///H:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
License
    Assembly Version: 1.0.0.0
    Win32 Version: 2.0.507xx.xx (RTM.050727-4200)
    CodeBase: file:///H:/WINDOWS/assembly/GAC_32/mscorlib/2.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
ziplib
    Assembly Version: 1.0.0.0
    Win32 Version: 2.0.507xx.xx (RTM.050727-4200)
    CodeBase: file:///H:/WINDOWS/assembly/GAC_32/mscorlib/2.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
AIDecompiler
    Assembly Version: 1.0.0.42110
    Win32 Version: 2.0.507xx.xx (RTM.050727-4200)
    CodeBase: file:///H:/WINDOWS/assembly/GAC_32/mscorlib/2.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.507xx.xx (RTM.050727-4200)
    CodeBase: file:///H:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.507xx.xx (RTM.050727-4200)
    CodeBase: file:///H:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
m4rk is offline  
Old 15.07.2007, 13:46   #24
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Fixed.

1) '0 line' bug cause progressbar.
2) class citizen.txt have incorrect code (if we told about standarts)
this:
your
Code:
L56
        //push_event    //  gg
        //push_const 632
        //add
        //fetch_i
        //func_call 218103810   //  func[IsEventServer]
        //push_const 1
        //equal
        //branch_false L59
        jump    L59
L58
correct retail code
Code:
L56
        push_event      //  gg
        push_const 632
        add
        fetch_i
        func_call 218103810     //  func[IsEventServer]
        push_const 1
        equal
        branch_false L59
L58
jump Lxxx
Lxxxx
block always define Else block. If you have // then you no must have jump.
Correct code:
Code:
				ElseIf ( (reply == 532 || reply == 549) )
				{
					If ( gg->IsEventServer() == 1 )
					{
						myself->ShowMultisell(reply, talker);
your decompilation:
Code:
 ElseIf ( (reply == 532 || reply == 549) )
 {
 }
 Else
 {
         myself->ShowMultisell(reply, talker);
HF is offline  
Old 15.07.2007, 14:17   #25
Forcer
Архивный участник
 
Join Date: Apr 2006
Posts: 554
Default

In test.
2HF, Better if u create a new thread about "Decompiler"
Forcer is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 19:39.