Help with skript

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

_m1

Member
Feb 27, 2018
12
0
0
24
Hey, so i'm pretty new with skript, and I need help with a skript i've been working on for a while, but can't get it to work. I basically need a GUI to pop up (Which I already know how to do and add commands on clickable items), but i'm trying to figure out how to make a clickable item execute 2 commands. I'm trying to make a skript where you would do /extras, and a GUI would pop up with purchasable items using in game money.

Example:

Slot 1 would be a chest and if clicked it would take 50,000 in game money (Command: eco take %player% 50000) And it would give the player a mob chest (Command: chest give moball %player% 1) If the player did not have $50000 they would not receive the mob chest.

Eco plugins:

Vault & Essentials.
 
hm... I feel like I know how to fix this, but its late and my head is dead.
I think what you might need to do, is run a few things, first of all, check players balance,
do an if statement, something like if players balance is greater than 50000, then take 50000 and give them the item.
Heading to bed soon, but tomorrow I will check back in, and see if I can whip a little something up for you.
Do you have any pre-written code yet with the chest I could work with?
 
If you are using Tuske you can use this code:
code_language.skript:
command /test:
    trigger:
        open virtual chest inventory with size 3 named "What ever" to player
        create a gui slot 0 of player with chest named "I dont know" with lore "add lore if you want you need" to close: # can also use to run, to close, to do nothing
            console command "/Command 1"
            console command "/command 2"
 
If you are using Tuske you can use this code:
code_language.skript:
command /test:
    trigger:
        open virtual chest inventory with size 3 named "What ever" to player
        create a gui slot 0 of player with chest named "I dont know" with lore "add lore if you want you need" to close: # can also use to run, to close, to do nothing
            console command "/Command 1"
            console command "/command 2"
Bobby is totally right, and i think that is probably cleaner than what i would have done! But the right idea is there for ya :emoji_grinning:
 
If you are using Tuske you can use this code:
code_language.skript:
command /test:
    trigger:
        open virtual chest inventory with size 3 named "What ever" to player
        create a gui slot 0 of player with chest named "I dont know" with lore "add lore if you want you need" to close: # can also use to run, to close, to do nothing
            console command "/Command 1"
            console command "/command 2"
Hmmm, I'm also having the same problem and I use Tuske, but it doesn't work...

What other plugins do you need? :O
 
Hmmm, I'm also having the same problem and I use Tuske, but it doesn't work...

What other plugins do you need? :O
I am having no problem running this, but I also have a few addons I use for other things, such as Skellet, SkQuery, skRayFall, SkStuff, skUtilities, and of course TuSKe.
Also running the latest Skript from Bensku
 
If you are using Tuske you can use this code:
code_language.skript:
command /test:
    trigger:
        open virtual chest inventory with size 3 named "What ever" to player
        create a gui slot 0 of player with chest named "I dont know" with lore "add lore if you want you need" to close: # can also use to run, to close, to do nothing
            console command "/Command 1"
            console command "/command 2"
https://gyazo.com/314c794db009badcd22f3df2e1e3d7bb Not working
 
What exactly did you put in your code?
Which addons are you using and which version of Skript?

I just copy/pasted that EXACT code, and it re-loaded with absolutely no errors

##EDIT##

I removed all my skript addons, leaving just Skript and TuSKe.... low and behold, the skript did NOT run, so then I popped in SkQuery-Lime and it works. So I guess you need that add-on for this syntax to work
 
Last edited:
I put the exact same thing he put.

I'm using:

Skript
Skellett
SkQuery
TuSKe
WildSkript
skRayFall
 
I put the exact same thing he put.

I'm using:

Skript
Skellett
SkQuery
TuSKe
WildSkript
skRayFall
Not really sure whats happening on your end then, which version/author of Skript are you running? I believe that makes a huge difference.
Because I have in my plugin folder on a test server, Skript, SkQuery-Lime and TuSKe, copy and pasted the code EXACTLY from here, and it worked, no error. Without SkQuery i got the error, but when i put SkQuery back in, all was fine
 
Version 2.1.2
[doublepost=1519778356,1519778279][/doublepost]
What exactly did you put in your code?
Which addons are you using and which version of Skript?

I just copy/pasted that EXACT code, and it re-loaded with absolutely no errors

##EDIT##

I removed all my skript addons, leaving just Skript and TuSKe.... low and behold, the skript did NOT run, so then I popped in SkQuery-Lime and it works. So I guess you need that add-on for this syntax to work
Can't seem to find SkQuery-Lime could you send me download link please? :emoji_slight_smile:
 
are you using the bensku version of skript? Because i am, and its current version is 2.2-dev33
SkQuery-Lime is available on the DOCS page, click HERE, scroll down about half way and click SkQuery, you will see "SkQuery 3.6.0-Lime" and click that!
 
Status
Not open for further replies.