agagagagagagagagag Posted August 3, 2020 Share Posted August 3, 2020 Is there any way to get the last line of lore on an item? tried a lot of things, checked docs, all answers require a newer version of skript... Any solutions you guys know? Link to comment Share on other sites More sharing options...
_Tarna_ Posted August 3, 2020 Share Posted August 3, 2020 set lore of player's tool to "%lore of player's tool%||NEW LINE" Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
agagagagagagagagag Posted August 3, 2020 Author Share Posted August 3, 2020 2 minutes ago, _Tarna_ said: set lore of player's tool to "%lore of player's tool%||NEW LINE" no, just the last line of lore. If I had an item with 5 lines of lore, I just want to get the 5th (last) line of lore. That is all of the lore. Link to comment Share on other sites More sharing options...
_Tarna_ Posted August 3, 2020 Share Posted August 3, 2020 Just now, agagagagagagagagag said: no, just the last line of lore. If I had an item with 5 lines of lore, I just want to get the 5th (last) line of lore. That is all of the lore. Oh get. The thing about just sets the last line. try like set {_a} size of (lore of player's tool split by "||") set {_s} to 1 loop {_a} times: set {_l} to line {_s} of lore of player's tool add 1 to {_s} Then use {_l}. There probably is a way easier way to get it but not sure. Try this. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
farwl Posted August 3, 2020 Share Posted August 3, 2020 very good tarna Graphic Designer - Skript Developer - Professional Builder - Content Creator Been on Minehut since January 2018. Throughout my time here I've mastered the skills you see above. I make free logos, banners, and server art for users on Minehut. I'm a proficient Skript developer. I'm also really good at building, you can see my portfolio by clicking here. Feel free to say hi if you see me somewhere Amethyst Studios Discord Link to comment Share on other sites More sharing options...
_Tarna_ Posted August 3, 2020 Share Posted August 3, 2020 4 minutes ago, farwl said: very good tarna Would the thing I said work? Or is there an easier way. You are probably better than Skript than me. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
Tres Posted August 3, 2020 Share Posted August 3, 2020 (edited) 3 hours ago, _Tarna_ said: Would the thing I said work? Or is there an easier way. You are probably better than Skript than me. If that effect worked, then you wouldnt need all that extra stuff, just line 4. However, I cant remember if that effect is a real one, so heres an alternate solution that might work: set {_split::*} to lore of player's tool split at "||" loop {_split::*}: add 1 to {_num} set {_line%loop-number%} to {_split::%loop-number%} send "The last line of the lore of player's tool is %{_line%{_num}%}%" Yes, I know this can be simplified but I'm on mobile. The skript should work anyways. Edited August 3, 2020 by Tresre Link to comment Share on other sites More sharing options...
agagagagagagagagag Posted August 4, 2020 Author Share Posted August 4, 2020 On 8/3/2020 at 12:33 AM, Tresre said: If that effect worked, then you wouldnt need all that extra stuff, just line 4. However, I cant remember if that effect is a real one, so heres an alternate solution that might work: set {_split::*} to lore of player's tool split at "||" loop {_split::*}: add 1 to {_num} set {_line%loop-number%} to {_split::%loop-number%} send "The last line of the lore of player's tool is %{_line%{_num}%}%" Yes, I know this can be simplified but I'm on mobile. The skript should work anyways. Doesn't work, says "The last line of the lore player's tool is <none>" I am holding a tool with multiple lines of lore. Link to comment Share on other sites More sharing options...
AWorthySon Posted August 4, 2020 Share Posted August 4, 2020 (edited) 8 hours ago, agagagagagagagagag said: Doesn't work, says "The last line of the lore player's tool is <none>" I am holding a tool with multiple lines of lore. Heya! That loop on the previous skript seems unnecessary. The problem is that {_num} and loop-number in that context would always be the same. You could probably get that previous skript to work if you just used {_num} instead. I made a different skript anyways, it should work perfectly fine. set {_0} to lore of player's tool set {_1::*} to split {_0} at "||" set {_0} to size of {_1::*} send "The last line of lore is line %{_0}%!" Always feel free to contact me or continue this thread if you need more help. Edited August 4, 2020 by AWorthySon Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now