#Rock Paper Scissors Skript

1 messages · Page 1 of 1 (latest)

near moat
#

So I'm making a Rock Paper Scissors skript, and I'd say I got the basics set up for it, but I was hoping for a bit of help to make it function completely.
The skript is attached as it's too long to post.

#

No skript-gui, just some basic SkBee

near moat
#

anyone?

low lily
#

how is that skbee

near moat
#

i said some

#

basic

#

skbee

#

theres like

#

one line

#

thats skbee

#

aka some

near moat
#

so anyone wanna help me with this skript?

stiff obsidian
#

thats vanilla guis

#

not skbee

#

second

#

this is a preference but it makes it a lot easier

#

set {_gui} to chest inventory with 4 rows named "&c&lRock Paper Scissors Games"

#

instead of doing an annoying and long metadata tag

#

u can set it to a variable

near moat
#

i can see how it mightve been implied

#

but i never meant to imply such

near moat
near moat
#

anyone?

near moat
#

?

crimson mica
#

we can't help you if you don't tell us what's wrong with it

craggy hearth
#

fax

near moat
near moat
near moat
#

any1

crimson mica
#

so let me get this straight... nothing is wrong with it, but you want us to make it work

near moat
#

anyone?

low lily
near moat
#

the very basics

boreal echo
#

Sounds like you got it covered

#

Gg

low lily
near moat
#

nope

#

come back

low lily
near moat
#

RUDE

ashen hatch
#

good luck!

near moat
#

damn

#

just leaving me

low lily
near moat
#

the basics

#

work

#

it doesnt function properly

low lily
#

means works

#

works

#

means stfu

near moat
#

are you high

#

my god

spice timber
#

If something isnt working properly then it does not work

near moat
#

id say working and working properly are two different things

near moat
#

so anyone

edgy rain
#

you still haven't specified what it is exactly you need help with

wraith trout
ashen hatch
#

bro he already sent his code 💀

near moat
near moat
#

second; firstly, the RPS metadata gui, as it displays one game within all of the slots

#

secondly, the function. theres thirteen errors

#

line 40, line 41, line 43, line 45, line 47, line 49, line 51 with "cant compare variable with a text"

#

line 53 and line 54 with metadata values cant be set to anything, probably because i set it to of {_p1} and {_p2}

#

line 55 because it cant understand the condition, probably for the same reason as the last two lines

#

line 58, line 73 and line 88 not understand the condition

edgy rain
#

in lines 41 to 54, you just need uuid of {_p1} or {_p1}'s uuid, no need for the extra two %
in your case, change {RPSChoice::%%{_p1}%'s uuid%} to {RPSChoice::%{_p1}'s uuid%}
And, change {RPSChoice::%%{_p2}%'s uuid%} to {RPSChoice::%{_p2}'s uuid%}

#

for line 40, you need a bit more info: set slot 10 of ((metadata tag "Taco" of {_p1}) and (metadata tag "Taco" of {_p2})) to stone named "Some fun stone"

#

line 55: (metadata tag "RPSBattle" of player)
There is no player in a function

#

line 58: probably because you are checking if the variable is the item paper, not the text "paper"

near moat
#

only 7 errors

#

line 40 still says it cant understand the condition

#

line 53 and line 54 still cant be set to anything

#

line 55 doesnt understand the condition

near moat
edgy rain
#

why, tho. you set it to be a string at first, but then convert it to an item. That isn't necessary until you put the items in the gui.

#

line 40: you have an extra space after set slot; if that still doesn't fix the issue, then you'll have to put both metadata on separate lines
line 53 & 54: same as 40 (you may have to split the line into two)
line 55: There is STILL no player in a function; the only players that can be used there are {_p1} and {_p2}

near moat
#

40 worked, hard to make two lines for it instead of 1

#

ill resend it because the lines show smth different than what i originally said

#

line 54 and line 55 cant be set to anything

#

line 56 cant understand the condition

near moat
near moat
#

anyone?

near moat
#

anyone?

ashen hatch
#

lol

near moat
#

wat

near moat
#

anyone

near moat
#

anyone

near moat
#

anyone at all??

dusty shoal
#

anyone what

severe isle
#

Why is everyone being so mean to my boy elijah

#

😭

near moat
near moat
#

thats what i am

severe isle
#

I wana help

#

But

#

Im not that experienced with skript 😂

dusty shoal
near moat
#

yes

#

ofc

near moat
dusty shoal
#

cant help you with that

near moat
#

then why answer

ashen hatch
#

xd

near moat
#

so anyone able to help?

near moat
#

anyone?

ashen hatch
#

56 same thing

near moat
#

i havent but ill try

near moat
#

still have problems with the other ones

ashen hatch
# near moat aka this

