[HELP] Non OPS cant do anything.

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

AlexWarrior

Member
Dec 5, 2020
14
0
1
33
I'm getting into skript and I am just trying to make a simple Cookie Clicker server.

on rightclick holding a cookie:
add {CPC.%player%}+{Event.%player%} to {Cookies.%player%}

Very simple stuff. Btw that code gets made...

on join:
#Stats
if {Cookies.%player%} is not set:
set {Cookies.%player%} to 0
if {CPC.%player%} is not set:
set {CPC.%player%} to 1
if {PRESTIEGE.%player%} is not set:
set {PRESTIEGE.%player%} to 0
if {Event.%player%} is not set:
set {Event.%player%} to 0

Ive also made simple GUI's that can do the following

https://pastebin.com/59V6K3sS
Super long so im not going to put it here.

The GUI's on click then force the player to do the commands which are this. Now this is repeated for each cookie not just the +1 CPC (Cookies Per Click) Ive also tried this with and without the permission.

https://pastebin.com/FF0XB9ju

(I know there is most likely a simpler way to do this but im just learning.)

What my problem is when a player joins and tries to do anything, (Right click the cookie, Click on the Cookies in the GUI to do the command, Right clicking the NPC with the command to open the GUI does work though.) nothing happens. Not even the message that says "You do not have enough cookies works" Ive been asking for help for awhile and have gotten none. If you know how you can help PLEASE lmk. The addons and skript version i have are the following

Addons: Skript, SkBee, skDragon, skUtilities, SKQuery, SkRayFall, Vixio, Skellett, TuSKe
Other plugins: LP, WorldEdit, PlaceHolderAPI, Animatronics, Holograpic Displays, Vault, WorldGuard, Citizens, CustomHeads, Essentials, EssentialsChat, EssentialsSpawn

Skript Version: 2.2-dev36

If you need anymore info lmk also I am new to the forum so I might have formated stuff wrong.
 
maybe replace 'add -200 to {Cookies.%player%}" with

subtract 200 from {Cookies.%player%}

also i recommend using list variables to store these type of data and using TuSke or Vanilla Guis.
 
Im not sure you guys understand. For Operators, with every permission, it works, everything works, but if you dont have op, nothing works
 
Hey AlexWarrior,

One of the reasons your GUI is not working is because of the with lore.
The with lore usally is from SkQuery but Skript now has its own.
So I recommend removing SkQuery and replace it with TuSKe (you already have it).

The code that works fine for me is here:
hastebin - piqomowuve
But also here:
Code:
variables:
    {CPC.%player%} = 0
    {Event.%player%} = 0
    {Cookies.%player%} = 0
    {PRESTIEGE.%player%} = 0

options:
    Prefix: &6&lCookies

on right click holding a cookie:
    add {CPC.%player%}+{Event.%player%} to {Cookies.%player%}

command /upgrade1CPC:
    trigger:
        if player has permission "awpcc.default":
            if {Cookies.%player%} >= 200:
                send "{@Prefix} &fAdded &a+1 Cookies Per Click! &fYou now have &a%{Cookies.%player%}%&f cookies!" to player
                remove 200 from {Cookies.%player%}
                add 1 to {CPC.%player%}
            else:
                send "{@Prefix} &4You dont have enough Cookies!"

