I am doing a fashion and for its efficiency need one script. Here's an example I create forge iron sword and he falls to me in the default inventory, and I need it to be automatically replaced by glass. As I understand the script should be:
[Script name]
[Variables]
Event [What is there to write I do not know]
if [if YY is an iron sword then it must be replaced by glass]
endif
EndEvent
I need the script to be independent of activators, I need to make it act spontaneously.
PS. I am Ukrainian. I don't speak English. I use Google Translator.