if you want to keep it that way you have it rn, maybe try if type of {RPSChoice::%%{_p1}%'s uuid%} is paper: instead

near moat
ashen hatch
#

not really...

near moat
# ashen hatch not really...
26.03 01:42:34 [Server] INFO Can't understand this condition: 'type of {RPSChoice::%%{_p1}%'s uuid%} is paper'
26.03 01:42:34 [Server] INFO Line: if type of {RPSChoice::%%{_p1}%'s uuid%} is paper:
26.03 01:42:34 [Server] INFO Line 77: (elijah.sk)
26.03 01:42:34 [Server] INFO Can't understand this condition: 'type of {RPSChoice::%%{_p1}%'s uuid%} is stone'
26.03 01:42:34 [Server] INFO Line: if type of {RPSChoice::%%{_p1}%'s uuid%} is stone:
26.03 01:42:34 [Server] INFO Line 92: (elijah.sk)
26.03 01:42:34 [Server] INFO Can't understand this condition: 'type of {RPSChoice::%%{_p1}%'s uuid%} is diamond sword'
26.03 01:42:34 [Server] INFO Line: if type of {RPSChoice::%%{_p1}%'s uuid%} is diamond sword:```
ashen hatch
#
if {RPSChoice::%{_p1}'s uuid%} is "paper":
        set {RPSChoice::%{_p1}'s uuid%} to paper named "&6Paper"
    if {RPSChoice::%{_p1}'s uuid%} is "rock":
        set {RPSChoice::%{_p1}'s uuid%} to stone named "&6Rock"
    if {RPSChoice::%{_p1}'s uuid%} is "scissors":
        set {RPSChoice::%{_p1}'s uuid%} to diamond sword named "&6Scissors"
    if {RPSChoice::%{_p2}'s uuid%} is "paper":
        set {RPSChoice::%{_p2}'s uuid%} to paper named "&6Paper"
    if {RPSChoice::%{_p2}'s uuid%} is "rock":
        set {RPSChoice::%{_p2}'s uuid%} to stone named "&6Rock"
    if {RPSChoice::%{_p2}'s uuid%} is "scissors":
#

instead of setting RPSChoice here, make another variable like RPSItem

#

for the gui

#

wait no thats not even the problem

ashen hatch
near moat
#

idk ill change it

near moat
#
            add {_amount} to %{_p2}%'s balance```
#

do i need to remove the percentage signs

#

or

ashen hatch
#

yes...

#

have you considered reviewing basic skript syntax?

near moat
#

yes

#

i have

#

functions arent my thing

ashen hatch
#

percentage signs have nothing to do with functions

near moat
#

ok

#
                set slot 13 of metadata tag "RPS" of player to barrier named "&cNo games found!" with lore "", "&fThere are no active RPS games.", "&fStart one now!"
            else:
                set slot (integers between 0 and 26) of metadata tag "RPS" of player to {RPSActive::*}``` ```set {RPSActive::*} to paper named "&b%player%'s RPS Game" with lore "&6%{RPSAmount::%player's uuid%}%"```
#

how do i make this work properly?

#

basically like a menu option with the games

ashen hatch
#

what is rps active supposed to be

near moat
#

well it sets the games

ashen hatch
#

can you send me the full menu code?

near moat
#
    aliases: /rps
    permission: op
    trigger:
        if arg-1 is not set:
            set metadata tag "RPS" of player to chest inventory with 4 rows named "&c&lRock Paper Scissors Games"
            set slot (integers between 27 to 35) of metadata tag "RPS" of player to gray stained glass pane named "&0"
            if {RPSActive::*} is empty:
                set slot 13 of metadata tag "RPS" of player to barrier named "&cNo games found!" with lore "", "&fThere are no active RPS games.", "&fStart one now!"
            else:
                set slot (integers between 0 and 26) of metadata tag "RPS" of player to {RPSActive::*}
            set slot 30 of metadata tag "RPS" of player to paper named "&c&lPrevious Page" with lore "&7Click to go to the previous page."
            set slot 31 of metadata tag "RPS" of player to book named "&6&l&nSTATISTICS" with lore "", "&fHere you can view your statistics from all your RPS games.", "", "&ePlayer: &f%player%", "", "&eWins: &f%{RPSWins::%player%}%", "&eLosses: &f%{RPSLosses::%player%}%", "&eProfit: &f%{RPSProfit::%player%}%", "&eWin Percentage: &f%{RPSWP::%player%}%"
            set slot 32 of metadata tag "RPS" of player to paper named "&2&lNext Page" with lore "&7Click to go to the next page."
            set slot 35 of metadata tag "RPS" of player to nether star named "&a&lCreate Game" with lore "&7Click here to create a new game!"
            open (metadata tag "RPS" of player) to player```
ashen hatch
#

what's the purpose of arg-1

near moat
#

rock

#

paper

#

or scissors

ashen hatch
#

ah

near moat
#
                set {_value} to 1        
                set {RPSText::%player's uuid%} to {_value}
                send "&b&l[RPS] &eRock, Paper or Scissors?" to player
            if arg-1 is not "Rock", "Paper" or "Scissors":
                send "&b&l[RPS] &6Invalid choice!"
                stop```
ashen hatch
#

so what doesnt work?

near moat
#

they're all 1 game

ashen hatch
#

well you made it so every single slot is set to that one iten

#

item

near moat
#

yes

#

and i wanna know how not to, to make them spread out

ashen hatch
#

so you want rps active to store all the games, and when you open the gui, slots 0-26 are filled with the games?

near moat
#

yes

ashen hatch
#

alr, so one way to do this would be to loop {RPSActive::*} and set the slots with the loop-index

near moat
#

set slot (integers between 0 and 26) of metadata tag "RPS" of player to loop-index

#

like that?

ashen hatch
#

well, no

#

I don't see a loop

near moat
#
                loop {RPSActive::*}:
                    set slot (integers between 0 and 26) of metadata tag "RPS" of player to loop-index```
#

now you do

ashen hatch
#

you're still setting all the slots

near moat
#

how do i not do that?

ashen hatch
#

use some logic, set the slot of the loop-index

near moat
#

i have zero logic when it comes to coding

ashen hatch
#

do you know what the loop-index means?

near moat
#

i assume number value in loop?

ashen hatch
#

hold up it might be loop-number, can you tell me what broadcasting loop-index gives?

near moat
#

im pretty sure thatd be an endless loop if i broadcasted it

ashen hatch
#

no?

#

{RPSActive::*} is 1 value

near moat
#

ok

#

it just says "1"

ashen hatch
#

ok thats what I thought

#

so just the slot (loop-index) - 1 to the loop-value

near moat
ashen hatch
#

(loop-index) - 1 ?

near moat
#

lmfao

ashen hatch
#

lol just set a variable to the loop-index then subtract it

#

idk why you cant just do stuff with loop-index

near moat
#

no errors, but wont show anything

#

however that might be understandable

#

set {RPSActive::*} to paper named "&b%player%'s RPS Game" with lore "&6%{RPSAmount::%player's uuid%}%"

#

as here im setting it to *

ashen hatch
#

yeah cause thers just 1 rn

#

can I see the code

near moat
ashen hatch
#

broadcast {_index} - 1

near moat
#

"-1"

ashen hatch
#

tbh just do set {_index} to sum(loop-index, -1)

#

then broadcast that

near moat
#
26.03 02:45:38 [Server] INFO The 1st argument given to the function 'sum' is not of the required type number. Check the correct order of the arguments and put lists into parentheses if appropriate (e.g. 'give(player, (iron ore and gold ore))'). Please note that storing the value in a variable and then using that variable as parameter will suppress this error, but it still won't work.```
ashen hatch
#

weird
set {_test} to loop-index parsed as integer and set index to test - 1

#

broadcast both

near moat
#

well i didnt broadcast both

#

but it worked

#

0 for index

#

still not showing the piece of paper though

#

which i still think is this issue; set {RPSActive::*} to paper named "&b%player%'s RPS Game" with lore "&6%{RPSAmount::%player's uuid%}%"

ashen hatch
#

broadcast the loop-value

near moat
#

piece of paper named &bElijahJunaid's RPS Game

ashen hatch
#

just as a test set the slot to a random item

#

and see if it shows

near moat
#
                    set {RPSActive::((loop-index) +1)} to paper named "&b%player%'s RPS Game" with lore "&6%{RPSAmount::%player's uuid%}%"```
#

would that work

ashen hatch
#

that doesnt set the slot

near moat
#

yes im aware

#

it sets a variable

#

would it work

ashen hatch
#

whats the point if it doesnt set the slot

near moat
ashen hatch
#

well try it

near moat
#

it did not work

#

no errors but it wont work properly

near moat
ashen hatch
#

sorry, I'm not going to debug and write your code for you, good luck though

near moat
#

great:)

ashen hatch
#

people arent here to write your skripts

near moat
#

im aware, you think im here for that? im looking for help and ive run into many errors.

#

if you dont want to help, i completely understand.

raw summit
#

amazing

near moat
#

shut

near moat
near moat
#

anyone

severe isle
#

Bros tps is 22

#

💀

near moat
#

yes

near moat
#

anyone

fast patrol
#

I have hereby taken the responsibility to inform you, that you won’t get any help. The way you act from the start, is so annoying and selfish that I don’t think that anyone would ever help you.

ashen hatch
#

Regretfully, I would have to agree with this statement.

near moat
#

dont understand at all tho

#

i was simply stating points

ripe idol
#

this isn't a server to ask people to straight up do something for you it's for if something isn't working and you can't fix it so they can help you. So if there's an error you don't understand then you ask for help, not if something is not finished and you want someone to help you finish it.

near moat
#

then i did

#

and i stumbled upon errors

#

many