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.

Solved Skript only works for operators

Discussion in 'Skript' started by BrokOlieSoep, Oct 10, 2021.

  1. BrokOlieSoep

    BrokOlieSoep Member

    Joined:
    Oct 10, 2021
    Messages:
    3
    Likes Received:
    0
    I am making a mmorpg script, and everything worked, but when I let a friend play it, they couldn't warp through right-clicking signs, until I made them operator. How can I solve this? Thanks in advance.
    Code (Text):
    1. on exp spawn:
    2.     cancel event
    3.    
    4. every 60 seconds:
    5.    
    6.     make console execute command "/fill 263 68 184 269 71 180 cobblestone"
    7.     make console execute command "/fill 273 68 184 279 71 180 iron_ore"
    8.    
    9. on block break:
    10.    
    11.     event-block is iron ore
    12.     drop 1 iron ingot at location of event-block
    13.  
    14. on death of pig:
    15.     spawn 1 pig at victim's location
    16.     set the last spawned entity's max health to 5
    17.     set the last spawned entity's health to 5
    18.     add 1 to {pig_kills.%attacker%}
    19.     attacker is a player:
    20.         give 1 exp to attacker
    21.        
    22. on death of cow:
    23.     spawn 1 cow at victim's location
    24.     set the last spawned entity's max health to 10
    25.     set the last spawned entity's health to 10
    26.     add 1 to {cow_kills.%attacker%}
    27.     attacker is a player:
    28.         give 2 exp to attacker
    29.        
    30. on death of zombie:
    31.     spawn 1 zombie at victim's location
    32.     set the last spawned entity's max health to 10
    33.     set the last spawned entity's health to 10
    34.     add 1 to {zombie_kills.%attacker%}
    35.     attacker is a player:
    36.         give 4 exp to attacker
    37.        
    38. on damage:
    39.     attacker is a player:
    40.         set {_dam} to damage * attacker's level * 0.1
    41.         set damage to damage + {_dam}
    42.        
    43.         send action bar with text "<red>+%{_dam}% dmg" to attacker
    44.        
    45. on right click on sign:
    46.     line 2 of event-block is "Warp to shop":
    47.         if {pig_kills.%player%} is greater than 9:
    48.             message "Warping to shop!"
    49.             teleport player to location(333.5, 77, 36.5)
    50.         else:
    51.             set {tmp} to (10 - {pig_kills.%player%})
    52.             message "<light red>You need %{tmp}% <light red>more pig kills to do this!"
    53.            
    54.     line 2 of event-block is "Warp to cows":
    55.         if {pig_kills.%player%} is greater than 249:
    56.             message "Warping to cows!"
    57.             teleport player to location(215.5, 72, 172.5)
    58.         else:
    59.             set {tmp} to (250 - {pig_kills.%player%})
    60.             message "<light red>You need %{tmp}% <light red>more pig kills to do this!"
    61.    
    62.     line 2 of event-block is "Warp to pigs":
    63.         message "Warping to pigs!"
    64.         teleport player to location(240.5, 70, 180.5)
    65.        
    66.     line 2 of event-block is "Warp to stone":
    67.         message "Warping to stone!"
    68.         teleport player to location(262.5, 68, 182.5)
    69.        
    70.     line 2 of event-block is "Warp to iron":
    71.         if {cow_kills.%player%} is greater than 24:
    72.             message "Warping to iron!"
    73.             teleport player to location(272.5, 68, 182.5)
    74.         else:
    75.             set {tmp} to (25 - {cow_kills.%player%})
    76.             message "<light red>You need %{tmp}% <light red>more cow kills to do this!"
    77.            
    78.     line 2 of event-block is "Warp to zombies":
    79.         if {cow_kills.%player%} is greater than 99:
    80.             message "Warping to zombies!"
    81.             teleport player to location(202.5, 64, 219.5)
    82.         else:
    83.             set {tmp} to (100 - {cow_kills.%player%})
    84.             message "<light red>You need %{tmp}% <light red>more cow kills to do this!"
    85.        
    86.     line 1 of event-block is "Wooden sword":
    87.        
    88.         player has 5 raw porkchop
    89.         remove 5 raw porkchop from player
    90.         give 1 wooden sword to player
    91.         send action bar with text "<light green>+ Wooden sword" to player
    92.        
    93.     line 1 of event-block is "Wooden pickaxe":
    94.        
    95.         player has 10 raw porkchop
    96.         remove 10 raw porkchop from player
    97.         make console execute command "/give %player% wooden_pickaxe{CanDestroy:[""minecraft:cobblestone""]} 1"
    98.         send action bar with text "<light green>+ Wooden pickaxe" to player
    99.        
    100.     line 1 of event-block is "Stone pickaxe":
    101.        
    102.         player has wooden pickaxe
    103.         player has 32 cobblestone
    104.         remove wooden pickaxe from player
    105.         remove 32 cobblestone from player
    106.         make console execute command "/give %player% stone_pickaxe{CanDestroy:[""minecraft:cobblestone"",""minecraft:iron_ore""]} 1"
    107.         send action bar with text "<light green>+ Stone pickaxe" to player
    108.        
    109.     line 1 of event-block is "Stone sword":
    110.        
    111.         player has wooden sword
    112.         player has 16 cobblestone
    113.         remove wooden sword from player
    114.         remove 16 cobblestone from player
    115.         give stone sword to player
    116.         send action bar with text "<light green>+ Stone sword" to player
    117.        
    118.     line 1 of event-block is "Iron chestplate":
    119.        
    120.         player has 32 iron ingots
    121.         remove 32 iron ingots from player
    122.         give iron chestplate to player
    123.         send action bar with text "<light green>+ Iron chestplate" to player
    124.        
    125.     line 1 of event-block is "Protection 2":
    126.        
    127.         player has 64 iron ingots
    128.         remove 64 iron ingots from player
    129.         make console execute command "/give %player% enchanted_book{StoredEnchantments:[{id:""minecraft:protection"",lvl:2s}]} 1"
    130.         send action bar with text "<light green>+ Protection 2" to player
    131.    
    132.     line 1 of event-block is "Iron sword":
    133.        
    134.         player has 32 iron ingots
    135.         player has stone sword
    136.         remove 32 iron ingots from player
    137.         remove stone sword from player
    138.         give iron sword to player
    139.         send action bar with text "<light green>+ Iron sword" to player
     
  2. Best Answer:
    Post #2 by oToghty, Oct 10, 2021
  3. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    I don't think that comes from skript, check if maybe you have a region there and they're not allowed to use signs, because that's what it does by default
     
  4. BrokOlieSoep

    BrokOlieSoep Member

    Joined:
    Oct 10, 2021
    Messages:
    3
    Likes Received:
    0
    I totally forgot about spawn protection, thank you. I just changed it, so it'll probably work now.
     

Share This Page

Loading...