For future reference: "set volume" comes from the Standard Additions set of script commands, which has several types of utility functions for this sort of thing (system settings, filesystem access, et al). You can use the Library (in Script Editor's Window menu), or drag items from /System/Library/ScriptingAdditions onto Script Editor's icon to see more built-in commands.