command /maincookieshopNPC:
    trigger:
        open chest with 5 rows named "&6Upgrades" to player
        format slot 0 of player with yellow glass named " " to be unstealable
        format slot 1 of player with yellow glass named " " to be unstealable
        format slot 2 of player with green glass named " " to be unstealable
        format slot 3 of player with green glass named " " to be unstealable
        format slot 4 of player with green glass named " " to be unstealable
        format slot 5 of player with green glass named " " to be unstealable
        format slot 6 of player with green glass named " " to be unstealable
        format slot 7 of player with yellow glass named " " to be unstealable
        format slot 8 of player with yellow glass named " " to be unstealable
        format slot 9 of player with yellow glass named " " to be unstealable
        format slot 17 of player with yellow glass named " " to be unstealable
        format slot 18 of player with green glass named " " to be unstealable
        format slot 19 of player with green glass named " " to be unstealable
        format slot 20 of player with green glass named " " to be unstealable
        format slot 21 of player with green glass named " " to be unstealable
        format slot 22 of player with green glass named " " to be unstealable
        format slot 23 of player with green glass named " " to be unstealable
        format slot 24 of player with green glass named " " to be unstealable
        format slot 25 of player with green glass named " " to be unstealable
        format slot 26 of player with green glass named " " to be unstealable
        format slot 27 of player with yellow glass named " " to be unstealable
        format slot 28 of player with green glass named " " to be unstealable
        format slot 29 of player with green glass named " " to be unstealable
        format slot 30 of player with green glass named " " to be unstealable
        format slot 31 of player with green glass named " " to be unstealable
        format slot 32 of player with green glass named " " to be unstealable
        format slot 33 of player with green glass named " " to be unstealable
        format slot 34 of player with green glass named " " to be unstealable
        format slot 35 of player with yellow glass named " " to be unstealable
        format slot 36 of player with yellow glass named " " to be unstealable
        format slot 37 of player with yellow glass named " " to be unstealable
        format slot 38 of player with green glass named " " to be unstealable
        format slot 39 of player with green glass named " " to be unstealable
        format slot 40 of player with barrier named "&c&lCLOSE" to close
        format slot 41 of player with green glass named " " to be unstealable
        format slot 42 of player with green glass named " " to be unstealable
        format slot 43 of player with yellow glass named " " to be unstealable
        format slot 44 of player with yellow glass named " " to be unstealable
        format slot 10 of player with cookie named "&a+1 CPC" with lore "&6Cost: &a200 Cookies" to close then run [make player execute command "/upgrade1CPC"]
        format slot 11 of player with cookie named "&a+10 CPC" with lore "&6Cost: &a2,000 Cookies" to close then run [make player execute command "/upgrade10CPC"]
        format slot 12 of player with cookie named "&a+100 CPC" with lore "&6Cost: &a20,000 Cookies" to close then run [make player execute command "/upgrade100CPC"]
        format slot 13 of player with cookie named "&a+1,000 CPC" with lore "&6Cost: &a200,000 Cookies" to close then run [make player execute command "/upgrade1000CPC"]
        format slot 14 of player with cookie named "&a+10,000 CPC" with lore "&6Cost: &a2,000,000 Cookies" to close then run [make player execute command "/upgrade10000CPC"]
        format slot 15 of player with cookie named "&a+100,000 CPC" with lore "&6Cost: &a20,000,000 Cookies" to close then run [make player execute command "/upgrade100000CPC"]
        format slot 16 of player with arrow named "&fNEXT PAGE" with lore "&fHave a lot of Cookies? Click here!" to close then run [make player execute command "/maincookieshopNPCmoreCookies"]

If you have any further questions just ask them right here.
 
Hey AlexWarrior,

One of the reasons your GUI is not working is because of the with lore.
The with lore usally is from SkQuery but Skript now has its own.
So I recommend removing SkQuery and replace it with TuSKe (you already have it).

The code that works fine for me is here:
hastebin - piqomowuve
But also here:
Code:
variables:
    {CPC.%player%} = 0
    {Event.%player%} = 0
    {Cookies.%player%} = 0
    {PRESTIEGE.%player%} = 0

options:
    Prefix: &6&lCookies

on right click holding a cookie:
    add {CPC.%player%}+{Event.%player%} to {Cookies.%player%}

command /upgrade1CPC:
    trigger:
        if player has permission "awpcc.default":
            if {Cookies.%player%} >= 200:
                send "{@Prefix} &fAdded &a+1 Cookies Per Click! &fYou now have &a%{Cookies.%player%}%&f cookies!" to player
                remove 200 from {Cookies.%player%}
                add 1 to {CPC.%player%}
            else:
                send "{@Prefix} &4You dont have enough Cookies!"

