I don't understand why print and similar commands are even needed.
RedHeavenHero, so I know part of the name, everything except the large number? All that remains is to figure out if Lua can analyze the contents of strings.
The essence of the task is as follows: a treasure is generated periodically in a certain location. If the player has not yet picked up the previous one, a new one should not be generated. Accordingly, I planned to check for its presence by script name.