View Full Version : 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/C4decompiler.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
omg! O_o
Very big thx Sauron!
gj ;)
mcrabben7
24.10.2006, 06:11
Thanks for the share. Good job!
Domzelan
24.10.2006, 06:16
Very good - THX! :)
ismael66
24.10.2006, 06:43
Nice,Keep up the good work :)
Thank you sooo much, now i can really start to learn C4 AI.
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: А как компилировать то всё это? :)
thank Sauron, very nice share :)
dinesat4
24.10.2006, 19:32
Good Work ^^
now you have to work to... how compile? :P
Thanks a lot Sauron! This will be really useful!
it's translator, not decompiler ;)
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
Thank Sauron!!! Good Work!
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.
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
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 );
}
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...?
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.
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)
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.
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.
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
Original message (https://postpacific.loc-online.com/forums/showpost.php?p=70990&postcount=155)
* 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
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.
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 :)
//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
Juts revert a process :P
It'd doable with patience yes, but when you have 30 cases ... DEATH AND DECAY :D
LoVeRSaMa
14.11.2006, 18:45
I am sure a decompiler didnt come out befor, from the C1 project ?
that would mean years with no decompiler and then C4 AI comes out and within a month or so a decompiler comes out but not compiler :'(
i am gonna CRY !
Thanks sauron!! great share!
Саурон, большое спасибо, надеюсь это, то, что я искал.
Warning: array_key_exists(): The second argument should be either an array or an object in C:\Documents and Settings\Administrator\Desktop\C4decompiler\functi on.php on line 215
What a heck is this? tried to figure out whats actualy wrong but all code is undocumented, i dont know anything about variables, what they hold...
Great share, tankx, now i only need the compiler =D~~
Great share, tankx, now i only need the compiler =D~~
its called your brain :p
its called your brain :p
Thats the problem, i dont have brains :D
Thats the problem, i dont have brains :D
You only need one. Use search (?)
You only need one. Use search (?)
Ok, i injected PostPacific in my brains and i found it ;)
xD
Anyway once again Ty for the tool ^^
Firedaemon
23.02.2007, 19:40
Thank you for sharing your work
Greate share :) but there is a lot small mistakes...
Repository
14.03.2007, 12:51
ppl re-upload this tool someplace else pls, rapidshare doesnt want to deal with me(
RESHARE:
Mirror 1: http://rapidshare.com/files/21010107/C4decompiler.rar.html
Mirror 2: http://dump.ru/files/8/8025036706/
Repository
19.03.2007, 13:46
thanx alot!