This is a sample prog that uses the “interup_override” function to override existing commands in-game in order to make a prog trigger. For example, if someone wants to “take” an object, but you’d rather something else happen when they try, then you would “override” that command.
if strarg *1.s "take" or strarg *1.s "touch" or strarg *1.s "get" if strarg *2.s "web" or strarg *2.s "spider" prog echoat @n You attempt to grab @j but it disintegrates in your hand. prog echoaround @n @n attempts to grab @j but it disintegrates in their hand. prog otransfer @j 100 prog abort break endif endif
This prog basically overrides the “take”, “get” and “touch” commands so that this prog is triggered to go off instead. The SECOND strarg (or second command) is what you want them to take, get, or touch, so like the object keywords that you want them to utilize to trigger the command.
After the commands are established, we then decide what we want to happen. For this particular prog, the prog echos a message to the person grabbing the item and also a slightly different worded message to those in the same room.
Once the echos are complete, the prog then transfers the object out of the room (by default, room 100 is fine for junk) and completes.