Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 30.01.2007, 05:38   #1
DevilsAssociate
Архивный участник
 
Join Date: Jul 2006
Posts: 81
Default ? on ai handler

i am still learning how to write ai.
Working on some script for a npc and i need to to check for karma then check for the pledge id. Got it in one talked handler and for some reason one or the there don't check.

Edited: figured it out stupid mistake

Code:
handler 3 82	//  TALKED
	variable_begin
		"talker"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  talker
	push_const 40
	add
	fetch_i	//  karma
	push_const 468
	add
	fetch_i4
	push_const 0
	greater
	branch_false L4841
L4850
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_parameter fnYouAreChaotic
	func_call 184680516	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
	jump L4847

L4841
	push_event	//  myself
	push_const 704
	add
	fetch_i
	func_call 184549553	//  func[Castle_GetPledgeId]
	push_event	//  talker
	push_const 40
	add
	fetch_i	//  pledge_id
	push_const 792
	add
	fetch_i4
	equal
	push_reg_sp
	fetch_i
	branch_false L4845
	push_event	//  talker
	push_const 40
	add
	fetch_i	//  pledge_id
	push_const 792
	add
	fetch_i4
	push_const 0
	not_equal
L4843
	branch_false L4845
L4844
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_parameter fnHi
	func_call 184680516	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
	jump L4846
L4845
	push_event	//  myself
	push_const 704
	add
	fetch_i
	push_event	//  talker
	push_const 40
	add
	fetch_i
	push_parameter fnNotMyPledge
	func_call 184680516	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
	

	
L4846
L4847
L4842
handler_end
DevilsAssociate is offline  
Old 30.01.2007, 07:38   #2
DevilsAssociate
Архивный участник
 
Join Date: Jul 2006
Posts: 81
Default

since i already posted this and figured it out i had a question on how handler value made up

what all is added up to ge tthe number. right now i am useing hf script make o find the right value. kinda want to find it without the scriptmaker.
DevilsAssociate is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 19:43.