View Single Post
Old 09.12.2005, 09:14   #9
kembl
Архивный участник
 
Join Date: May 2005
Posts: 63
Default

There my solution for add s_boss_mega_storm_strike5 in falibati.
When it in her territory ( when she plased by npcserver) they dont strike (only fight = call_super) with magic, but far from it, she will.

Yes, PG is old, but not so far as needs to change monsters AI in any small (as this) case, cause we all have got only C1 modded to C3.

So I left at the bottom "bad" solution, much more right (I think) will be check coords of creature, and follow it by several waypoints to give ability step on the stairs.

Code:
class falibati : warrior_aggressive_casting_sleep_magic
//KEMBL - Fire when out of birth zone
handler 1	//  ATTACKED
	variable_begin
		"attacker"
		"damage"
		"i6"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i
	func_call 177	//  func[InMyTerritory]
	shift_sp -1
	and
L9111913
	branch_false L9111915  //if InMyTerritory - attac magic
L91119074
	jump L91119073            //if not InMyTerritory - dont attac magic
L9111915	
	shift_sp 1
	push_event	//  attacker
	push_const 36
	add
	fetch_i
	push_const 1090821
	push_const 0
	push_const 1
	push_const 1000000
	func_call 10	//  func[AddUseSkillDesire]
	shift_sp -5
	shift_sp -1
//probab of speak  2%
	shift_sp 1
	push_const 100
	func_call 55	//  func[Rand]
	shift_sp -1
	push_const 2 	//2%
	less
	branch_false L911795
L911796	
//speak
	shift_sp 1
S9115365.	"Than than shell be your epitaf stucker!"
	push_string S9115365
	func_call 37	//  func[Say]
	shift_sp -1
	shift_sp -1
L911795
L91119073
	call_super
handler_end

class_end
kembl is offline