command /maincookieshopNPC:
    trigger:
        open chest with 5 rows named "&6Upgrades" to player
        format slot 0 of player with yellow glass named " " to be unstealable
        format slot 1 of player with yellow glass named " " to be unstealable
        format slot 2 of player with green glass named " " to be unstealable
        format slot 3 of player with green glass named " " to be unstealable
        format slot 4 of player with green glass named " " to be unstealable
        format slot 5 of player with green glass named " " to be unstealable
        format slot 6 of player with green glass named " " to be unstealable
        format slot 7 of player with yellow glass named " " to be unstealable
        format slot 8 of player with yellow glass named " " to be unstealable
        format slot 9 of player with yellow glass named " " to be unstealable
        format slot 17 of player with yellow glass named " " to be unstealable
        format slot 18 of player with green glass named " " to be unstealable
        format slot 19 of player with green glass named " " to be unstealable
        format slot 20 of player with green glass named " " to be unstealable
        format slot 21 of player with green glass named " " to be unstealable
        format slot 22 of player with green glass named " " to be unstealable
        format slot 23 of player with green glass named " " to be unstealable
        format slot 24 of player with green glass named " " to be unstealable
        format slot 25 of player with green glass named " " to be unstealable
        format slot 26 of player with green glass named " " to be unstealable
        format slot 27 of player with yellow glass named " " to be unstealable
        format slot 28 of player with green glass named " " to be unstealable
        format slot 29 of player with green glass named " " to be unstealable
        format slot 30 of player with green glass named " " to be unstealable
        format slot 31 of player with green glass named " " to be unstealable
        format slot 32 of player with green glass named " " to be unstealable
        format slot 33 of player with green glass named " " to be unstealable
        format slot 34 of player with green glass named " " to be unstealable
        format slot 35 of player with yellow glass named " " to be unstealable
        format slot 36 of player with yellow glass named " " to be unstealable
        format slot 37 of player with yellow glass named " " to be unstealable
        format slot 38 of player with green glass named " " to be unstealable
        format slot 39 of player with green glass named " " to be unstealable
        format slot 40 of player with barrier named "&c&lCLOSE" to close
        format slot 41 of player with green glass named " " to be unstealable
        format slot 42 of player with green glass named " " to be unstealable
        format slot 43 of player with yellow glass named " " to be unstealable
        format slot 44 of player with yellow glass named " " to be unstealable
        format slot 10 of player with cookie named "&a+1 CPC" with lore "&6Cost: &a200 Cookies" to close then run [make player execute command "/upgrade1CPC"]
        format slot 11 of player with cookie named "&a+10 CPC" with lore "&6Cost: &a2,000 Cookies" to close then run [make player execute command "/upgrade10CPC"]
        format slot 12 of player with cookie named "&a+100 CPC" with lore "&6Cost: &a20,000 Cookies" to close then run [make player execute command "/upgrade100CPC"]
        format slot 13 of player with cookie named "&a+1,000 CPC" with lore "&6Cost: &a200,000 Cookies" to close then run [make player execute command "/upgrade1000CPC"]
        format slot 14 of player with cookie named "&a+10,000 CPC" with lore "&6Cost: &a2,000,000 Cookies" to close then run [make player execute command "/upgrade10000CPC"]
        format slot 15 of player with cookie named "&a+100,000 CPC" with lore "&6Cost: &a20,000,000 Cookies" to close then run [make player execute command "/upgrade100000CPC"]
        format slot 16 of player with arrow named "&fNEXT PAGE" with lore "&fHave a lot of Cookies? Click here!" to close then run [make player execute command "/maincookieshopNPCmoreCookies"]

If you have any further questions just ask them right here.

Im not sure thats my issue. My issues is non ops cant do anything. Even an action like On Right Click Cookie. Im saying its not the gui thats causeing the issue i belive its something to do with skript. Everything works if you have OP. But if you are ex: A new player, you cant do the actions ops can do. I understand I would not want them to do stuff like /ban but they cant even right click a cookie!
 
Oh alright.. could you send me your full code in 1 pastebin or hastebin?
Then I can read your code and see if I can find any solution.
 
Well.. I couldn't find anything. It seems fine because you added this: if player has permission "awpcc.default":
But maybe you can try removing it. So it doesn't require any permission, maybe that helps.
 
Status
Not open for further replies.