Skript Help - I really need it!

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ItzMaxTV

Member
Apr 25, 2020
17
0
0
23
Hey there!

I need help with something and it's a bit complicated for me, I really can't think straight when I do it..

I want a skript that the flint and steel given to you has 1 durability and looks like it will break but when you kill a player it charges to be placed only once then if you used it, it will say you need to get a kill to charge the flint and steel..

Sorry for my english :emoji_frowning:

My current skript is :


Code:
options:
    items-unbreakable: flint and steel


on right click with flint and steel:
    if clicked block is set:
        set {_waited} to difference between {flint.%player%.lastused} and now
        if {_waited} is less than 5 seconds:
            cancel event
            message "&eYou have to wait &a%difference between 5 seconds and {_waited}%"
            stop
        else:
            set {flint.%player%.lastused} to now

on place:
    if event-block is fire:
        if player's gamemode is not creative:
            wait 2 seconds
            set event-block to air

on item damage:
    cancel event
 
To understand it a bit more, the flint and steel just has to look like it's going to break, but it actually is unbreakable, correct?
 
And what about the issue with air triggering the flint and steel, is that still an issue?
 
What is this part for? You are already handeling the placement of the fire in the code above?

Code:
on place:
    if event-block is fire:
        if player's gamemode is not creative:
            wait 2 seconds
            set event-block to air
 
test out if this fixes the air issue
Code:
options:
    items-unbreakable: flint and steel
    blocks-fix: air, lava or water, #ect..
 
 
on right click with flint and steel:
    if clicked block is not {@blocks-fix}:
        set {_waited} to difference between {flint.%player%.lastused} and now
        if {_waited} is less than 5 seconds:
            cancel event
            message "&eYou have to wait &a%difference between 5 seconds and {_waited}%"
            stop
        else:
            set {flint.%player%.lastused} to now
 
on place:
    if clicked block is not {@blocks-fix}:
        if event-block is fire:
            if player's gamemode is not creative:
                wait 2 seconds
                set event-block to air
 
on item damage:
    cancel event
 
test out if this fixes the air issue
Code:
options:
    items-unbreakable: flint and steel
    blocks-fix: air, lava or water, #ect..
 
 
on right click with flint and steel:
    if clicked block is not {@blocks-fix}:
        set {_waited} to difference between {flint.%player%.lastused} and now
        if {_waited} is less than 5 seconds:
            cancel event
            message "&eYou have to wait &a%difference between 5 seconds and {_waited}%"
            stop
        else:
            set {flint.%player%.lastused} to now
 
on place:
    if clicked block is not {@blocks-fix}:
        if event-block is fire:
            if player's gamemode is not creative:
                wait 2 seconds
                set event-block to air
 
on item damage:
    cancel event


Still an issue :emoji_frowning:

Code:
[18:52:16 ERROR]: The expression 'clicked block' may only be used in a click event (FASL.sk, line 17: if clicked block is not {@blocks-fix}:')
 
Code:
options:
    items-unbreakable: flint and steel
    blocks-fix: air, lava or water, #ect..
 
 
on right click with flint and steel:
    if clicked block is not {@blocks-fix}:
        set {_waited} to difference between {flint.%player%.lastused} and now
        if {_waited} is less than 5 seconds:
            cancel event
            message "&eYou have to wait &a%difference between 5 seconds and {_waited}%"
            stop
        else:
            set {flint.%player%.lastused} to now
 
on place:
    if event-block is not {@blocks-fix}:
        if event-block is fire:
            if player's gamemode is not creative:
                wait 2 seconds
                set event-block to air
 
on item damage:
    cancel event

try this
 
Code:
options:
    items-unbreakable: flint and steel
    blocks-fix: air, lava or water, #ect..
 
 
on right click with flint and steel:
    if clicked block is not {@blocks-fix}:
        set {_waited} to difference between {flint.%player%.lastused} and now
        if {_waited} is less than 5 seconds:
            cancel event
            message "&eYou have to wait &a%difference between 5 seconds and {_waited}%"
            stop
        else:
            set {flint.%player%.lastused} to now
 
on place:
    if event-block is not {@blocks-fix}:
        if event-block is fire:
            if player's gamemode is not creative:
                wait 2 seconds
                set event-block to air
 
on item damage:
    cancel event

try this


Nothing fixed, same error..
[doublepost=1589327477,1589327447][/doublepost]Could anyone possibly help?


Code:
Line 7: Invalid brackets/variables/text in 'air, lava or water,' (script.sk, line 7: if clicked block is not {@blocks-fix}:')

Line 17: Invalid brackets/variables/text in 'air, lava or water,' (script.sk, line 17: if event-block is not {@blocks-fix}:')
 
Status
Not open for further replies.