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.

Dupe, Undupe

Discussion in 'Skript' started by Zybrodz, Oct 25, 2022.

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

    Zybrodz Member

    Joined:
    Oct 25, 2022
    Messages:
    1
    Likes Received:
    0
    I am not a skript dev, and i do not know how to skript so i downloaded this skript

    options:
    blacklist:
    prefix: &9[AQURISMARINE]

    command /dupe [<number>]:
    trigger:
    if {@blacklist} contains type of tool:
    send "{@prefix}"
    stop
    else:
    if arg-1 is not set:
    add player's tool to player's inventory
    stop
    else:
    if arg-1 is less than 2:
    add player's tool to player's inventory
    stop
    else:
    if arg-1 is more than 5:
    loop 6 times:
    add player's tool to player's inventory
    stop
    else:
    loop arg-1 times:
    add player's tool to player's inventory

    this is a simple dupe skript.
    what can i add to it so if an item has "&fUndupable" in its lore it cannot be duped?
     
  2. Eli83592

    Eli83592 New Member

    Joined:
    Oct 28, 2022
    Messages:
    6
    Likes Received:
    0
    if lore of player's held item contains "&fUndupable":
    send "&cError: Item is Undupable" to player
    stop
     
  3. Jake*

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    117
    Likes Received:
    6
  4. imnotfirefox

    Supporter

    Joined:
    Aug 1, 2022
    Messages:
    1
    Likes Received:
    0
    Here is my skript, i can't help with the undupe but i can help with the blacklist and make it so people can do for ex: /dupe 3 or /dupe 1000 (integers)


    Code (Text):
    1. command /dupe <int=1>::
    2.   trigger:
    3.     set {_tool} to player's tool
    4.     if {_tool} is air:
    5.       send "&8&lL1f3&c&lSee1 &8» &aYou cannot dupe air!" to player
    6.       stop
    7.     else:
    8.       if "%{_tool}%" contains "shulker box":
    9.         set {_tag} to tag "tag;BlockEntityTag;Items" of nbt compound of {_tool}
    10.         if "%{_tag}%" contains "elytra" or "trident":
    11.           send "&8&lL1f3&c&lSee1 &8» &aThis item is blacklisted." to player
    12.           stop
    13.       else:
    14.       if {_tool} is a trident or elytra:
    15.         send "&8&lL1f3&c&lSee1 &8» &aThis item is blacklisted." to player
    16.         stop
    17.     give (arg-int * item amount of player's tool) of player's tool to player
    the /dupe <int=1> Means you can do ex: /dupe 3 or /dupe 1000
    Addons used: I don't know if you need them these are just ones i use SKquery, SKbee, Skrayfall,
    Again no idea which ones you need but i use those. Tell me if any issues
     
  5. Jake*

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    117
    Likes Received:
    6
    I suggest removing skquery and skrayfall

    Code (Text):
    1. command /dupe [<int=1>]:
    2.   trigger:
    3.     if tool is air:
    4.       send "&8&lL1f3&c&lSee1 &8» &aYou cannot dupe air!" to player
    5.     else if tool is any shulker box:
    6.       set {_items::*} to tag "BlockEntityTag;Items" of nbt of tool
    7.       if (items from nbt {_items::*}) contains elytra or trident:
    8.         send "&8&lL1f3&c&lSee1 &8» &aThis shulker contains blacklisted items." to player
    9.       else:
    10.         give (arg * item amount of tool) of tool to player
    11.     else if tool is a trident or elytra:
    12.       send "&8&lL1f3&c&lSee1 &8» &aThis item is blacklisted." to player
    13.     else:
    14.       give (arg * item amount of tool) of tool to player
    if you get any errors in the line where _items::* is set then update skbee to latest
     
Thread Status:
Not open for further replies.

Share This Page

Loading...