#how do i make my sword dash

1 messages ยท Page 1 of 1 (latest)

zenith mica
#

please someone help me
my brain is hurting
im trying to make it so if i right click a sword
it sends me 5 blocks forward sort of like a dash
this is the code but its being weird
`on right click:
item is {bsword}:
multiply {direction} by 5
add {direction} to {loc}
teleport player to {loc}

on load:
set {loc} to location of player
set {direction} to direction of player`

tranquil chasm
#

why not just push player forward at speed 5 or a lower value? Would that work?

#

and plus, on load works when the skript is reloaded or when the server restarts, so when the skript reloads, it sets the location to the players pos when it reloads, so if you were to move from that location and right click with said sword, it will teleport you 5 blocks from that direction or wtv

zenith mica
#

i dont think that that would work

#

ill try it

#

ty

#

it worked

#

bu t how do i make it on a cooldown

tranquil chasm
#

hmm let me try something rq

#
command /test:
    trigger:
        if {cooldown::%player%} is false:
            push player forward at speed 5
            set {cooldown::%player%} to true
            wait 5 seconds
            set {cooldown::%player%} to false
        else:
            send "&cYou are on cooldown for 5 seconds!"
            set {cooldown::%player%} to true
#

This works

#

make a temp variable and while its true the sword does nothing, but when it is false it works

#

make sure to have like

#
on join:
   set {thingy::%uuid of player%} to false
#

so that it does work

zenith mica
#

it only says cooldown

#

it doesnt let me dash

tranquil chasm
zenith mica
#

no

#

`on right click:
if item is {bsword}:
if {cooldown::%player%} is false:
push player forward at speed 5
set {cooldown::%player%} to true
wait 5 seconds
set {cooldown::%player%} to false
else:
send "&cYou are on cooldown for 5 seconds!"
set {cooldown::%player%} to true

on join:
if {thingy::%uuid of player%} is not set:
set {thingy::%uuid of player%} to false`

#

?

#

{bsword} = set {bsword} to unbreakable golden sword of sharpness 4 with custom model data 1 named "&c&lbean sword" with lore "&lForged in the heart of a bean,", "&lstronger than anything you've seen", "&4&l+10โš”"

tranquil chasm
#

remove the if {thingy::%uuid of player%} is not set: line

zenith mica
#

ok

#

the whole string

tranquil chasm
#

mhm

#

so it should look like this hol up

zenith mica
#

on join: set {thingy::%uuid of player%} to false like this or the whole code should be gone

tranquil chasm
#

like that

#
on right click:
    if item is {bsword}:
        if {cooldown::%player%} is false:
            push player forward at speed 5
            set {cooldown::%player%} to true
            wait 5 seconds
            set {cooldown::%player%} to false
        else:
            send "&cYou are on cooldown for 5 seconds!"
            set {cooldown::%player%} to true

on join:
    set {thingy::%uuid of player%} to false
zenith mica
#

oh alr

#

and i rejoin with this?

tranquil chasm
#

mhm

#

please

#

make sure

#

for the

#

love of god

#

that

#

thingy

#

is not called thingy

#

its called cooldown

#

with player

#

๐Ÿ™

zenith mica
tranquil chasm
#

to player

#

add that at the end

zenith mica
#

?

#

oh

#

to playr

#

oh

#

so send "blahblah" to player?

#

send "&cYou are on cooldown for 5 seconds!" to player

tranquil chasm
#

mhm

zenith mica
#

it still always says im on cooldown

#

idk

tranquil chasm
#

๐Ÿ˜”

#

Hol up

#

Just give me a few

#

Not at my pc

zenith mica
#

ok ty btw

tranquil chasm
#

Mhm

zenith mica
#

@tranquil chasm

#

I FIXED it

tranquil chasm
#

Good job ๐Ÿ‘

zenith mica
#

on right click: item is {bsword}: if {cooldown::%player%} = true: push player forward at speed 2 set {cooldown::%player%} to false wait 10 seconds set {cooldown::%player%} to true else: send "&cYou are on cooldown for 5 seconds!" to player

#

yayyy

tranquil chasm
#

Does it have the cool down?

zenith mica
#

it says 10 sec i need to make it 5

#

yeah

tranquil chasm
#

Alright

zenith mica
#

wait

#

one thing

#

@tranquil chasm

#

is it possible to make it so i can do something like "You are on a cooldown for %seconds%"

#

like however many seconds left of cooldown there is?

tranquil chasm
#

Like uhh

#

Try

#

Not at PC ๐Ÿ˜ญ

#

I'm not typing it on phone

#

But uhh

#

So like

#

Loop 10 times

#

And change the value from true/false to 10 or whatever

#

And every time it loops

#

Subtract one

#

I can get you an example when I get home

zenith mica
#

but

#

is it possible to adjust sword base damage

tranquil chasm
#

That's hard too lmao

zenith mica
tranquil chasm
#

Not really

zenith mica
#

jk

tranquil chasm
zenith mica
#

thank you

tranquil chasm
#

Mhm

zenith mica
#

@tranquil chasm

tranquil chasm
#

Yes?

zenith mica
#

how do i adjust sword base damage

#

@tranquil chasm