%itemstack/itemtype%'[s] lore
[the] line %number% of [the] lore of %itemstack/itemtype%
[the] line %number% of %itemstack/itemtype%'[s] lore
[the] %number%(st|nd|rd|th) line of [the] lore of %itemstack/itemtype%
[the] %number%(st|nd|rd|th) line of %itemstack/itemtype%'[s] lore```
`if lore of item contains "Sus!":`
and then i dont know if this might work but:
`replace all "sus" in lore of item with "sus"`
#question
1 messages · Page 1 of 1 (latest)
Get lore And save it to variable then replace it and then put it back as lore
replace it with?
it will just set a lore line as a empty text
I dont want to replace it guys
i want to get rid of it
let me go see then
Okey
"The lore of loop-item cannot be changed"
cannot be replaced
just tell me how to find the line index of the specific lore
?
Sec
I don't know how to do that
function you mean?
i don't know how to do functions
function replaceLore(item: item, search: string):
set {_lore::*} to lore of {_item}
replace all {_search} in {_lore::*}
set {_item}'s lore to {_lore::*}
send "replaced lore... %{_item}'s lore%" to console
that's i mean
yeah honestly i just didnt know how to do the parameters part
wait what does _search do
the "sus"
function replaceLore(item: item, search: string):
set {_lore::*} to lore of {_item}
replace all {_search} in {_lore::*}
set {_item}'s lore to {_lore::*}
send "replaced lore... %{_item}'s lore%" to console
on load:
set {_i} to iron sword named "test"
set {_i}'s lore to "testsus", "test1sus"
replaceLore({_i}, "sus")
replace all {_search} in {_lore::*} with ""
function replaceLore(item: item, search: string):
set {_lore::} to lore of {_item}
replace all {_search} in {_lore::} with ""
set {_item}'s lore to {_lore::*}
send "replaced lore... %{_item}'s lore%" to console
on jump:
set {_i} to iron sword named "&rtest"
set {_i}'s lore to "&rtestsus", "&rtest1sus"
give {_i} to player
wait 5 ticks
replaceLore({_i}, "sus")
i changed the event bc it wasnt working
but uh
its not working
but it does say
[07:40:12 INFO]: replaced lore... test and test1
in console
@fringe ingot ?
function replaceLore(item: item, search: string) :: strings:
set {_lore::*} to lore of {_item}
replace all {_search} in {_lore::*}
set {_item}'s lore to {_lore::*}
return {_item}'s lore
on load:
set {_i} to iron sword named "test"
set {_i}'s lore to "testsus", "test1sus"
send replaceLore({_i}, "sus")
no difference
except it shows in chat now the test and test1
@fringe ingot
Yes?
What should i do
i even took it out of the function and it still didnt work
I found a way to make your code work but. in doing so i was right
making the lore to just "" doesnt clear it it just makes it empty
can you show me how to delete the line index of what line the lore is on
wdym?
its a list right
with indexs
if you delete one of the indexs it deletes the lore
^
on jump:
set {_item} to stone with lore "banaana"
replace every "banaana" in lore of {_item} with ""
give {_item} to player
i cannot have empty lore bc it doesnt work with shopkeepers
well
so you can basically
set it to another?
on jump:
set {_item} to stone with lore "banaana"
replace every "banaana" in lore of {_item} with "lala"
give {_item} to player
i cannot do that xDDD
^
does not work with shopkeepers
im not remaking everything again
on load:
set {_item} to iron sword with lore "A", "B"
send removeLine("A", {_item})
function removeLine(search: String, item: itemtype) :: objects:
set {_lores::*} to {_item}'s lore
loop {_lores::*}:
if loop-value != {_serach}:
add loop-value to {_newLore::*}
return {_newLore::*}
you never said you need a remove the line
you talk all the time about replace or changing
^ "delete"
^
well sorry
^
try it
^
miss interpreted.
look im just learning and im trying to listen to your side ok
ye, i just basically have so much work
so i answering in quick time
without deep mind.
im sorry
ok it sent me a b in chat
and it gave me a sword with the lore a and b
isnt search supposed to be set to something
yes
you need to use it only for change lore
if you want return a itemtype
you may change the output
it doesnt do anything smh
sec
huh
on jump:
set {_item} to iron sword with lore "A", "B"
send removeLine("A", {_item})
function removeLine(search: String, item: itemtype) :: item:
set {_lores::*} to {_item}'s lore
loop {_lores::*}:
if loop-value != {_serach}:
add loop-value to {_newLore::*}
set {_returnItem} to {_item}
set {_returnItem}'s name to {_item}'s name
set {_returnItem}'s lore to {_newLore::*}
return {_returnItem}
nope
bro im not stupid at all
so i rlly don't understood why you came for help.... without actually listening
i didnt say you're stupid
you just didnt show me it right
well