Jump to content
  • 0

I need help with some skript


Jessica907432

Question

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

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
13 hours ago, Jessica907432 said:

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

You have to indent it like this:

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

 

Always keep in mind:

event:
    if something:
        #do something
    else:
        #do something

Make sure all the indentations are equal.

Hello there! If you're reading this, hope you're having a wonderful day!

 

Feel free to contact me via Discord (CoolProgrammer#1920) for any help.

My DMs are always open for help.

You can also message via. forum messages for help.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

Also, don't hesitate to leave a like on my post if I helped you in any way.

Link to comment
Share on other sites

  • 0
4 hours ago, CoolProgrammer said:

You have to indent it like this:


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

 

Always keep in mind:


event:
    if something:
        #do something
    else:
        #do something

Make sure all the indentations are equal.

thank you so much!

Link to comment
Share on other sites

  • 0
1 hour ago, Jessica907432 said:

thank you so much!

No problem, enjoy.

 

18 hours ago, Jessica907432 said:

if anyone knows how ot make it have 2second cooldown please tell me

Here is how you do a 2 seconds cooldown:

right click:
    # to check if it's the right tool
    stop if tool != nether star named "&f&lPower Of The &4&LNether"
    # calculate the difference between when the player last shooted a fireball, and now.
    set {_c} to difference between {cd::%player's uuid%} and now
    # checking if the difference is less than 2 seconds
    {_c} < 2 seconds:
        # if it is, then show them a cooldown message, and cancel the event, and prevent it from advancing (stop)
        send "You are on cooldown"
        cancel event
        stop
    # shoot the fireball
    shoot a Fireball from player at speed 1
    # set the cooldown to now
    set {cd::%player's uuid%} to now

Read the comments if you do not understand how it works.

Hello there! If you're reading this, hope you're having a wonderful day!

 

Feel free to contact me via Discord (CoolProgrammer#1920) for any help.

My DMs are always open for help.

You can also message via. forum messages for help.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

Also, don't hesitate to leave a like on my post if I helped you in any way.

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