Thread: [Guide] AI
View Single Post
Old 21.06.2007, 11:11   #3
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

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
- two last stack values
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
show like this
Code:
        i0 = i0 + 1000322;
HF is offline