#i got 1 fail and one error in my script

1 messages · Page 1 of 1 (latest)

shrewd spire
#
options:
    prefix: &f&l[&4&lTrendus&f&l] »
    permission: staff.bc 

variables:
    {message1} = "{@prefix} Remember to use /Trendus Discord to join our awesome discord server!"
    {message2} = "{@prefix} Check out our website by using the following command /Trendus Website"
    {message3} = "{@prefix} Check out all the different gamemodes by using /Trendus Gamemodes"
    {game.bedwars} = true
    {game.PVP} = true
    {game.survival} = true
    {game.flatsurvival} = true
    {game.powershells} = true
    {game.dungeons} = true
    {game.boxfighter} = true

every 5 seconds:
    broadcast {message1}, {message2} or {message3}

-- this prints the image shown it should print a other thing

            else if arg-2 is not set:
                message {@prefix} [
                if {game.bedwars} is true:
                    message "Bedwars: Open"
                else if {game.bedwars} is false:
                    message "Bedwars: Closed"
                if {game.PVP} is true:
                    message "PVP: Open"
                else if {game.PVP} is false:
                    message "PVP: Close"
                if {game.survival} is true:
                    message "Survival: Open"
                else if {game.survival} is false:
                    message "Survival: Closed"
                if {game.flatsurvival} is true:
                    message "FlatSurvival: Open"
                else if {game.flatsurvival} is false:
                    message "FlatSurvival: Closed"
                if {game.powershells} is true:
                    message "PowerShell: Open"
                else if {game.powershells} is false:
                    message "PowerShell: Closed"
                if {game.dungeons} is true:
                    message "Dungeons: Open"
                else if {game.dungeons} is false:
                    message "Dungeons: Closed"
                if {game.boxfight} is true:
                    message "BoxFight: Open"
                else if {game.boxfight} is false:
                    message "BoxFight: Closed"
                ]

-- this is the error
oblique merlin
#

%{prefix}% I think

shrewd spire
#

ok

#

no

#

pe

oblique merlin
#

oop

#

the @

#

you should do %{@prefix}%

shrewd spire
#

that didnt work either

#

it prints %{@prefix}%

oblique merlin
#

can you try %[@prefix]%

shrewd spire
#

sure

digital schooner
#

No..

oblique merlin
#

I am confusing

digital schooner
#

message/send ""

#

It needs to be in quotes

shrewd spire
#

oh

#

k

#

so

#

instead of broadcast

digital schooner
#

And options ex.: {@option} don't need %%

shrewd spire
#

just use send allplayers

#

like something like this

#

or just send?

digital schooner
#

to all players

oblique merlin
#

bro boutta flood the chat

shrewd spire
#

nah

#

i aint

digital schooner
#

5 seconds it most likely for testing

oblique merlin
#

fair

shrewd spire
digital schooner
#

Okay, I guess you can't use options inside the variables section

#

Use 3 sends

send (join {@prefix} and {messageVar}) by " "
shrewd spire
#

join?

#

wait

#

whats messageVar

#

message var is message1

#

right?

digital schooner
#

3 different sends

#

not 1

shrewd spire
#

ehh

#

how

#

ohh

#

but

#

i want it to send random msg

digital schooner
#

then use a list

#

not 3 different variables

#

Also, you could use on load instead of the variables sections so you're able to use the prefix

shrewd spire
#

heh

#

wait

#

how

#

bro

#

u confuse me

digital schooner
#

Use your brain please

shrewd spire
#

i am

#

..

#

im just not a scripter

#

...

digital schooner
#

Then get one?

shrewd spire
#

but

#

im learning

#

i did luau before

digital schooner
#

{list::*}

shrewd spire
#

heh

#

what ya mean

digital schooner
#

That's called a list

shrewd spire
#

so

#

like this?

digital schooner
#

Don't copy and paste what I say, use your brain please

shrewd spire
#

oh

digital schooner
#

You have to add values to the list obviously

shrewd spire
digital schooner
#

You gotta realize this is not lua

shrewd spire
#

ehh

#

true

#

wait so

#

u cant do like that?

digital schooner
#
set {var} to value
set {list::val1} to value1
add value2 to {list::*}
shrewd spire
#

like i tried this before

digital schooner
#

Once again, I suggest using a list for that game code

#

{games::*}

#

Loop, check if it's true, send

shrewd spire
#

ehh

#

is it possible to script luau in minecraft?

digital schooner
#

No

#

I'll give you an example

#
on load:
  set {-testList::value1} to "val1"
  set {-testList::value2} to "val2"

command test:
  trigger:
    loop {-testList::*}:
      send loop-value #Would be val1 and val2
      send loop-index #Would be value1 and value2
shrewd spire
#

ok

#

heh

#

so

#

hmmm

#

sp

#

so

#

@digital schooner smthing like this

#

right?

digital schooner
#

No

#

Well yes

#

But not the loop

#

That was for something else

shrewd spire
#

ohh

digital schooner
#

You want to send a random message every time right?

shrewd spire
#

so no loop

#

yes

digital schooner
#

With lists you can get a random element

