Jump to content

help with skript pls


Jessica907432

Recommended Posts

As you can see when i reload skript it says this and makes it so all things shoot fireballs when i just want the nether star to how do i fix? skript is: 

On right click:
    if player's held item is Nether Star named "&f&lPower Of The &4&LNether":
    shoot a Fireball from player at speed 1

image.png.80e704a3b4d779c5064d36f7a562048c.png

Edit:if you know how to make it have a 5second cooldown pls tell me

Edited by Jessica907432
Link to comment
Share on other sites

Here you go

 

on right click:
	if player's held item is Nether Star named "&f&lPower Of The &4&LNether":
		if {fireballcd} is true:
			send "&cOn cooldown!"
		else:
			shoot a Fireball from player at speed 1
			set {fireballcd} to true
			wait 5 seconds
			set {fireballcd} to false

 

Edited by Dieeeeeeeeeeeeee
  • Like 1
Link to comment
Share on other sites

39 minutes ago, Dieeeeeeeeeeeeee said:

Here you go

 


on right click:
	if player's held item is Nether Star named "&f&lPower Of The &4&LNether":
		if {fireballcd} is true:
			send "&cOn cooldown!"
		else:
			shoot a Fireball from player at speed 1
			set {fireballcd} to true
			wait 5 seconds
			set {fireballcd} to false

 

tysm

Link to comment
Share on other sites

53 minutes ago, Dieeeeeeeeeeeeee said:

Here you go

 


on right click:
	if player's held item is Nether Star named "&f&lPower Of The &4&LNether":
		if {fireballcd} is true:
			send "&cOn cooldown!"
		else:
			shoot a Fireball from player at speed 1
			set {fireballcd} to true
			wait 5 seconds
			set {fireballcd} to false

 

That would work however that is a global variable so the cooldown would count for all players trying to use it. And since you are using wait 5 seconds to then remove the variable, if the server ever stops in that 5 seconds, the variable will never be set to false so the cooldown will break. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

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...