
inst
reps 2
	new: simp 2 18 5815 "poisonfrog" 4 154 rand 100 5000
	attr 195
	bhvr 48
	elas 0
	fric 50
	perm 5
	accg 1
	aero 1
	setv ov01 0
	setv ov02 500

	setv va00 rand 250 900
	setv va01 2250
	doif tmvt va00 va01 eq 1
		mvto va00 va01
		tick rand 75 200
		velo rand -5 5 0
	else
		kill targ
	endi
repe
reps 2
	new: simp 2 18 5815 "poisonfrog" 4 154 rand 100 5000
	attr 195
	bhvr 48
	elas 0
	fric 50
	perm 5
	accg 1
	aero 1
	setv ov01 0
	setv ov02 500
	setv va00 rand 2450 2800
	setv va01 2150
	doif tmvt va00 va01 eq 1
		mvto va00 va01
		tick rand 75 200
		velo rand -5 5 0

	else
		kill targ
	endi
repe
reps 6
	new: simp 2 16 5815 "poisonfrog" 36 76 rand 100 5000
	attr 195
	bhvr 48
	accg 0
	elas 10
	fric 10
	aero 4
	perm 24
	setv ov00 0
	setv ov01 0
	setv ov02 100
	setv ov05 0
	setv ov06 rand 0 1
	setv ov14 2
	setv ov15 1
	setv ov20 0
	setv ov30 0
	setv ov31 8
	setv ov72 200
	setv ov73 500
	setv ov74 900
	setv ov99 30
	setv va00 rand 2450 2800
	setv va01 2125
	doif tmvt va00 va01 eq 1
		mvto va00 va01
		tick rand 20 30
	else
		kill targ
	endi
repe
reps 6
	new: simp 2 16 5817 "poisonfrog" 26 112 rand 100 5000
	attr 195
	bhvr 48
	accg 3
	elas 1
	fric 99
	aero 4
	perm 85
	setv ov00 0
	setv ov01 0
	setv ov02 200
	setv ov06 rand 0 1
	setv ov10 rand -1 1
	setv ov11 rand -1 1
	setv ov14 8
	setv ov15 6
	seta ov16 null
	setv ov17 0
	setv ov18 0
	seta ov19 null
	setv ov20 0
	setv ov30 0
	setv ov31 13
	setv ov32 6
	setv ov33 19
	setv ov34 10
	setv ov35 23
	setv ov70 0
	setv ov72 250
	setv ov73 500
	setv ov74 1000
	setv ov99 40
	setv va00 rand 2450 2800
	setv va01 2050
	doif tmvt va00 va01 eq 1
		mvto va00 va01
		tick rand 10 20
	else
		kill targ
	endi
repe


scrp 2 18 5815 9

	addv ov01 1
	subv ov02 1
	doif rtyp room targ ne 8
		subv ov02 20

	endi
	doif ov02 le 0
		kill ownr
	endi
	doif ov01 ge 15
		gsub develop
	endi
	subr develop
		doif pose lt 3
			setv va00 pose
			addv va00 1
			pose va00
			setv ov01 0
		elif pose eq 3
			setv va50 posl
			setv va51 post
			setv va52 posr
			subv va51 15
			subv va50 20
			subv va52 20
			reps 8
				new: simp 2 15 5815 "poisonfrog" 76 0 rand 100 5000
				attr 195
				bhvr 48
				accg 0
				elas 15
				fric 10
				aero 4
				perm 15
				emit 6 0.1
				setv ov00 0
				setv ov01 0
				setv ov02 50
				setv ov05 0
				setv ov06 rand 0 1
				setv ov10 0
				setv ov11 0
				setv ov14 1
				setv ov15 0.75
				setv ov30 0
				setv ov31 38
				setv ov32 5
				setv ov33 43
				setv ov72 150
				setv ov73 300
				setv ov74 700
				setv ov92 rand 1 110
				setv ov99 20
				seta ov16 null
				setv va53 rand va50 va52
				doif tmvt va53 va51 eq 1
					mvto va53 va51
					tick rand 15 20
				else
					kill targ
					targ ownr
				endi

			repe
			kill ownr

		endi
	retn
