Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   C4 AI Decompiler (https://postpacific.loc-online.com/showthread.php?t=6064)

Sauron 24.10.2006 02:03

C4 AI Decompiler
 
this was done with c4 original ids (i know they are wrong) so there are 2 options, or decompiled original ai.obj which has to be place in the folder root or replace all the ids with the onces used by the ai.obj you want to decompile.

http://rapidshare.com/files/437524/C...piler.rar.html


theorically supports while, for, select case, if, else if, else, complex strings (var + "text" + var), buylist, teleportlist....

TheOrder 24.10.2006 02:19

w0000t Sauron Awsome job ! Think you just got boored lol and decided to do it !
Since i thought you retired and shit !
Manny thanks for the decompiler and for all things you cleared and helped me out on !

Tavi

Koner 24.10.2006 05:47

omg! O_o
Very big thx Sauron!
gj ;)

mcrabben7 24.10.2006 06:11

Thanks for the share. Good job!

hel 24.10.2006 06:15

Great share Sauron!!

Domzelan 24.10.2006 06:16

Very good - THX! :)

ismael66 24.10.2006 06:43

Nice,Keep up the good work :)

SlayerX 24.10.2006 06:45

Godlike share, good job

GMan 24.10.2006 08:36

Thank you sooo much, now i can really start to learn C4 AI.

cypher 24.10.2006 09:38

Kicks arse :) ... and I suppose next one comming is the SauComp.

Cheers

barabashka 24.10.2006 13:15

Greate work. Tnx.

Domzelan 24.10.2006 13:16

Yes we can decompile and what about compile? :)

rus: А как компилировать то всё это? :)

MuNLoK 24.10.2006 19:08

thank Sauron, very nice share :)

dinesat4 24.10.2006 19:32

Good Work ^^

now you have to work to... how compile? :P

m4rk 24.10.2006 19:56

Thanks a lot Sauron! This will be really useful!

adriahu 24.10.2006 23:20

it's translator, not decompiler ;)

fanatic 25.10.2006 02:32

Awesome work ! World woud be great if all ppl are like u and humordwarf! ^^

Guaresnay 25.10.2006 03:18

ty so much, great share dude :D

karabas 25.10.2006 04:08

Thank Sauron!!! Good Work!

Isachs 25.10.2006 04:09

Awesome work, thx ^^

hhk31257 25.10.2006 21:44

is it possible to tell us how you compile your C4 ai?

because atm we use your decompiler
and to compile we first compile it with the C1 compiler and then convert it to C4
but the converter is very error sensitive...

any information on this would be very appreciated.

Sauron 25.10.2006 22:24

i code directly in ai.obj.

i have a c1 compiler in php, maybe in a near future i'll addapt it to c4.

BloodLine 26.10.2006 00:03

thank you Sauron great share

RmzVoid 27.10.2006 06:00

10x for this tool.
Now very easy look in ai
but some bugs present

i0 = myself->FloatToInt(myself.sm.x);
i1 = myself->FloatToInt(myself.sm.creature);
i2 = myself->FloatToInt(myself.sm.z);

should be

i0 = myself->FloatToInt(myself.sm.x);
i1 = myself->FloatToInt(myself.sm.y);
i2 = myself->FloatToInt(myself.sm.z);

also

if( 268435456 )
{
myself.i_ai0 = 1;
myself.sm.param3 = ( myself.sm.param3 - 268435456 );
}

to

if( myself.sm.param3 & 268435456 )
{
myself.i_ai0 = 1;
myself.sm.param3 = ( myself.sm.param3 - 268435456 );
}

Mark20 27.10.2006 07:43

Quote:

Originally Posted by RmzVoid (Post 70770)
10x for this tool.
Now very easy look in ai
but some bugs present

i0 = myself->FloatToInt(myself.sm.x);
i1 = myself->FloatToInt(myself.sm.creature);
i2 = myself->FloatToInt(myself.sm.z);

should be

i0 = myself->FloatToInt(myself.sm.x);
i1 = myself->FloatToInt(myself.sm.y);
i2 = myself->FloatToInt(myself.sm.z);


Maybe is duo to different ids...?

Quote:

Originally Posted by Sauron (Post 70616)
this was done with c4 original ids (i know they are wrong) so there are 2 options, or decompiled original ai.obj which has to be place in the folder root or replace all the ids with the onces used by the ai.obj you want to decompile.


RmzVoid 27.10.2006 10:04

Mark20 ok, I cant read :)

cant fix festival mobs, dont understand that wrong (

LoVeRSaMa 27.10.2006 11:12

Now i can fix that bitch puss the cat....

nathan b)

HF 28.10.2006 19:26

Somebody can explain to me why these parameters repeat? And where true.

8|default|x
12|default|y
16|default|y
24|default|z
40|default|name
68|default|x
72|default|y
76|default|z
90|default|name
200|default|name

Still more some examples.

Sauron 28.10.2006 20:58

i scaned for all vars ids, some were repeted with diferent ids
ex:
push_event // myself
push_const 704
add
fetch_i // sm
push_const 544
add
fetch_i // x
push_const 8


push_event // record0
push_const 712
add
fetch_i // x
push_const 68
add

