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 How to rename an item in inventory "not holding it"

Discussion in 'Skript' started by Fuenzy, Mar 4, 2021.

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

    Fuenzy Member

    Joined:
    Nov 28, 2020
    Messages:
    4
    Likes Received:
    0
    How do I rename an item in someone's inventory even if they aren't holding it?
    It's as simple as it says.


    every 4 seconds:
    if {gamestatus} is true:
    loop all players:
    {speedrunner} is a player:
    loop-player isn't {speedrunner}:
    world of loop-player is world of {speedrunner}:
    {speedrunner} is online:
    loop-player is holding compass:
    set name of loop-player's tool to "&3"
    wait a tick
    set name of loop-player's tool to "&cPing"
    set the loop-player's compass target to location of {speedrunner}



    every tick:
    if {gamestatus} is true:
    loop all players:
    loop-player is not holding compass:
    ###here i want to rename any compass in inventory with "Compass"

    Minecraft version 1.16.5
    Skript: 2.5.3

    Addons:
    Skellet
    skRayFall
    SkStuff
     
    #1 Fuenzy, Mar 4, 2021
    Last edited: Mar 4, 2021
  2. Best Answer:
    Post #2 by Marc, Mar 6, 2021
  3. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    please use [.CODE] and [./CODE] and paste your code between those, (Ofc remove the periods)

    Code (Text):
    1. every 4 seconds:
    2.     if {gamestatus} is true:
    3.         loop all players:
    4.             {speedrunner} is a player:
    5.                 loop-player isn't {speedrunner}:
    6.                     world of loop-player is world of {speedrunner}:
    7.                         {speedrunner} is online:
    8.                             loop-player is holding compass:
    9.                                 set name of loop-player's held item to "&3"
    10.                                 wait 1 second
    11.                                 set name of loop-player's held item to "&cPing"
    12.                                 set loop-player's compass target to location of {speedrunner}
    13.  
    14.  
    15.  
    16. every 3 seconds in "world":
    17.     if {gamestatus} is true:
    18.         loop all players:
    19.             loop loop-player's inventory:
    20.                 loop-player is not holding compass:
    21.                     set name of loop-value-2 to "Compass"
    22.  
     
Thread Status:
Not open for further replies.

Share This Page

Loading...