endm
scrp 2 15 5815 9
	addv ov01 1
	subv ov02 1
	doif rtyp room targ ne 8
		subv ov99 1
	else
		setv ov99 20
	endi
	doif rtyp room targ ne 8 and rtyp room targ ne 9
		accg 2
	else
		accg 0
	endi
	doif ov02 le 0 or ov99 le 0
		setv ov00 99
	endi
	doif ov00 eq 99
		gsub taddie
	endi
	doif ov02 ge ov74
		setv ov00 0
	endi
	doif ov02 ge 1 and ov02 le ov73
		setv ov00 1
	endi
	doif ov01 ge 400
		inst
		doif ov05 eq 0
			setv ov30 10
			setv ov31 48
			setv ov32 16
			setv ov33 54
			setv ov14 2
			setv ov15 1.5
			setv ov72 100
			setv ov05 1
			setv ov01 0
		elif ov05 eq 1
			setv ov30 31
			setv ov31 69
			setv ov32 24
			setv ov33 61
			setv ov14 3
			setv ov15 2.25
			setv ov72 75
			setv ov05 2
			setv ov01 0
		elif ov05 eq 2
			setv ov00 3
		endi
		slow

	endi
	doif ov00 eq 3
		gsub tadgrow
	endi
	doif ov00 eq 1
		gsub tadfeed
	endi
	doif ov00 eq 0
		gsub tadwander
	endi
	subr direct
		inst
		gsub vect
		gsub anim
		gsub move
		slow
	retn
	subr anim
		doif ov10 ne 0 or ov11 ne 0
			doif ov05 eq 0
				base va30
				anim [2 1 0 1 2 3 4 3]
			elif ov05 eq 1
				base va30
				anim [3 2 1 0 1 2 3 4 5 4]
			elif ov05 ge 2
				doif ov00 eq 1
					base va30
					anim [3 4 5 6 5 4 3 2 1 0 1 2]

				elif ov00 eq 0
					base va30
					anim [4 3 2 1 0 1 2 3 4 5 6 7 6 5]
				endi
			endi
		endi


	retn
	subr vect
		inst
		doif ov00 eq 0
			doif ov10 eq -1
				setv va30 ov32
			elif ov10 eq 1
				setv va30 ov33
			endi
		elif ov00 eq 1
			doif ov10 eq -1
				setv va30 ov30
			elif ov10 eq 1
				setv va30 ov31
			endi
		endi
		slow
	retn
	subr move
		doif ov10 eq -1
			subv velx ov14
		elif ov10 eq 1
			addv velx ov14
		endi
		doif ov11 eq -1
			subv vely ov15
		elif ov11 eq 1
			addv vely ov15
		endi
	retn


	subr tadfeed
		rnge 200
		seta ov16 null
		inst
		esee 2 5 5815
			doif targ ne null
				setv mv17 posx
				setv mv18 posy
				seta mv16 targ
				targ ownr
				setv va02 va02
				setv va03 va03
			endi
		next
		slow
		setv ov17 va02
		setv ov18 va03
		loop
			inst
			doif ov16 ne null
				targ ov16
				setv mv17 posx
				setv mv18 posy
				seta mv16 targ
				targ ownr
			endi
			slow
			doif posx lt ov17
				setv ov10 1
			elif posx gt ov17
				setv ov10 -1
			endi
			doif posy lt ov18
				setv ov11 1
			elif posy gt ov18
				setv ov11 -1
			endi
			gsub direct
		untl touc ownr ov16 eq 1 or ov16 eq null or seee ownr ov16 eq 0
		inst
		doif ov16 ne null and carr eq null and seee ownr ov16 ne 0
			targ ownr
			mesg writ ov16 12
			addv ov02 ov72
		else
			setv ov00 0
		endi
		slow
	retn
	subr tadwander
		addv va12 1
		doif va12 eq 4
			setv va10 rand 1 4
			setv va11 rand 1 4
			setv va12 0
		endi
		doif va10 eq 1 or va10 eq 3
			setv ov10 -1
		elif va10 eq 2 or va10 eq 4
			setv ov10 1
		endi
		doif va11 eq 1 or va11 eq 3
			setv ov11 -1
		elif va11 eq 2 or va11 eq 4
			setv ov11 1
		endi
		gsub direct
	retn
	subr taddie
		doif ov10 lt 1
			setv va06 0
		elif ov10 ge 1
			setv va06 6
		endi
		setv va05 ov05
		addv va06 va05
		setv va00 posx
		setv va01 posy
		setv va02 plne
		addv va02 1
		new: simp 2 10 5815 "poisonfrog" 12 142 va02
		attr 195
		bhvr 48
		elas 10
		fric 20
		accg 1
		perm 15
		aero 0
		pose va06
		setv ov01 0
		doif tmvt va00 va01 eq 1
			mvto va00 va01
		else
			kill targ
			kill ownr
		endi
		tick 60
		kill ownr
	retn
	subr tadgrow
		setv va00 posl
		setv va01 post
		setv va07 ov02
		setv va08 ov06
		addv va02 1
		new: simp 2 16 5815 "poisonfrog" 36 76 rand 100 5000
		attr 195
		bhvr 48
		accg 0
		elas 10
		fric 10
		aero 4
		perm 24
		setv ov00 0
		setv ov01 0
		setv ov02 va07
		setv ov05 0
		setv ov06 va08
		setv ov14 2
		setv ov15 1
		setv ov20 0
		setv ov30 0
		setv ov31 8
		setv ov72 200
		setv ov73 500
		setv ov74 900
		setv ov99 30
		subv va01 24
		doif tmvt va00 va01 eq 1
			mvto va00 va01
		else
			mvsf va00 va01
		endi
		tick rand 20 30
		kill ownr
	retn
