Hello there!
I have a complicated problem involving Signs, which have a character limit of 16.
I'm putting item names on the signs (some which do not fit) so I've created aliases for some item names, such as blackbrck dbslab = polished_blackstone_brick_slab and this works fine for players to input onto signs. Skript can recognize the material based on the alias name (this part works!)
Now the problem: When skript tries to put the material name back ONTO THE SIGN, it replaces the alias name with the material's proper name (at least as much will fit). This is where I run into problems. How can I make Skript use the alias name instead of the material name?
Basic Skript and SkBee only.
Modified snippet from my code, original Skript is some 500 lines long...
When I set the sign material to something simple, like "stone" it works just fine. But when the name is longer than the sign, it fails to register it the second time. I have it setting the material to a variable, however this is not functional in this case because the material can change and the sign must read it dynamically. If the material is not set on the sign, it will automatically input the material detected.
I have a complicated problem involving Signs, which have a character limit of 16.
I'm putting item names on the signs (some which do not fit) so I've created aliases for some item names, such as blackbrck dbslab = polished_blackstone_brick_slab and this works fine for players to input onto signs. Skript can recognize the material based on the alias name (this part works!)
Now the problem: When skript tries to put the material name back ONTO THE SIGN, it replaces the alias name with the material's proper name (at least as much will fit). This is where I run into problems. How can I make Skript use the alias name instead of the material name?
Basic Skript and SkBee only.
Modified snippet from my code, original Skript is some 500 lines long...
Code:
on rightclick:
event-block is signs # alias for all sign types
set {_sign} to event-block
set {_matcheck} to 1st line of block at {_sign} parsed as item
if {materials::*} contains {_matcheck}:
set {signmat} to {_matcheck}
set 1st line of block at {_sign} to "%{signmat}%"
When I set the sign material to something simple, like "stone" it works just fine. But when the name is longer than the sign, it fails to register it the second time. I have it setting the material to a variable, however this is not functional in this case because the material can change and the sign must read it dynamically. If the material is not set on the sign, it will automatically input the material detected.