inst
reps 25
	new: simp 2 11 5816 "owkwoodcreeper" 1 22 rand 1500 7500
	attr 195
	bhvr 48
	accg 3
	fric 80
	elas 90
	perm rand 20 90
	aero 1
	emit 8 0.2
	setv ov01 0
	tick rand 300 400
	setv va00 rand 400 1500
	setv va01 1500

	doif tmvt va00 va01 eq 1
		mvto va00 va01
	else
		kill targ
	endi
repe
reps 15
	new: simp 2 11 5816 "owkwoodcreeper" 1 22 rand 1500 7500
	attr 195
	bhvr 48
	accg 3
	fric 80
	elas 90
	perm rand 20 90
	aero 1
	emit 8 0.2
	setv ov01 0
	tick rand 300 400
	setv va00 rand 700 1700
	setv va01 1700
	doif tmvt va00 va01 eq 1
		mvto va00 va01
	else
		kill targ
	endi

repe
reps 10
	new: simp 2 11 5816 "owkwoodcreeper" 1 22 rand 1500 7500
	attr 195
	bhvr 48
	accg 3
	fric 80
	elas 90
	perm rand 20 90
	aero 1
	emit 8 0.2
	setv ov01 0
	tick rand 300 400
	setv va00 rand 140 1200
	setv va01 rand 1925 1950
	doif tmvt va00 va01 eq 1
		mvto va00 va01
	else
		kill targ
	endi
repe
scrp 2 3 5816 4
	anim []
endm
scrp 2 3 5816 5
	anim [ 0 1 2 3 255]
endm
scrp 2 3 5816 6
	doif wall eq down
		anim []
	endi
endm
scrp 2 3 5816 9
	lock
	rnge 70
	setv va66 0
	esee 2 4 5816
		addv va66 1
	next
	targ ownr
	doif va66 ge 1
		doif room targ ne -1 and carr eq null
			altr room targ 3 0.01
			altr room targ 4 0.02
			kill ownr
		else

			kill ownr
		endi
	endi
	unlk
	doif fall eq 0 and carr eq null
		doif rtyp room targ eq 8 or rtyp room targ eq 9
			kill ownr
		endi

		gsub envi
		gsub dorm
	endi
	subr envi
		setv va52 posb
		addv va52 2
		doif prop room targ 1 le ov80 and prop room targ 1 ge 0.15
			setv va00 1
		else
			setv va00 0
		endi
		doif prop room targ 2 le ov82 and prop room targ 2 ge 0.3
			setv va01 1
		else
			setv va01 0
		endi
		doif prop room targ 3 ge 0.15
			setv va02 1
		else
			setv va02 0
		endi
		doif prop room targ 4 ge ov87
			setv va03 1
		else
			setv va03 0
		endi
		doif rtyp grap posx va52 eq 1 or rtyp grap posx va52 eq 2
			setv va04 1
		else
			setv va04 0
		endi
		doif va00 eq 1 and va01 eq 1 and va02 eq 1 and va03 eq 1 and va04 eq 1
			gsub grow
		endi
	retn
	subr grow
		setv va00 posl
		setv va01 post
		new: simp 2 4 5816 "owkwoodcreeper" 10 4 rand 4000 8000
		attr 16
		bhvr 0
		perm 0
		setv ov00 0
		setv ov02 5
		setv ov99 0
		setv ov01 0
		subv va00 44
		subv va01 30
		doif tmvt va00 va01 eq 1
			mvto va00 va01
		else
			kill targ
			kill ownr
		endi
		tick rand 450 600
		kill ownr
	retn
	subr dorm
		subv ov72 1
		doif ov72 le 0
			doif room targ ne -1 and carr eq null
				altr room targ 3 0.01
				altr room targ 4 0.02
				kill ownr
			else
				kill ownr
			endi
		endi
	retn
endm
scrp 2 3 5816 12
	stim writ from 77 0.2
	kill ownr
endm
scrp 2 4 5816 9
	addv ov01 1
	subv ov02 1
	doif prop room targ 1 ge 0.1 and prop room targ 2 ge 0.3 and prop room targ 3 ge 0.1 and prop room targ 4 ge 0.0005
		addv ov02 10
	endi
	doif ov02 le 0
		setv ov00 99
	endi
	doif ov00 eq 99
		gsub die
	endi
	doif ov00 eq 0
		gsub grow
	endi
	doif ov00 eq 1
		gsub bloom
	endi
	subr grow
		doif ov01 ge 3
			doif pose lt 7
				setv va00 pose
				addv va00 1
				pose va00
				setv ov01 0
			else
				setv ov00 1
			endi
		endi
	retn
	subr bloom
		doif ov99 le 20
			doif ov72 le 4
				gsub flower
			endi
		else

			setv ov00 99
		endi
	retn
	subr flower
		setv va00 posl
		setv va01 post
		setv va02 plne
		addv va00 rand 30 60
		addv va01 rand 30 120
		addv va02 1
		new: simp 2 7 5816 "owkwoodcreeper" 8 14 va02
		attr 16
		bhvr 0
		setv ov00 0
		setv ov01 0
		doif tmvt va00 va01 eq 1
			mvto va00 va01
			tick rand 600 800
		else
			kill targ
			targ ownr
			subv ov72 1
		endi

		seta ov50 ownr
		addv mv72 1
	retn
	subr die
		doif ov01 ge 5
			doif pose lt 9
				setv va00 pose
				addv va00 1
				pose va00
				setv ov01 0
			elif pose eq 9
				doif room targ ne -1 and carr eq null
					altr room targ 3 0.1
					altr room targ 4 0.2
					kill ownr
				else
					kill ownr
				endi
			endi
		endi
	retn
