Skript with modded items

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

Erko

Member
Aug 2, 2023
2
0
1
24
Hi,

I want to check if player has some modded item and give some item
Here is an example code

Code:
command /example:
  trigger:
    set metadata tag "example" of player to chest inventory with 3 rows named "example"
    set {_item1} to "TAC_M92FS" #Here I tried to set gui slot 0 to modded item
    set slot 0 of metadata tag "gunstore" of player to {_item1} named "&a&lexample"
    open (metadata tag "example" of player) to player
on inventory click:
  event-inventory = (metadata tag "example" of player):
    cancel event
    index of event-slot = 0:
      if player has 10 modded_coins: #Here it checks for an item
        give {_item1} to player
        close inventory of player
 
idk much about modded items but you set a slot in an inventory you didn't declare or use (gunstore). Also you set {_item1} to a string and idk if skript has item casting.
 
gunstore I replaced with example so gunstore shouldn't be there, but everything works but I can't put there modded item. If I try to get name of modded item, and put it to code it gives error.