endm
scrp 2 16 5815 9
	addv ov01 1
	subv ov02 1
	doif ov02 le 0 or ov99 le 0
		setv ov00 99
	endi
	doif ov00 eq 99
		gsub dead
	endi
	doif ov05 eq 0

		doif rtyp room targ ne 8 and rtyp room targ ne 9
			accg 3
		elif rtyp room targ eq 8 or rtyp room targ eq 9
			accg 0
		endi
	endi
	doif rtyp room targ ne 8
		subv ov99 1
	else
		setv ov99 30
	endi
	doif ov02 gt ov74
		setv ov00 0
	endi
	doif ov02 lt ov73
		setv ov00 1
	endi
	doif ov01 ge 500
		doif ov05 eq 0
			accg 2
			fric 90
			elas 0
			setv ov30 16
			setv ov31 26
			setv ov14 10
			setv ov15 10
			setv ov05 1
			setv ov01 0
		elif ov05 eq 1
			setv ov15 30
			setv ov00 2
		endi

	endi

	doif ov00 eq 0
		gsub wander
	endi
	doif ov00 eq 1
		gsub hunt
	endi
	doif ov00 eq 2
		gsub leavepond
	endi
	subr anim
		doif ov10 le 0
			setv va31 ov30
		elif ov10 gt 0
			setv va31 ov31
		endi
		base va31
		doif ov05 eq 0
			anim [0 1 2 3 4]
		elif ov05 ge 1
			anim [0 1 2 3 4 5 4 3 2 1 0]
			over
		endi
	retn
	subr move
		doif ov11 eq 1
			addv vely ov15
		elif ov11 eq -1
			subv vely ov15
		endi
		doif ov10 eq 1
			addv velx ov14
		elif ov10 eq -1
			subv velx ov14
		endi
	retn
	subr direct
		inst
		gsub move
		gsub anim
		slow
	retn
	subr eat1
		inst
		doif ov10 gt 0
			setv va30 ov31
		elif ov10 le 0
			setv va30 ov30
		endi
		doif ov16 ne null
			mesg writ ov16 12
			base va30
			anim [5 6 7 6 5]
			over
			addv ov02 ov72
			setv ov00 0
		else
			setv ov00 0
		endi
		slow
	retn
	subr eat2
		inst
		doif ov10 gt 0
			setv va30 ov31
		elif ov10 le 0
			setv va30 ov30
		endi
		doif ov16 ne null
			mesg writ ov16 12
			base va30
			anim [6 7 8 9 8 7 6]
			over
			addv ov02 ov72
			setv ov00 0
		else
			setv ov00 0
		endi
		slow
	retn
	subr hunt
		inst
		seta ov16 null
		esee 2 13 0
			doif targ ne null
				setv ov17 posx
				setv ov18 posy
				seta mv16 targ
				targ ownr
				setv va02 va02
				setv va03 va03
			endi
		next
		slow
		setv ov17 va02
		setv ov18 va03
		loop
			inst
			doif ov16 ne null
				targ ov16
				setv mv17 posx
				setv mv18 posy
				seta mv16 targ
				targ ownr
			endi
			slow
			doif posx lt ov17
				setv ov10 1
			elif posx gt ov17
				setv ov10 -1
			endi
			doif posy lt ov18
				setv ov11 1
			elif posy gt ov18
				setv ov11 -1
			endi
			gsub direct
		untl touc ownr ov16 eq 1 or ov16 eq null or seee ownr ov16 eq 0
		inst
		doif ov16 ne null and carr eq null and seee ownr ov16 ne 0
			doif ov05 eq 0
				gsub eat1
			elif ov05 ge 1
				gsub eat2
			endi
		else
			setv ov00 0
		endi
		slow
	retn
	subr wander
		subv va12 1
		doif va12 le 0
			setv va10 rand 1 4
			setv va11 rand 1 4
			setv va12 6
		endi
		doif va10 eq 1 or va10 eq 3
			setv ov10 -1
		elif va10 eq 2 or va10 eq 4
			setv ov10 1
		endi
		doif va11 eq 1 or va11 eq 3
			setv ov11 -1
		elif va11 eq 2 or va11 eq 4
			setv ov11 1
		endi
		gsub direct

	retn
	subr dead

		doif ov10 lt 0
			setv va06 3
		elif ov10 ge 0
			setv va06 9
		endi

		setv va05 ov05
		doif va05 gt 1
			setv va05 1
		endi
		addv va06 va05
		setv va00 posx
		setv va01 posy
		setv va02 plne
		addv va02 1
		new: simp 2 10 5815 "poisonfrog" 12 142 va02
		attr 195
		bhvr 48
		elas 10
		fric 20
		accg 1
		perm 15
		aero 0
		pose va06
		setv ov01 0
		doif tmvt va00 va01 eq 1
			mvto va00 va01
		else
			kill targ
			kill ownr
		endi
		tick 60
		kill ownr
	retn
	subr leavepond
		doif rtyp room targ eq 8 or rtyp room targ eq 9
			setv va98 rand 1 2
			doif va98 eq 1
				setv ov10 -1
			elif va98 eq 2
				setv ov10 1
			endi
			setv va99 1000
			setv ov11 -1
			loop
				subv va99 1
				gsub direct
			untl va99 le 0 or rtyp room targ ne 8 and rtyp room targ ne 9 and rtyp grid targ _up_ ne 1
			doif rtyp room targ ne 8 and rtyp room targ ne 9 and rtyp grid targ _up_ ne 1
				gsub mature
			else
				kill ownr
			endi
		endi
	retn
	subr mature
		setv va00 posl
		setv va01 post
		setv va07 ov02
		setv va08 ov06
		setv va10 ov10
		setv va11 ov11
		new: simp 2 16 5817 "poisonfrog" 26 112 rand 100 5000
		attr 195
		bhvr 48
		accg 3
		elas 1
		fric 99
		aero 4
		perm 85
		setv ov00 0
		setv ov01 0
		setv ov02 va07
		setv ov06 va08
		setv ov10 va10
		setv ov11 va11
		setv ov14 8
		setv ov15 6
		seta ov16 null
		setv ov17 0
		setv ov18 0
		seta ov19 null
		setv ov20 0
		setv ov30 0
		setv ov31 13
		setv ov32 6
		setv ov33 19
		setv ov34 10
		setv ov35 23
		setv ov70 0
		setv ov72 250
		setv ov73 500
		setv ov74 1000
		setv ov99 40
		subv va00 14
		subv va01 14
		doif tmvt va00 va01 eq 1
			mvto va00 va01
		else
			mvsf va00 va01
		endi
		tick rand 10 20
		kill ownr
	retn
