Solved Set variable to lore of item

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

Status
Not open for further replies.

Squarebuilder

Member
Aug 6, 2020
10
0
1
23
Hello,

for one of my scripts I have to set a variable on the lore of an item. Does anyone know how to do that?

Code:
on right-click:
    set {_variable} to lore of event-item

Error Code: {_variable} can only be set to an object, not more.
view

FK5RNxW
 
Last edited:
Lore of item is a array so you would need to do:
Code:
loop lore of player's held item:
  if loop-value is "confusion 1":
    set {_confusion} to 1
  #etc
 
  • Like
Reactions: Squarebuilder
Or just
Code:
set {_lore::*} to lore of event-item
Where each element is a line of the lore
 
Status
Not open for further replies.