shrewd spire
#

okk

digital schooner
#
send (random element out of {list::*})
```This would send a random value inside the list
shrewd spire
#

i also got this

#

the problem is

#

the argument

#

...

digital schooner
#

To who

shrewd spire
#

?

digital schooner
#

send something to ...

shrewd spire
#

to all players

#

i did

digital schooner
#

It's not on the image

shrewd spire
#

tho it aint sending

digital schooner
#

Because {Messages::*} doesn't have any values

#

Now does it

shrewd spire
#

oh wait

digital schooner
#

Did you reload

shrewd spire
#

its cuz

#

the -?

#

right

#

i did reload

#

yes

digital schooner
#

No, it's not

shrewd spire
#

hmm

digital schooner
#

Oh wait

#

It is

shrewd spire
#

k

digital schooner
#

You don't have - in the every x seconds

shrewd spire
#

works now

#

but

#

so

#

i want it to not be bold

#

after the >>

digital schooner
#

Add a &r after

shrewd spire
#

ok

#

yes

#

k

#

it works

#

tho

#

thooo

#

here

#

it would need to use list right?

digital schooner
#

Yes

#

It'd be better and faster

#

And cleaner

shrewd spire
#

how would i then

digital schooner
#

I'll give an example

shrewd spire
#

ok

digital schooner
#
on load:
  set {-types::type1} to true
  set {-types::type2} to false

command types:
  trigger:
    loop {-types::*}:
      send "True" if loop-value = true else "False"
#

1 line ifs

shrewd spire
#

heh

#

wait so

#

set {-types::type1} to true

#

and the other to false

#

but

#

how would i put the values into there

#

....

digital schooner
#

Look at your code, and see how you can implement it

shrewd spire
#

but

digital schooner
#

You gotta use set

#

And change the dot with ::

#
set {list::type} to value```
shrewd spire
#

heh

digital schooner
#

On the on load

shrewd spire
#

ok

#

so that

#

like

#

im confused

#

wait

#

so

digital schooner
#

Don't copy and paste dude

#

Read the code, understand, implement it in your own way

shrewd spire
#

set [list::gamemode.creative} to value

#

?

#

@digital schooner

digital schooner
#

No

shrewd spire
#

eee

digital schooner
#

What you have -> {gamemode.creative}
What you need to know to change to list -> {listName.value}

shrewd spire
#

...

#

bro

#

u confuse me soo much

#

this

#

is my

#

gamemodes

#

boxfight*

digital schooner
#

My bad

#

I read your code wrong

shrewd spire
#

ok

#

it should print the status

#

of the values

digital schooner
#
#What you have
{listName.index} = value

#Changes
set {listName::index} to value
shrewd spire
#

if true then = "Open"

#

if false then "Close"

#

k

#

so

#

the list

#

is called game

#

right?

#

index is

#

bedwars, dungeons, powershells and so on

#

if im right

digital schooner
#

Yes

shrewd spire
#

ok

#

so if i wanted to display the game statuses like this

#

{@prefix}
Bedwars: Open/Closed
PVP: Open/Closed
Survival: Open/Closed
FlatSurvival: Open/Closed
PowerShells: Open/Closed
Dungeons: Open/Closed
BoxFight: Open/Closed

shrewd spire
#

k

#

so

#

i first do

#

game.bedwars = value

#

and so on

#

right?

digital schooner
#

Yes

#

Wait what

#

Just do it, I'll help afterwards if it's wrong

shrewd spire
#

k

#

so like that right?

digital schooner
#

No

shrewd spire
#

or should all be without numbers

digital schooner
#

What have I told you

#

Do not copy and paste

shrewd spire
digital schooner
#

Understand it, implement it

shrewd spire
#

i didnt copy paste

#

i wrote it

#

....

digital schooner
#

copy and paste doesn't mean ctrl c and v

#

You see what I do and do exactly that

shrewd spire
digital schooner
shrewd spire
#

oh

#

tho

#

waitt

#

ohhh

#

wait

#

ok

#

so

#

to should be =

#

right?

#

k

#

so

#

thats right

#

if im right

#

@digital schooner

#

tell me how dumb i was this time

#

...

digital schooner
#

That's correct

shrewd spire
#

ohh

#

wait a min

#

how would i print status then

digital schooner
shrewd spire
#

with or without loop?

digital schooner
#

You'll be using the loop to display

shrewd spire
#

k

digital schooner
#

So, understand the loop, you don't need the load part now

shrewd spire
#

k

#

nearly

#

@digital schooner

#

how would i join em back

#

so its like

#

sends the right thing

#

..

digital schooner
#

You don't set it to "True"

#

You set it to true

#

And switch loop-index with {@prefix}

#

You want
Prefix
game - status

#

not
game
prefix - status

shrewd spire
#

heh

#

ohh

#

wai

#

yeah

#

forgot

#

..

#

but

#

i want it to show

#

loop index too

#

yk

digital schooner
#

Yes I do

shrewd spire
#

ok

digital schooner
#

Play with the loop, see what does what

shrewd spire
#

ok

#

tho

#