endm

scrp 2 16 5817 9
	addv ov01 1
	subv ov02 1
	addv ov20 1
	doif rtyp room targ eq 8 or rtyp room targ eq 9
		subv ov99 1
		gsub hop
	else
		setv ov99 40
	endi


	doif ov02 le 0 or ov01 ge 2000 or ov99 le 0
		setv ov00 99
	endi
	doif ov00 eq 99
		gsub diemature
	endi
	doif ov02 gt ov74
		setv ov00 0
	endi
	doif ov20 ge 300
		setv ov00 2
	endi
	doif ov02 lt ov73
		setv ov00 1
	endi
	doif ov70 eq 1
		doif ov06 eq 1
			setv ov00 3
		elif ov06 eq 0
			setv ov70 0
		endi
	endi
	doif ov00 eq 1
		gsub choosemature
	endi
	doif ov00 eq 3
		gsub layeggs
	endi
	doif ov00 eq 0
		gsub hop
	endi
	doif ov00 eq 2
		gsub mate
	endi
	subr movem
		doif ov10 lt 0
			setv va30 ov30
		elif ov10 gt 0
			setv va30 ov31
		endi
		setv va10 ov10
		setv va11 ov11
		mulv va10 ov14
		mulv va11 ov15
		base va30
		velo va10 va11

		anim [0 1 2 3 4 5 4 3 2 1 0]
		over
	retn
	subr hop
		setv va20 rand 1 4

		doif va20 eq 1 or va20 eq 3
			gsub hopleft
		elif va20 eq 2 or va20 eq 4
			gsub hopright
		endi

	retn
	subr hopleft
		doif wall eq down
			setv va21 rand 1 4
			doif va21 eq 1
				setv ov10 -1
				setv ov11 -1
			elif va21 eq 2
				setv ov10 -2
				setv ov11 -2
			elif va21 eq 3
				setv ov10 -3
				setv ov11 -3
			elif va21 eq 4
				setv ov10 -4
				setv ov11 -4
			endi
			gsub movem
		endi
	retn
	subr hopright
		doif wall eq down
			setv va21 rand 1 4
			doif va21 eq 1
				setv ov10 1
				setv ov11 -1
			elif va21 eq 2
				setv ov10 2
				setv ov11 -2
			elif va21 eq 3
				setv ov10 3
				setv ov11 -3
			elif va21 eq 4
				setv ov10 4
				setv ov11 -4
			endi
			gsub movem
		endi
	retn
	subr matureeat
		inst

		doif ov10 lt 0
			setv va16 ov32
		elif ov10 ge 0
			setv va16 ov33
		endi
		doif ov16 ne null
			mesg writ ov16 12
			addv ov02 ov72
		endi
		base va16
		anim [0 1 2 3 2 1 0]
		over
		snde "gulp"
		slow
	retn
	subr choosemature
		setv va40 0
		setv va41 0
		setv va42 0
		setv va52 0
		rnge 600
		esee 2 16 6
			addv va40 1
		next
		targ ownr
		rnge 600
		esee 2 15 8
			addv va41 1
		next
		targ ownr
		rnge 600
		esee 2 14 0
			addv va42 1
		next
		targ ownr
		doif va40 ge 1
			setv va52 0
		elif va40 lt 1 and va41 ge 1
			setv va52 1
		elif va40 lt 1 and va41 lt 1 and va42 ge 1
			setv va52 2
		endi
		doif va52 eq 0
			setv va48 16
			setv va49 6
		elif va52 eq 1
			setv va48 15
			setv va49 8
		elif va52 eq 2
			setv va48 14
			setv va49 0
		endi
		gsub feedmature
	retn
	subr feedmature
		inst
		rnge 500
		seta ov16 null
		esee 2 va48 va49
			doif targ ne null and va48 ne 0
				setv mv17 posx
				setv mv18 posy
				seta mv16 targ
				targ ownr
				setv va02 va02
				setv va03 va03
			endi
		next
		slow
		setv ov17 va02
		setv ov18 va03
		loop
			inst
			doif ov16 ne null
				targ ov16
				setv mv17 posx
				setv mv18 posy
				seta mv16 targ
				targ ownr
			endi
			slow
			doif posx lt ov17
				gsub hopright
			elif posx gt ov17
				gsub hopleft
			endi
		untl touc ownr ov16 eq 1 or ov16 eq null or seee ownr ov16 eq 0
		inst
		doif ov16 ne null and carr eq null and seee ownr ov16 ne 0
			targ ownr
			gsub matureeat

		else
			setv ov00 0
			gsub hop
		endi
		slow
	retn
	subr mate
		inst
		rnge 1000
		seta ov19 null
		esee 2 16 5817
			doif targ ne null and targ ne ownr
				setv mv17 posx
				setv mv18 posy
				seta mv19 targ
				targ ownr
				setv va02 va02
				setv va03 va03

			endi
		next
		slow
		setv ov17 va02
		setv ov18 va03

		loop
			inst
			doif ov19 ne null
				targ ov19
				setv va06 ov06
				setv va20 ov20

				setv mv17 posx
				setv mv18 posy
				seta mv19 targ
				targ ownr
				setv va06 va06
				setv va20 va20
			endi
			slow
			doif ov06 eq 0
				gsub ribbit
			elif ov06 eq 1
				gsub findmate
			endi
		untl touc ownr ov19 eq 1 or ov19 eq null or seee ownr ov19 eq 0 or va06 eq ov06 or va20 lt 200
		inst
		doif ov19 ne null and carr eq null and seee ownr ov19 ne 0 and va06 ne ov06 and va20 ge 200
			targ ov19
			setv ov70 1
			setv ov20 0
			setv ov00 0
			targ ownr
			setv ov70 1
			setv ov20 0
			setv ov00 0
		else
			setv ov00 0
			gsub hop
		endi
		slow
	retn
	subr ribbit
		doif posx lt ov17
			setv va19 ov34
		elif posx gt ov17
			setv va19 ov35
		endi
		addv va22 1
		doif va22 eq 4
			base va19
			anim [0 1 2 1 0]
			snde "bull"
			setv va22 0
		endi
	retn
	subr findmate
		doif posx lt ov17
			gsub hopright
		elif posx gt ov17
			gsub hopleft
		endi
	retn
	subr layeggs
		doif rtyp room targ ne -1
			doif prop room targ 5 gt 0
				setv va99 0
				loop
					addv va99 1
					setv va60 prop grid ownr left 5
					setv va61 prop grid ownr rght 5
					setv va62 prop grid ownr _up_ 5
					setv va63 prop grid ownr down 5
					doif va60 gt va61
						setv va10 1

					elif va60 lt va61
						setv va10 2
					endi
					doif va10 eq 1
						gsub hopleft
					elif va10 eq 2
						gsub hopright
					endi
					setv va50 posx
					setv va51 posy
					addv va51 rand 25 200
				untl grap va50 va51 eq 8 or va62 lt va63 or rtyp room targ eq 8 or va99 ge 1000
				inst
				doif grap va50 va51 eq 8 or va62 lt va63 or rtyp room targ eq 8
					subv ov02 50
					setv va50 posx
					setv va51 posy
					new: simp 2 18 5815 "poisonfrog" 4 154 rand 100 5000
					attr 195
					bhvr 48
					elas 0
					fric 50
					perm 5
					accg 2
					aero 1
					setv ov01 0
					setv ov02 150
					doif tmvt va50 va51 eq 1
						mvto va50 va51
					elif tmvt va50 va51 ne 1
						mvsf va50 va51
					endi
					tick rand 75 200
					targ ownr
					setv ov70 0
					setv ov00 0


				endi
				slow

			endi
		endi
		setv ov00 0
		gsub hop
	retn
	subr diemature
		doif ov10 lt 0
			setv va06 5
		elif ov10 ge 0
			setv va06 11
		endi
		setv va00 posx
		setv va01 posy
		setv va02 plne
		addv va02 1
		new: simp 2 10 5815 "poisonfrog" 12 142 va02
		attr 195
		bhvr 48
		elas 10
		fric 20
		accg 2
		perm 15
		aero 0
		pose va06
		setv ov01 0
		doif tmvt va00 va01 eq 1
			mvto va00 va01
			tick 60
		else
			kill targ
			kill ownr
		endi

		kill ownr
	retn