endm
scrp 2 7 5816 9
	doif ov50 eq null
		kill ownr
	endi
	inst
	doif ov50 ne null
		targ ov50
		doif ov00 eq 99
			targ ownr
			kill ownr
		endi
	endi
	slow
	targ ownr
	addv ov01 1
	doif pose lt 7
		setv va00 pose
		addv va00 1
		pose va00
	elif pose ge 7
		gsub ripe
	endi
	subr ripe
		inst
		targ ov50
		subv ov72 1
		addv ov99 1
		targ ownr
		setv va50 posl
		setv va51 post
		setv va02 plne
		addv va02 1
		new: simp 2 11 5816 "owkwoodcreeper" 1 22 va02
		attr 195
		bhvr 48
		accg 3
		fric 80
		elas 90
		perm rand 20 90
		aero 1
		emit 8 0.2
		setv ov01 0
		doif tmvt va50 va51 eq 1
			mvto va50 va51

		else
			kill targ
			kill ownr
		endi
		tick rand 300 400
		kill ownr
		slow
	retn
endm
scrp 2 11 5816 9
	addv ov01 1
	doif ov01 gt 80
		doif rtyp room targ ne -1 and carr eq null
			altr room targ 3 0.05
			altr room targ 4 0.075
			kill ownr
		else
			kill ownr
		endi
	endi
endm
scrp 2 11 5816 12
	inst
	stim writ from 79 1
	targ from
	chem 3 0.4
	chem 33 0.3
	chem 10 0.3
	chem 12 0.2
	chem 99 0.2
	chem 100 0.1

	setv va24 rand 1 2
	doif va24 eq 2
		seta va19 targ
		setv va50 posx
		setv va51 posy
		setv va52 posb
		subv va52 va51
		divv va52 2
		addv va52 va51
		new: simp 1 1 5816 "owkwoodcreeper" 1 23 5000
		attr 48
		bhvr 0
		frel va19
		seta ov16 va19
		setv ov72 rand 15 20
		doif tmvt va50 va52 eq 1
			mvto va50 va52
			tick rand 100 150
		else
			kill targ
			targ ownr
		endi
	endi
	targ from
	setv va50 posx
	setv va01 post
	setv va51 posy
	subv va51 va01
	divv va51 3
	addv va01 va51
	reps rand 1 3
		new: simp 2 3 5816 "owkwoodcreeper" 4 0 rand 1500 7500
		attr 210
		bhvr 16
		perm 99
		elas 5
		fric 90
		accg 2
		aero 1
		setv ov72 rand 10 20
		setv ov80 0.6
		setv ov82 1
		setv ov87 0.001

		doif tmvt va50 va01 eq 1
			mvto va50 va01
			velo rand -15 15 rand -15 0
			tick rand 300 400
		else
			kill targ
			targ ownr
		endi
	repe
	slow
	kill ownr
endm
scrp 1 1 5816 9
	doif ov16 ne null
		subv ov72 1
		doif ov72 le 0
			gsub disperse
		endi
	else
		gsub disperse
	endi
	subr disperse
		setv va50 posx
		setv va51 posy
		reps rand 1 3
			new: simp 2 3 5816 "owkwoodcreeper" 4 0 rand 1500 7500
			attr 210
			bhvr 16
			perm 99
			elas 5
			fric 90
			accg 2
			aero 1
			setv ov72 rand 10 20
			setv ov80 0.6
			setv ov82 1
			setv ov87 0.001
			velo rand -15 15 rand -15 0
			doif tmvt va50 va51 eq 1
				mvto va50 va51
				tick rand 300 400
			else
				kill targ
			endi
		repe


		kill ownr
	retn
endm

rscr
enum 2 3 5816
	kill targ
next
enum 2 4 5816
	kill targ
next
enum 2 7 5816
	kill targ
next
enum 2 11 5816
	kill targ
next
scrx 2 3 5816 4
scrx 2 3 5816 5
scrx 2 3 5816 6
scrx 2 3 5816 9
scrx 2 4 5816 9
scrx 2 11 5816 9
scrx 2 11 5816 12