Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Tutorials & Guides (https://postpacific.mmorpg-game.online/forumdisplay.php?f=44)
-   -   [tool] [share] Lineage II Script maker v4.0.26.0 (17 Jule 07) (https://postpacific.mmorpg-game.online/showthread.php?t=1733)

seway 14.07.2007 17:25

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

Forcer 14.07.2007 17:28

And how soon will be shared test version of ai dec? <_<

HF 14.07.2007 18:26

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)

Forcer 14.07.2007 19:05

Quote:

4 params must be 0 for all functions.
WTF? More detail plz.

HF 14.07.2007 19:06

Quote:

Originally Posted by Forcer (Post 91783)
WTF? More detail plz.

example

184549428|GetTimeHour,0,1
must be fix to
184549428|GetTimeHour,0,0

ateh 14.07.2007 19:44

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)

Forcer 14.07.2007 20:54

Can someone share your fixed functions_c4.txt?
With my i can't decompile AI. (

HF 15.07.2007 08:46

Quote:

Originally Posted by ateh (Post 91791)
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 15.07.2007 10:14

Only two mans test it?

ebosh 15.07.2007 11:00

HF give demo key :)

m4rk 15.07.2007 11:36

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 ^^

HF 15.07.2007 11:47

Quote:

Originally Posted by m4rk (Post 91840)
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.

ateh 15.07.2007 12:34

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.

HF 15.07.2007 12:42

Quote:

Originally Posted by ateh (Post 91849)
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 :D

ateh 15.07.2007 13:09

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 байт

m4rk 15.07.2007 13:14

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.


HF 15.07.2007 13:46

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 15.07.2007 13:50

new build
fixed a lot exceptions, decompilation from debug window...
(attach deleted. tool released)

Forcer 15.07.2007 14:17

In test.
2HF, Better if u create a new thread about "Decompiler" :)

ateh 15.07.2007 15:02

I know about this citizen, that's why there were this else's one after another before ;)
Testing new build now.

Edit: New build works much better :) No errors, all fine.
Too bad it works so slowly, but hey, there is no need to decompile whole AI many times ;P

Forcer 15.07.2007 15:31

my suggestion - add new checkbox for skip ai errors.
Example: Occurs error\exception while decomp. and if checkbox true, then continue and jump to next class, also append info about broken class to error-log file with pointer to "bad" string.

Forcer 15.07.2007 16:33

REPORT:
Tool works FINE, i put my heavy ai and in 40 min decompilation (split to classes) finished with success, no errors, exceptions etc.
Very very fine.
Good work HF! :->

seway 16.07.2007 08:09

HF good job ignoring the ppl that help your project making a donation :( i`m for 2 days waiting for your answer :(

HF 16.07.2007 08:41

Quote:

Originally Posted by seway (Post 91948)
HF good job ignoring the ppl that help your project making a donation :( i`m for 2 days waiting for your answer :(

Im has informed you, what i can send key only in monday. I has doing this. Key already sended to your e-mail.

seway 16.07.2007 20:38

HF i just checked it here and didnt get any email, please check your pm.

Take care dude


All times are GMT. The time now is 18:09.