#how would i make this work

1 messages · Page 1 of 1 (latest)

onyx zealot
#

if had a name for the swordhow would i put it in skript

solemn crane
#

Just check in the event

onyx zealot
#

wdym

#

check the event

solemn crane
#

Like inside of the event

#

Just do a basic on right click with diamond sword

onyx zealot
#

hm il try

solemn crane
#

And check the name

#

Later

onyx zealot
solemn crane
#

Send code

onyx zealot
#

it summons a arrow when i do the command

#

/mastersword

#

but when i right click

#

nothing

solemn crane
#

Right click is an event

#

Why is it in the command

onyx zealot
#

wdym

solemn crane
#

!indent

glad spokeBOT
#

Indentation in Skript

In skript, you need to maintain consistent indentation, meaning you cannot indent 1 line 5 spaces, and the next 7 spaces. Usually it’s recommended you use tabs, however.

A good rule of thumb is to always indent the subsequent line whenever the previous statement ends with a :, an exception to this is in command statements with items before the trigger such as permission: or aliases:

With conditional statements and loops, any code that is indented within the statement will be run as a part of the statement, other code will not be run within the statement. Here is an example of proper indentation:

solemn crane
#

Its a part of the command

onyx zealot
#

so what should i do?

#

indent

#

?

#

2 spaces right

solemn crane
#

Indent correctly

#

Events should have 0 spaces infront

onyx zealot
#

its spelt correctly

solemn crane
#

What did you do

#

Also send your code like this

#

!format

glad spokeBOT
#

Code Blocks

To make it easier for others to read your code, it is asked that you send it in a code block. On Discord, you can simply send this:

```
Code here
```

onyx zealot
#
command /mastersword:
  permission:op
  trigger:
    give player 1 diamond sword named "&b&lMaster &1&lSword" with lore "&b&lOnly the worthy may wield this anchient weapon"
    
  if player's health is 10:
    on right click holding a diamond sword
    shoot arrow at speed 1
solemn crane
#

What

onyx zealot
#

it says

solemn crane
#

Why

#

Why did you do that

onyx zealot
#

if player's health is 10: is spelt wrong

#

wdym why did i do what

solemn crane
onyx zealot
#

so indent

solemn crane
#

Yes

#

But

#

Events

#

Like on right click

#

Shouldnt have any spaces infront

#

They also need :

onyx zealot
#

are you able to show me what it should look like

#

im kinda bad tat skripting

#

at*

solemn crane
#

I can see that

#

!skript

onyx zealot
#

lol

glad spokeBOT
#

Skript

If you're interested in learning Skript or simply want to use it on your server, watch the following playlist below to learn how!

📎 YouTube Tutorial
minehut Community FAQ

onyx zealot
#

so no indent for the event?

#

alright

#

it said expected 4 spaces so thats what im puting

#

putting*

solemn crane
#

4 spaces

#

Puts it in the rrigger

#

Because it think you want it to be a part of the command

onyx zealot
#

oh

#

so 4spaces for if players health is 10

solemn crane
#

But like

onyx zealot
#

ok now it says it cant understand

solemn crane
#

You arent doing anything with that part

#

Its useless rn

onyx zealot
#

i cna see it does nothing in game

#

its literally just a renamed sword with loer

solemn crane
onyx zealot
#

so what should the 2cd part look like

solemn crane
#

Idk what you want to do

onyx zealot
#

i want it to shoot a arrow at speed 1 on right click

solemn crane
#

So do that

onyx zealot
#

it said it doesnt know the code so im doing something wrong

solemn crane
#

what did you do

onyx zealot
#
    if player's health is 10:
    on right click if player is holding a diamond sword
    shoot arrow at speed 1
#

and he gave up

solemn crane
#

...

#

What have i told you

#

Like 4 times now

#

events get 0 indents since they work at the most basic level

#

if signifies a condition

#

So it goes

#
  condition:
    effect```
dreamy matrix
#

You spelled ancient wrong in the original line of skript

onyx zealot
#

idc

dreamy matrix
#

💀

dreamy matrix
# onyx zealot

on right click with diamond sword: player's health is equal to 10 make the player shoot an arrow at speed 4

#

that should work, (I am a minimalist)

onyx zealot
#

i know i fixed it

dreamy matrix
#

mk

#

but make sure to put things like "player's health is equal to" after the event