now

digital schooner
#

loop-value is either true/false

shrewd spire
digital schooner
#

and
loop-index is the name of the game

shrewd spire
#

it sends closed

#

no matter if its false or true

#

weird

digital schooner
#

I told you

#

You don't set the values to a string

#

You set it to a boolean

#

true or false

#

not "true" nor "false"

shrewd spire
#

oh

#

wait

#

thats true

#

...

digital schooner
#

Also, I suggest sending the prefix before the loop

#

So it doesn't spam it

shrewd spire
#

welp

#

now it says

#

all is opened

digital schooner
#
  • you can do
send {@prefix}
shrewd spire
digital schooner
#

No need for quotes nor player since it will default to the command sender

digital schooner
shrewd spire
digital schooner
#

Oh

shrewd spire
digital schooner
#

Okay nvm, you do need ""

shrewd spire
#

needs to be

#

yeah

digital schooner
#

Unless you use "" on the option it self

shrewd spire
#

k

#

so

#

it sends this

#

not like

#

all gamemodes and the :

#

and it sends open

#

all the time

digital schooner
#

Do you set everything to true?

shrewd spire
#

noo

digital schooner
#

That doesn't help

shrewd spire
#

?

#

welp

#

it sets it to true with command

#

not auto

#

mhm

digital schooner
shrewd spire
#

where

#

wait

#

ohh

#

yes i do

#

mhm

#

i set all to true

#

but with command

#

it should close

#

does it mess it up?

#

@digital schooner

digital schooner
#

What

shrewd spire
#

how would i do something like this

#

so

#

all players in that world

#

gets tped

digital schooner
#

With something called where filter

shrewd spire
#

hehe

#

he*

digital schooner
#
#Example
send "only players with sk.perm can see this message" to all players where [input has permission "sk.perm"]
#

input being each player in this case

shrewd spire
#

so

#

all players where wold is "BoxFight"

digital schooner
#

Read it

shrewd spire
digital schooner
#

You can't just remove code

#

And think it'll work

shrewd spire
#

remove what?

digital schooner
#

Is not what I sent

shrewd spire
#

oh

#

u sended to all players

digital schooner
#

Then change the send to a teleport

#

Use your brain

shrewd spire
#

heh

digital schooner
#

Jeez man, this is english for christ sake

shrewd spire
#

wait

#

like this

#

right?

digital schooner
#

...

#

Read.. please

shrewd spire
#

i dooo

digital schooner
#

It's ONE LINE

shrewd spire
shrewd spire
digital schooner
#

Jeez dude

shrewd spire
#

forgot to remove that

#

bro

#

now i like

#

litteraly read it

#

PLLSSSS

#

HELPPP

#

MEEE

digital schooner
#
teleport all players where [world of input = "name"]```
#

Is it that hard?

shrewd spire
#

yes

#

ty

#

tho

#

LAST THING

#

LIKE

#

FR

#

LAST THING

digital schooner
#

?

shrewd spire
#

well

shrewd spire
#

cuz

#

arg-3 is a string

#

and 2

#

and 1

digital schooner
#

That makes 0 sense

shrewd spire
#

why?

#

normally

#

arg-3 should be [<text>]

#

that would work

#

tho

#

cuz im using arg-3

#

for string

#

for the other stuff

digital schooner
#

What?

shrewd spire
#

it doesnt work

#

at the broadcast

shrewd spire
digital schooner
#

Is there any error message?

shrewd spire
#

nope

digital schooner
#

Try "%world of input%"

shrewd spire
#

heh

#

oh

#
                else if arg-3 is "Close":
                    if player is op:
                        if {game.bedwars} is false:
                            send "{@prefix} Bedwars is already closed." to player
                        else:
                            set {game.bedwars} to false
                            broadcast "{@prefix} Bedwars is now closed."
                            teleport all players where ["%world of input%" = "BedwarsLobby"]
                    else:
                        message "{@prefix} &4You dont have permission to use this commmand!"
digital schooner
#

Oh crap

shrewd spire
#

hm?

digital schooner
#
teleport all players to world("name") where ...```
shrewd spire
#

k

#
teleport all players to spawn of world("Spawn") where [world of input = "NicosAdventure"]
digital schooner
#

spawn[ ][point] of "name"

shrewd spire
#

ok

#

teleport all players in world "BedwarsLobby" to spawn of world "Spawn"

#

that worked

#

k

#

so

#

broadcast script

#

ik how to make one

#

tho

#

its just

#

cuz

#

i made it like this

#

all arguments are strings

digital schooner
#

Okay and?

#

Does it have any errors?

shrewd spire
#

no

#

but

#

for a broadcast script u need to use text not string

digital schooner
#

No?

shrewd spire
#

yes?

digital schooner
#

Okay then use text

shrewd spire
#

no

#

cuz

#

then all the other stuff

#

would break

digital schooner
#

No

shrewd spire
#

these stuffs use string

#

yes

#

bro

digital schooner
#

Text is practically the same as string

#

String is a joint of chars
Text is a joint of strings

shrewd spire
#

ojj

#

ohh*

#

k