View Single Post
Old 25.12.2005, 21:08   #2
filrip
Архивный участник
 
Join Date: May 2005
Posts: 99
Default

Code:
class summon_mithril_arrow : (null)
handler 13	// CREATED
	variable_begin
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  master
	push_const 2404
	add
	fetch_i
	push_const 1344
	push_const 10   //  MINIMUM
	shift_sp 1
	push_const 20   // MORE RANDOM
	func_call 55	//  func[Rand]
	shift_sp -1
	add
	func_call 77	//  func[GiveItem1]
	shift_sp -3
	shift_sp -1
	shift_sp 1
	func_call 175	//  func[Despawn]
	shift_sp -1
handler_end
class_end
MINIMUM is the minimum number of arrow give, you can set it to 0
MORE RANDOM is the number added to the MINIMUM, but randomly set between 0 and the number you set. You can set it to 0 to give only MINIMUM quantity of the item

not tested if minimum = 0 and random return 0... i recommand that you set minimum to 1 to prevent crash of l2npc.exe (else it will try to give 0 arrow in this condition... can crash perhaps...)
filrip is offline