default is the handler, cos i think (i don't remember) some ids are unique in some handlers.

HF 29.10.2006 10:02

Quote:

Originally Posted by Sauron (Post 70881)
i scaned for all vars ids, some were repeted with diferent ids
...
default is the handler, cos i think (i don't remember) some ids are unique in some handlers.

1)Are you can write all Exceptions for me? My program cannot automatically correct these distinctions. I should write in addition a condition in the program.

2)
When I searched for correct values, I too have met that these two functions do not give in to logic. There can be you can tell conditions for them?
251658240|Next,0,0
251658242|RandomSelectOne,0,0
335544320|Next,0,0
335544321|RandomSelectOne,0,0

3) Why many fetch_i have erroneous values? It specially? :) I mean what already for a long time are corrected and published and at this forum.
for example:
fetch_i // max_magic_level
push_const 2096 must be 2088
and etc

HF 30.10.2006 06:35

Original message

* Script Checker and Fixer Modules *
New- Ai.obj Fixer: Check of a file on correct values in func_call, fetch_i, push_event and correction. Support log.
New- Ai.obj Handler Line checker: Check of a file on quantity of lines in Handler.. Support log.

4.0.7.1 + Script Checkers: 'Ai.obj Fixer' remove to "Scripts file checker"
* Script Checkers: 'Ai.obj Fixer' Files from Sauron C4Decompiler knowledge base are used. But with corrections and changes
in a format of files for work with this program.

4.0.7.0 + Start new project - "Scripts file checker". Checking on correct numbers, formats and etc.
+ Script Checkers: 'AI Handler Line checker'. Calculate defined and real line numbers in handler.

4.0.6.0 - AiInjector: 'Split' and 'Inject' compatible with C4 AI.obj now.

File structure for "Ai.obj Fixer' in original message.

Letter to Sauron
Sauron, I would like to communicate to you with the purpose of a finding of correct values and with the purpose of the further cooperation.

turksauron 30.10.2006 09:32

Does anyone have a compiler for it??? Like nasc but i ve old version. Please share latest version.

turksauron 30.10.2006 11:13

Code:

class npcbuffer : citizen
{
parameter:
        string        ShopName = "";
        string        fnHi = "thi.htm";
        string        fnYouAreChaotic = "buffer_npc002.htm";
        string        fnNextBuff = "buffer_npc001.htm";
        string        fnNotEnoughAdena = "not_enough_adena.htm";
        string        fnLowLevel = "lowlevel.htm";
        int        SelfBuff1 = 1031169;
        int        SelfBuff2 = 1031169;
        int        SelfBuff3 = 1031169;
        int        SelfBuff4 = 1031169;
        int        SelfBuff5 = 1031169;
        int        SelfBuff6 = 1031169;
        int        SelfBuff7 = 1031169;
        int        SelfBuff8 = 1031169;
        int        SelfBuff9 = 1031169;
        int        SelfBuff10 = 1031169;
        int        SelfBuff11 = 1031169;
        int        SelfBuff12 = 1031169;
        int        SelfBuff13 = 1031169;
        int        SelfBuff14 = 1031169;
        int        SelfBuff15 = 1031169;
        int        SelfBuff16 = 1031169;
        int        SelfBuff17 = 1031169;
        int        SelfBuff18 = 1031169;
        int        SelfBuff19 = 1031169;
        int        SelfBuff20 = 1031169;
        int        SelfBuff21 = 1031169;

handler:
        EventHandler TALKED(talker)
        {
                if( talker.karma > 0 )
                {
                        myself->ShowPage(talker,fnYouAreChaotic);
                }
                else
                {
                        myself->ShowPage(talker,fnHi);
                }
        }

        EventHandler MENU_SELECTED(ask,reply,talker)
        {
                if( myself->OwnItemCount(talker,57) >= 400000 )
                {
                        myself->DeleteItem1(talker,57,400000);
                        myself->AddUseSkillDesire(talker,SelfBuff1,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff2,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff3,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff4,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff5,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff6,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff7,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff8,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff9,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff10,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff11,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff12,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff13,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff14,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff15,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff16,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff17,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff18,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff19,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff20,0,1,1000000);
                        myself->AddUseSkillDesire(talker,SelfBuff21,0,1,1000000);
                        myself->ShowPage(talker,fnNextBuff);
                }
                else
                {
                        myself->ShowPage(talker,fnNotEnoughAdena);
                }
        }

}

Hihuuuuuu. Oleeeeyy. I wrote it in the end.

Sauron 30.10.2006 13:28

Quote:

Originally Posted by HF (Post 70992)
Letter to Sauron
Sauron, I would like to communicate to you with the purpose of a finding of correct values and with the purpose of the further cooperation.

i thought the ids were already shared

Domzelan 30.10.2006 14:00

Now we need compiler :)

Zil 30.10.2006 15:51

Wrote him ;)

kosyar 13.11.2006 14:48

//eng
And at me here what question and as me back to collect ai
sorri me eng is bad
//rus
а у меня вот какой вопрос а как мне обратно собрать ai

LoVeRSaMa 14.11.2006 17:13

Yea seriously, a compiler does need to be made and shared because stack machine will kill me soon...

i can code AI in "Code Form" but not as raw as that, a compiler will save my life xD

empathon 14.11.2006 18:08

Juts revert a process :P

m4rk 14.11.2006 18:33

Quote:

Originally Posted by empathon (Post 72310)
Juts revert a process :P

It'd doable with patience yes, but when you have 30 cases ... DEATH AND DECAY :D


All times are GMT. The time now is 16:24.