Untitled

 avatar
unknown
plain_text
a year ago
2.0 kB
6
Indexable
on fish:
	if fish state = reel in or in ground or caught fish or caught entity or failed attempt:
		if {legendaryfish::%uuid of player%} isn't true:
			clear {fishing::%uuid of player%}
	clear {ring::%uuid of player%}
	#broadcast fish state
	#if fish state = reel in or in ground:
	delete {fh::%player's name%}
	#send "cleared."
	#fish state != reel in
	fish state = fishing
	#broadcast fish hook
	set {_b} to 0
	set {_p} to fishing hook
	set {_count} to 0
	set {fh::%player's name%} to fishing hook
	clear {loopingFH::%player's name%}
	wait 1 tick
	set {loopingFH::%player's name%} to true
	while {fh::%player's name%} is set:
		
		add 1 to {_count}
		if fishing hook doesn't exist:
			stop
			#broadcast "YAY"
		if block at fishing hook = water[] or seagrass or tall seagrass:
			stop loop
		if {loopingFH::%player's name%} isn't set:
			stop loop
			#try with a count variable
		#chance of 0.5%:
			#stop loop
		if {_count} = 150:
			#broadcast fish hook
			stop loop
		wait 1 tick
		#broadcast "waiting %{_count}%"
	
	loop 101 times:
		#broadcast "a"
		if {fh::%player's name%} isn't set:
			set {depth::%uuid of player%} to 0
			#broadcast "reset"
		if block at block {_b} below fishing hook = water[] or seagrass or tall seagrass:
			add 1 to {depth::%uuid of player%}
		
		else:
			stop loop
		
		add 1 to {_b}

	#if {fishing::%uuid of player%} is set:
		
	#while block at fishing hook = water[]:
		#add 1 to {_b}
		#if block at block {_b} below fishing hook = water[] or seagrass or tall seagrass:
			#add 1 to {_depth}
		#else:
			#set {depth::%uuid of player%} to {_depth}
			#stop trigger
		#wait 1 tick
	#set {_e} to fishing hook
	#set {_b} to block 0 below {_e}
	#while block at block {_b} below {_e} = water[] or seagrass or tall seagrass:
		#add 1 to {_count}
		#broadcast "checking..."
		#add 1 to {_b}
		#add 1 to {depth::%uuid of player%}
		#stop loop if {_count} >= 150
		#stop trigger if {_count} >= 150
		#wait 1 tick
Editor is loading...
Leave a Comment