endm
scrp 2 10 5815 9
	addv ov01 1
	doif ov01 eq 20
		doif rtyp room targ ne -1 and carr eq null
			doif pose eq 0 or pose eq 1
				altr room targ 3 0.01
				altr room targ 4 0.007
				kill ownr
			elif pose eq 2 or pose eq 3
				altr room targ 3 0.02
				altr room targ 4 0.01
				kill ownr
			elif pose eq 4 or pose eq 5
				altr room targ 3 0.05
				altr room targ 4 0.02
				kill ownr
			elif pose eq 6 or pose eq 7
				altr room targ 3 0.075
				altr room targ 4 0.03
				kill ownr
			elif pose eq 8 or pose eq 9
				altr room targ 3 0.1
				altr room targ 4 0.045
				kill ownr
			elif pose eq 10 or pose eq 11
				altr room targ 3 0.2
				altr room targ 4 0.1
				kill ownr
			endi

		else
			kill ownr
		endi
	endi
endm
scrp 2 10 5815 12
	stim writ from 81 1
	targ from
	chem 12 0.2
	kill ownr
endm
scrp 2 18 5815 12
	stim writ from 80 1
	targ from
	chem 12 0.3
	chem 33 0.2
	kill ownr
endm
scrp 2 15 5815 12
	stim writ from 80 1
	targ from
	chem 33 0.2
	chem 12 0.4
	kill ownr
