![]() |
|
|
|
|
#1 |
|
Архивный участник
Join Date: Apr 2006
Posts: 118
|
- Also:
add xor mod bit_or bit_and not -------- Class 1 Class 2 Type 1 for NPCs, Type 2 for Npc Maker (defines spawning rules) -------- Are you sure that labels are not counted in handlers lenght? Cos from original AI I can tell that they are counted. |
|
|
|
|
#2 | |
|
Архивный участник
Join Date: Aug 2005
Posts: 1,531
|
Can give how it to see in decompiled mode?
add = + xor = xor mod = / ... Quote:
|
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Aug 2005
Posts: 1,531
|
Use 'assign'
Code:
class 1 undead_priest : warrior_pa_slow_type2 handler 10 329 // MY_DYING variable_begin "always_list" "c1" "code_info" "i9" "last_attacker" "lparty" "member" "random1_list" "target" "myself" "_choiceN" "_code" "_from_choice" variable_end push_event // always_list push_const 688 add push_reg_sp fetch_i push_event // gg push_const 632 add fetch_i func_call 218103812 // func[AllocCodeInfoList] assign shift_sp -1 always_list (1) and gg->AllocCodeInfoList() (2) uses in - operation is value assignment 'gg->AllocCodeInfoList()' for variable 'always_list' Code:
always_list = gg->AllocCodeInfoList(); Short and easy example: Code:
L2269
push_event // i0
push_const 260
add
push_reg_sp
fetch_i
push_event // i0
push_const 260
add
fetch_i4
push_const 1000322
add
assign4
shift_sp -1
Code:
i0 = i0 + 1000322; |
|
|
|
|
#4 | ||
|
Архивный участник
Join Date: Apr 2006
Posts: 118
|
Quote:
Code:
case 'mul':
$stack[$sp-1] = $stack[$sp-1].' * '.$stack[$sp];
if($sp != 0) $stack[$sp-1] = '( '.$stack[$sp-1].' )';
$sp--; array_pop($stack);
break;
case 'xor':
$stack[$sp-1] = $stack[$sp-1].' ^ '.$stack[$sp];
if($sp != 0) $stack[$sp-1] = '( '.$stack[$sp-1].' )';
$sp--; array_pop($stack);
break;
case 'mod':
$stack[$sp-1] = $stack[$sp-1].' % '.$stack[$sp];
if($sp != 0) $stack[$sp-1] = '( '.$stack[$sp-1].' )';
$sp--; array_pop($stack);
break;
case 'bit_or':
$stack[$sp-1] = $stack[$sp-1].' | '.$stack[$sp];
if($sp != 0) $stack[$sp-1] = '( '.$stack[$sp-1].' )';
$sp--; array_pop($stack);
break;
case 'bit_and':
$stack[$sp-1] = $stack[$sp-1].' & '.$stack[$sp];
if($sp != 0) $stack[$sp-1] = '( '.$stack[$sp-1].' )';
$sp--; array_pop($stack);
break;
case 'negate':
$stack[$sp] *= -1;
break;
case 'not':
$stack[$sp] = '~('.$stack[$sp].')';
break;
Quote:
|
||
|
|
|
|
#5 | |
|
Архивный участник
Join Date: Aug 2005
Posts: 1,531
|
Quote:
1) maybe you can more changes in decompiler? "New unoffical release" 2) Oh.. yes... I wrong. Wrong only in thread. Yes. Need count all and Lxxx labels too. I can confirm it - my tool, im always counting with Labels. But another developers have different openition. You can find thread about "C4 compiler" service. I'll fix everywhere in this thread all my errors. |
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Apr 2006
Posts: 236
|
This thread is amazing, great work HF im impressed, I hope you build on this further.
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: Apr 2006
Posts: 118
|
I think this was all that I added there myself. Plus changes some data files as some IDs were not matching NPC server I use...
Or maybe you are interested in version for C1? I made one by changing Sauron's C4 version. |
|
|
|
|
#8 |
|
Архивный участник
Join Date: Aug 2005
Posts: 1,531
|
|
|
|
|
|
#9 | |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
Quote:
Code:
handler 0 0 // NO_DESIRE variable_begin "myself" "_choiceN" "_code" "_from_choice" variable_end handler_end Code:
handler 4 13 // TALK_SELECTED variable_begin "talker" "myself" "_choiceN" "_code" "_from_choice" variable_end 1 push_event // myself 2 push_const 704 3 add 4 fetch_i 5 push_event // talker 6 push_const 40 7 add 8 fetch_i 9 S0. "noquest.htm" 10 push_string S0 11 func_call 184680516 // func[ShowPage] 12 shift_sp -2 13 shift_sp -1 handler_end Code:
handler 3 38 // TALKED variable_begin "talker" "myself" "_choiceN" "_code" "_from_choice" variable_end 1 push_event // talker 2 push_const 40 3 add 4 fetch_i // karma 5 push_const 468 6 add 7 fetch_i4 8 push_const 0 9 greater 10 branch_false L2 11 L1 12 push_event // myself 13 push_const 704 14 add 15 fetch_i 16 push_event // talker 17 push_const 40 18 add 19 fetch_i 20 push_parameter fnYouAreChaotic 21 func_call 184680516 // func[ShowPage] 22 shift_sp -2 23 shift_sp -1 24 jump L3 25 L2 26 push_event // myself 27 push_const 704 28 add 29 fetch_i 30 push_event // talker 31 push_const 40 32 add 33 fetch_i 34 push_parameter fnHi 35 func_call 184680516 // func[ShowPage] 36 shift_sp -2 37 shift_sp -1 38 L3 handler_end |
|
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|