Thread: [Guide] AI
View Single Post
Old 21.06.2007, 20:01   #9
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by HF View Post
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 dont know what discussion are you talking about but i dont remember nothing like that, there is only one way to get the second parameter of a handler declaration, the number of lines include labels, you need to count lines beggining after the var declaration... example...

Code:
	handler 0 0	//  NO_DESIRE
		variable_begin
			"myself"
			"_choiceN"
			"_code"
			"_from_choice"
		variable_end

	handler_end
No one... 0

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
FidoW is offline