1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[HELP] Non OPS cant do anything.

Discussion in 'Skript' started by AlexWarrior, Dec 5, 2020.

Thread Status:
Not open for further replies.
  1. AlexWarrior

    AlexWarrior Member

    Joined:
    Dec 5, 2020
    Messages:
    14
    Likes Received:
    0
    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.
     
  2. Nikd0

    Nikd0 Active Member

    Joined:
    May 30, 2020
    Messages:
    206
    Likes Received:
    20
    You sure they got permission "awpcc.default"?
     
  3. AlexWarrior

    AlexWarrior Member

    Joined:
    Dec 5, 2020
    Messages:
    14
    Likes Received:
    0
    positive. I’ve tried it with and without permission
    --- Double Post Merged, Dec 5, 2020, Original Post Date: Dec 5, 2020 ---
    bump! Still need help!
     
  4. DeadlySkyLord

    DeadlySkyLord Member

    Joined:
    May 23, 2020
    Messages:
    11
    Likes Received:
    0
    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.
     
  5. AlexWarrior

    AlexWarrior Member

    Joined:
    Dec 5, 2020
    Messages:
    14
    Likes Received:
    0
    Im not sure you guys understand. For Operators, with every permission, it works, everything works, but if you dont have op, nothing works
     
  6. AC_AKB

    AC_AKB New Member

    Joined:
    Dec 4, 2020
    Messages:
    7
    Likes Received:
    0
    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 (Text):
    1. variables:
    2.     {CPC.%player%} = 0
    3.     {Event.%player%} = 0
    4.     {Cookies.%player%} = 0
    5.     {PRESTIEGE.%player%} = 0
    6.  
    7. options:
    8.     Prefix: &6&lCookies
    9.  
    10. on right click holding a cookie:
    11.     add {CPC.%player%}+{Event.%player%} to {Cookies.%player%}
    12.  
    13. command /upgrade1CPC:
    14.     trigger:
    15.         if player has permission "awpcc.default":
    16.             if {Cookies.%player%} >= 200:
    17.                 send "{@Prefix} &fAdded &a+1 Cookies Per Click! &fYou now have &a%{Cookies.%player%}%&f cookies!" to player
    18.                 remove 200 from {Cookies.%player%}
    19.                 add 1 to {CPC.%player%}
    20.             else:
    21.                 send "{@Prefix} &4You dont have enough Cookies!"
    22.  
    23. command /maincookieshopNPC:
    24.     trigger:
    25.         open chest with 5 rows named "&6Upgrades" to player
    26.         format slot 0 of player with yellow glass named " " to be unstealable
    27.         format slot 1 of player with yellow glass named " " to be unstealable
    28.         format slot 2 of player with green glass named " " to be unstealable
    29.         format slot 3 of player with green glass named " " to be unstealable
    30.         format slot 4 of player with green glass named " " to be unstealable
    31.         format slot 5 of player with green glass named " " to be unstealable
    32.         format slot 6 of player with green glass named " " to be unstealable
    33.         format slot 7 of player with yellow glass named " " to be unstealable
    34.         format slot 8 of player with yellow glass named " " to be unstealable
    35.         format slot 9 of player with yellow glass named " " to be unstealable
    36.         format slot 17 of player with yellow glass named " " to be unstealable
    37.         format slot 18 of player with green glass named " " to be unstealable
    38.         format slot 19 of player with green glass named " " to be unstealable
    39.         format slot 20 of player with green glass named " " to be unstealable
    40.         format slot 21 of player with green glass named " " to be unstealable
    41.         format slot 22 of player with green glass named " " to be unstealable
    42.         format slot 23 of player with green glass named " " to be unstealable
    43.         format slot 24 of player with green glass named " " to be unstealable
    44.         format slot 25 of player with green glass named " " to be unstealable
    45.         format slot 26 of player with green glass named " " to be unstealable
    46.         format slot 27 of player with yellow glass named " " to be unstealable
    47.         format slot 28 of player with green glass named " " to be unstealable
    48.         format slot 29 of player with green glass named " " to be unstealable
    49.         format slot 30 of player with green glass named " " to be unstealable
    50.         format slot 31 of player with green glass named " " to be unstealable
    51.         format slot 32 of player with green glass named " " to be unstealable
    52.         format slot 33 of player with green glass named " " to be unstealable
    53.         format slot 34 of player with green glass named " " to be unstealable
    54.         format slot 35 of player with yellow glass named " " to be unstealable
    55.         format slot 36 of player with yellow glass named " " to be unstealable
    56.         format slot 37 of player with yellow glass named " " to be unstealable
    57.         format slot 38 of player with green glass named " " to be unstealable
    58.         format slot 39 of player with green glass named " " to be unstealable
    59.         format slot 40 of player with barrier named "&c&lCLOSE" to close
    60.         format slot 41 of player with green glass named " " to be unstealable
    61.         format slot 42 of player with green glass named " " to be unstealable
    62.         format slot 43 of player with yellow glass named " " to be unstealable
    63.         format slot 44 of player with yellow glass named " " to be unstealable
    64.         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"]
    65.         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"]
    66.         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"]
    67.         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"]
    68.         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"]
    69.         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"]
    70.         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.
     
  7. AlexWarrior

    AlexWarrior Member

    Joined:
    Dec 5, 2020
    Messages:
    14
    Likes Received:
    0
    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!
     
  8. AC_AKB

    AC_AKB New Member

    Joined:
    Dec 4, 2020
    Messages:
    7
    Likes Received:
    0
    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.
     
  9. AlexWarrior

    AlexWarrior Member

    Joined:
    Dec 5, 2020
    Messages:
    14
    Likes Received:
    0
  10. AC_AKB

    AC_AKB New Member

    Joined:
    Dec 4, 2020
    Messages:
    7
    Likes Received:
    0
    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.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...