Jump to content

Item Telekinesis


Recommended Posts

on mine:
	cancel event
	set event-block to air
	if event-block is iron ore
	give iron ingot to player
	elif event-block is iron ore
	give gold ingot to player
	else give event-block to player

Hello i have tried to modify a basic telekinesis script but it has not worked. I am not used to skript as I normally do regular coding but it is saying that it cannot compare it to and item type

image.png.8f8edf50568415c7a503a3093589c294.png

Please does anyone know how to fix this or have a script that would auto-smelt ores

Link to comment
Share on other sites

20 hours ago, GalaxtaGaming said:
on mine:
	cancel event
	set event-block to air
	if event-block is iron ore
	give iron ingot to player
	elif event-block is iron ore
	give gold ingot to player
	else give event-block to player

Hello i have tried to modify a basic telekinesis script but it has not worked. I am not used to skript as I normally do regular coding but it is saying that it cannot compare it to and item type

image.png.8f8edf50568415c7a503a3093589c294.png

Please does anyone know how to fix this or have a script that would auto-smelt ores

its not indented properly

on mine:
	cancel event
	set event-block to air
	if event-block is iron ore:
		give iron ingot to player
	else if event-block is gold ore:
		give gold ingot to player
	else:
		give event-block to player

 

Edited by AgentGamerPro

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

Link to comment
Share on other sites

# line 6 and line 7
	else if event-block is gold ore:
		give gold ingot to player

You typed 'iron ore' again into the second 'if' statement earlier, so I just set it to gold ore

Main MC account: Gam3rBoi (VIP in MH)

Alt MC account: *Gam3rBoi2147

Farcade server owner

Skripter with 6+ months experience + time learning coding concepts

Message me through the forums if you need anything!

Link to comment
Share on other sites

Use CrazyEnchantments. It's a plugin that has Telekinesis built-in.

— OMBS —

Hello. I am ombs, a chill server developer and FPS enthusiast.

Currently working on a server with a queue-style arena PVP.

Battle500 is my completed server. 
 

Have a great day!

 

Link to comment
Share on other sites

I have now adapted the script to try and add a way to change fortune but again have seemed to run into indentation errors could someone please help

on mine:
	cancel event
	set event-block to air
	if event-block is iron ore:
		if player's held item is enchanted with fortune
			give player (2 * (level of fortune of player's tool)) of iron ingot
		else:
			give player iron ingot	
	else if event-block is gold ore:
		if player's held item is enchanted with fortune
			give player (2 * (level of fortune of player's tool)) of gold ingot
		else:
		  give player iron ingot
	else:
		if player's held item is enchanted with fortune
			give player (2 * (level of fortune of player's tool)) of event-block
		else:
			give player event-block

 

On 1/6/2022 at 1:08 PM, AgentGamerPro said:

its not indented properly

on mine:
	cancel event
	set event-block to air
	if event-block is iron ore:
		give iron ingot to player
	else if event-block is gold ore:
		give gold ingot to player
	else:
		give event-block to player

 

thank you for fixing my initial script it worked very well

Link to comment
Share on other sites

On 1/7/2022 at 11:33 PM, GalaxtaGaming said:

I have now adapted the script to try and add a way to change fortune but again have seemed to run into indentation errors could someone please help

on mine:
	cancel event
	set event-block to air
	if event-block is iron ore:
		if player's held item is enchanted with fortune
			give player (2 * (level of fortune of player's tool)) of iron ingot
		else:
			give player iron ingot	
	else if event-block is gold ore:
		if player's held item is enchanted with fortune
			give player (2 * (level of fortune of player's tool)) of gold ingot
		else:
		  give player iron ingot
	else:
		if player's held item is enchanted with fortune
			give player (2 * (level of fortune of player's tool)) of event-block
		else:
			give player event-block

 

thank you for fixing my initial script it worked very well

What are the errors?

Main MC account: Gam3rBoi (VIP in MH)

Alt MC account: *Gam3rBoi2147

Farcade server owner

Skripter with 6+ months experience + time learning coding concepts

Message me through the forums if you need anything!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...