endm
scrp 2 16 5815 12
	stim writ from 80 0.5
	targ from
	chem 68 0.1
	chem 69 0.2
	chem 130 0.1
	kill ownr
endm
scrp 2 16 5817 12
	stim writ from 80 1
	targ from
	chem 68 0.2
	chem 69 0.4
	chem 130 0.2
	kill ownr
endm
scrp 2 15 5815 6
	doif wall eq left
		setv ov10 1
	endi
	doif wall eq rght
		setv ov10 -1
	endi
	doif wall eq _up_
		setv ov11 1
	endi
	doif wall eq down
		setv ov11 -1
	endi
endm
scrp 2 16 5817 6
	doif wall eq left
		setv ov10 1
	endi
	doif wall eq rght
		setv ov10 -1
	endi
endm
rscr
enum 2 18 5815
	kill targ
next
enum 2 15 5815
	kill targ
next
enum 2 16 5815
	kill targ
next
enum 2 16 5817
	kill targ
next
enum 2 10 5815
	kill targ
next
scrx 2 10 5815 9
scrx 2 10 5815 12
scrx 2 15 5815 6
scrx 2 15 5815 9
scrx 2 15 5815 12
scrx 2 16 5815 9
scrx 2 16 5815 12
scrx 2 16 5817 6
scrx 2 16 5817 9
scrx 2 16 5817 12
scrx 2 18 5815 9
scrx 2 18 5815 12