MenuGui Commands

  • 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.

iVyperion

Member
Aug 13, 2017
25
0
0
19
I'm making a Shopgui.
i need to do 2 command but idk how rn i do it like this:



command /foods:
trigger:
open chest with 5 rows named "&5CakeFoodShop" to player
wait 3 tick
format slot 10 of player with 1 apple named "&432 Apple" with lore "&410 euro" to run "give %player% apple 32"



how do i do 2 command to take money and to give him the items pls help
 
I'm making a Shopgui.
i need to do 2 command but idk how rn i do it like this:



command /foods:
trigger:
open chest with 5 rows named "&5CakeFoodShop" to player
wait 3 tick
format slot 10 of player with 1 apple named "&432 Apple" with lore "&410 euro" to run "give %player% apple 32"



how do i do 2 command to take money and to give him the items pls help
set it up as one command. so where you have "give %player% apple 32", instead set up a custom command that both gives the item and takes the money using the give effect and the add effect for the player balance. Here's the documentation on custom commands:
http://en.njol.ch/projects/skript/doc/commands
 
set it up as one command. so where you have "give %player% apple 32", instead set up a custom command that both gives the item and takes the money using the give effect and the add effect for the player balance. Here's the documentation on custom commands:
http://en.njol.ch/projects/skript/doc/commands
Well nice idea but I allready have 425 lines with the line I typed in the thread so isnt there an other way?
 
if you use tuske advanced guis (https://github.com/Tuke-Nuke/TuSKe/wiki/GUI-Manager) which i highly recommend you can easily do this like so:
code_language.skript:
create a gui with id "whatever" with virtual chest with 6 rows named "something":
    make gui slot 0 with dirt named "something":
        #this is where you put what happens when the item is clicked
        make gui-player execute command "/command1"
        make gui-player execute command "/command2"

#then to open the gui to the player do:
open gui "whatever" to player
 
Tuske advanced gui would make it easier for you in general in the long rung since it can execute multiple effects from a gui with no commands, but would require a change of all your code.
With the command you don't need to make one for each line. set it up to accept the clicked item and value of it(potentially from a lore line just somewhere it can get the number) and then have the command process the rest with the provided info. all you would need to do to the rest of your code is Ctrl+F and replace that line with your new command.
 
if you use tuske advanced guis (https://github.com/Tuke-Nuke/TuSKe/wiki/GUI-Manager) which i highly recommend you can easily do this like so:
code_language.skript:
create a gui with id "whatever" with virtual chest with 6 rows named "something":
    make gui slot 0 with dirt named "something":
        #this is where you put what happens when the item is clicked
        make gui-player execute command "/command1"
        make gui-player execute command "/command2"

#then to open the gui to the player do:
open gui "whatever" to player
Is it a addon for skript cuz I want to keep using .sk files
 
If you say so, but what you want to accomplish will require a bit of work either way. It's all just in how you want to proceed with it.
My goal is to make a shopgui but it opens when u klick on villager named shop
Everything works except the 2cmds at once
Ive allredy put 10 hours in it so
 
If you say so, but what you want to accomplish will require a bit of work either way. It's all just in how you want to proceed with it.
And btw can you check my new post now I gtg sleep its 1am so bye wont be home tomorrow goin to sea
[doublepost=1502665634,1502665574][/doublepost]
haha the very definition of skripting right thereXD
XD
 
And btw can you check my new post now I gtg sleep its 1am so bye wont be home tomorrow goin to sea
The new one is a bit vague, so not sure what you mean by it. try updating it with a bit more of an explanation when you have time, and the info required in the help request format
[doublepost=1502665735,1502665645][/doublepost]There's also a Java specific forum section too for people way better at it then I am most certainly if you don't get responses on this forum:3 take care
 
The new one is a bit vague, so not sure what you mean by it. try updating it with a bit more of an explanation when you have time, and the info required in the help request format
[doublepost=1502665735,1502665645][/doublepost]There's also a Java specific forum section too for people way better at it then I am most certainly if you don't get responses on this forum:3 take care
Thank you you were rlly helpfull xD
[doublepost=1502691269][/doublepost]
The new one is a bit vague, so not sure what you mean by it. try updating it with a bit more of an explanation when you have time, and the info required in the help request format
[doublepost=1502665735,1502665645][/doublepost]There's also a Java specific forum section too for people way better at it then I am most certainly if you don't get responses on this forum:3 take care
i was just layin in my bed yesterday and on 1 moment i found out how i needed to do it look at this:

command /cakegive <player> <text> <text>:
usage: /cakegive <player> <amount_of_Item> <Money>
permission: Cakeshop.give
trigger:
execute console command "give %arg 1% %arg 2%"
execute console command "eco take %arg 1% %arg 3%"
[doublepost=1502691418][/doublepost]
The new one is a bit vague, so not sure what you mean by it. try updating it with a bit more of an explanation when you have time, and the info required in the help request format
[doublepost=1502665735,1502665645][/doublepost]There's also a Java specific forum section too for people way better at it then I am most certainly if you don't get responses on this forum:3 take care
update:

command /cakegive <player> <text> <text> <text>:
usage: /cakegive <player> <item> <amount_of_Item> <Money>
permission: Cakeshop.give
trigger:
execute console command "give %arg 1% %arg 2% %arg 3%"
execute console command "eco take %arg 1% %arg 4%"
 
Thank you you were rlly helpfull xD
[doublepost=1502691269][/doublepost]
i was just layin in my bed yesterday and on 1 moment i found out how i needed to do it look at this:

command /cakegive <player> <text> <text>:
usage: /cakegive <player> <amount_of_Item> <Money>
permission: Cakeshop.give
trigger:
execute console command "give %arg 1% %arg 2%"
execute console command "eco take %arg 1% %arg 3%"
[doublepost=1502691418][/doublepost]
update:

command /cakegive <player> <text> <text> <text>:
usage: /cakegive <player> <item> <amount_of_Item> <Money>
permission: Cakeshop.give
trigger:
execute console command "give %arg 1% %arg 2% %arg 3%"
execute console command "eco take %arg 1% %arg 4%"
mhm that's what I was saying with custom command
 
K but I wont use it for this cuz im to far allredy
Not being rude, but you won't get anywhere with an attitude like that, simply use a text editor such as notepad++ and select the text you need to replace (ctrl+f) and replace all the strings in the file. This is easily do-able, I do this when I have made large mistakes, in the end if you're dedicated it is worth it. You can't help someone who won't help themselves.. good luck
 
Status
Not open for further replies.