scripts/scrGetName.gml
From spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC, shown whole under the Spelunky User License v1.1b. Extracted by spelunky.ai's tools, an unofficial fan project, one file per script or event; the // ==== lines are the extractor's, naming each action of the event. Some scripts are others' work that Derek Yu credits in the source's readme.txt: Martin Piecyk's platform engine, ChevyRay's view scaling scripts and tsg1zzn's Super Sound System.
The script scrGetName, 60 lines of GML.
//// scrGetName()//// Return a random name (for shopkeeper).///********************************************************************************** Copyright (c) 2008, 2009 Derek Yu and Mossmouth, LLC This file is part of Spelunky. You can redistribute and/or modify Spelunky, including its source code, under the terms of the Spelunky User License. Spelunky is distributed in the hope that it will be entertaining and useful, but WITHOUT WARRANTY. Please see the Spelunky User License for more details. The Spelunky User License should be available in "Game Information", which can be found in the Resource Explorer, or as an external file called COPYING. If not, please obtain a new copy of Spelunky from <http://spelunkyworld.com/> ***********************************************************************************/switch(rand(1,32)){ case 1: { return "AHKMED"; } case 2: { return "TERRY"; } case 3: { return "SMITHY"; } case 4: { return "LEON"; } case 5: { return "ALI"; } case 6: { return "ELBERT"; } case 7: { return "KAO"; } case 8: { return "DUKE"; } case 9: { return "TONY"; } case 10: { return "GUERT"; } case 11: { return "PANCHO"; } case 12: { return "EARL"; } case 13: { return "IVAN"; } case 14: { return "OLLIE"; } case 15: { return "SPOONY"; } case 16: { return "BOB"; } case 17: { return "RUDY"; } case 18: { return "JIMBO"; } case 19: { return "TOR"; } case 20: { return "WILLY"; } case 21: { return "HAMISH"; } case 22: { return "LAZLO"; } case 23: { return "WANG"; } case 24: { return "HERBIE"; } case 25: { return "ANDY"; } case 26: { return "DONG"; } case 27: { return "LEMMY"; } case 28: { return "BARNEY"; } case 29: { return "LOU"; } case 30: { return "TARN"; } case 31: { return "SLASH"; } case 32: { return "BROM"; }}return "AHKMED";