Advertisement
HR_Shaft

Redneck Name Generator v1 for Phasor v2

Apr 29th, 2014
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.54 KB | None | 0 0
  1. --[[ ### Redneck Name Generator v1 ###]]--
  2. --[[ ### for Phasor v2 by H® Shaft ###]]--
  3.  
  4. -- When a player joins the server, they are assigned a random Redneck Name for the duration of each game.
  5. -- 132 possible male/female names: such as "Cletus", "Cleon", "Billy Bob" or "Larlene", "Lilah", "Savannah", etc
  6. -- If a team game, then every other joining player will be assigned a male, then a female name.
  7. -- If a free-for-all game, joining player will be randomly assigned a any name.
  8. -- Names will reset between games, and all players given a randomly selected new name. Names show in chat and on scoreboard.
  9.  
  10. -- don't edit --
  11. cur_players = 0
  12. team_play = false
  13.  
  14. function GetRequiredVersion()
  15.     return 200
  16. end
  17.  
  18. function OnScriptLoad(process, game, persistent)
  19.     if game == true or game == "PC" then
  20.         GAME = "PC"
  21.         gametype_base = 0x671340
  22.         network_base = 0x745BA8
  23.     else
  24.         GAME = "CE"
  25.         gametype_base = 0x5F5498
  26.         network_base = 0x6C7988
  27.     end
  28.     cur_players = readword(network_base, 0x1A0)
  29.     if getteamplay() == true then team_play = true else team_play = false end
  30. end
  31.  
  32. function OnNewGame(map)
  33.     if GAME == "PC" then
  34.         gametype_base = 0x671340
  35.         network_base = 0x745BA8
  36.     elseif GAME == "CE" then
  37.         gametype_base = 0x5F5498
  38.         network_base = 0x6C7988
  39.     end
  40.     cur_players = readword(network_base, 0x1A0)
  41.     if getteamplay() == true then team_play = true else team_play = false end
  42. end
  43.  
  44. function getteamplay()
  45.     if readbyte(gametype_base + 0x34) == 1 then
  46.         return true
  47.     else
  48.         return false
  49.     end
  50. end
  51.  
  52. function OnNameRequest(hash, name, new_name)
  53.     if team_play then
  54.    
  55.         if cur_players == 0 or cur_players == 2 or cur_players == 4 or cur_players == 6 or cur_players == 8 or cur_players == 10 or cur_players == 12 or cur_players == 14 or cur_players == 16 then
  56.             -- 64 male names
  57.             local malenames = {"Beau", "Bobby Joe", "Bodean", "Bubba", "Buck", "Cletus", "Cleon", "Billy Bob", "Beauford", "Jethro", "Orville", "Joe Bob", "Bucephelus", "Wilford", "Clyde",
  58.             "Delmont", "Duke", "Eustice", "Earl", "Floyd", "Forrest", "Jim Bob", "Jimmy Don", "John Boy", "Otis", "Pervis", "Roscoe", "Saggory", "Rufus", "Tiberius", "Billy Bo Bob",
  59.             "Cooter", "Elrod", "Jed", "Jebediah", "Junior, Jr.", "Bubba, Jr.", "Gunther", "Abner", "Barney", "Cal", "Chester", "Cy", "Cyrus", "Gus", "Homer", "Ike", "Jasper", "Jeb", "Jethro",
  60.             "Lem", "Luke", "Wilbur", "Willie", "Zeb", "Zed", "Zeke", "Hayseed", "Big Daddy", "West", "Les", "Meatloaf", "Uncle Ben", "Tucker"}
  61.            
  62.             local namescount = #malenames
  63.             local rand_name = getrandomnumber(1, namescount+1)
  64.             new_name = string.format("%s",  malenames[rand_name])
  65.             table.remove(malenames, rand_name)
  66.            
  67.         elseif cur_players == 1 or cur_players == 3 or cur_players == 5 or cur_players == 7 or cur_players == 9 or cur_players == 11 or cur_players == 13 or cur_players == 15 then
  68.             -- 68 female names
  69.             local femalenames = {"Ellie Mae", "Sue Ellen", "Earlene", "Bertha", "Peggy Sue", "Daisy Mae", "Henrietta", "Annabelle", "Bambi", "Betty Jo", "Betty Lou", "Billie Jean", "Bobbie Sue",
  70.             "Buffy", "Claudette", "Delilah", "Georgette", "Jaylnn Jo", "Jozelle", "Hattie", "Layla", "Linda Sue", "Martha-Mae", "Roxxy", "Peach", "Patty Sue", "Shaneyney", "Trixibelle",
  71.             "Waynelle", "Beaula", "Brandine", "Larlene", "Lilah", "Savannah", "Shelbylyn", "Lula", "Ronda", "Cherry", "Shawnda", "Vonda", "Destiny", "Claudine", "Dreama", "EvaJo", "Faylene",
  72.             "Gracelyn", "January", "Jazlean", "Kaylin", "Loribelle", "Misty Dawn", "Norma", "Raylene", "Rubyjane", "Sapphire", "Sheena", "Summer", "Sunset", "Tabitha", "Vanity", "Kandy",
  73.             "Erneshia", "Jicelle", "Mandy Lynn", "Misty Rain", "Amaleen", "Baylie", "Brittney"}
  74.            
  75.             local namescount = #femalenames
  76.             local rand_name = getrandomnumber(1, namescount+1)
  77.             new_name = string.format("%s",  femalenames[rand_name])
  78.             table.remove(femalenames, rand_name)
  79.            
  80.         end
  81.        
  82.     else           
  83.         -- 132 male and female names   
  84.         local anynames = {"Beau", "Bobby Joe", "Bodean", "Bubba", "Buck", "Cletus", "Cleon", "Billy Bob", "Beauford", "Jethro", "Orville", "Joe Bob", "Bucephelus", "Wilford", "Clyde",
  85.         "Delmont", "Duke", "Eustice", "Earl", "Floyd", "Forrest", "Jim Bob", "Jimmy Don", "John Boy", "Otis", "Pervis", "Roscoe", "Saggory", "Rufus", "Tiberius", "Billy Bo Bob", "Bubba, Jr.",
  86.         "Cooter", "Elrod", "Jed", "Jebediah", "Junior, Jr.", "Bubba, Jr.", "Gunther", "Ellie Mae", "Sue Ellen", "Earlene", "Bertha", "Peggy Sue", "Daisy Mae", "Henrietta", "Annabelle", "Bambi", "Betty Jo",
  87.         "Betty Lou", "Billie Jean", "Bobbie Sue", "Buffy", "Claudette", "Delilah", "Georgette", "Jaylnn Jo", "Jozelle", "Hattie", "Layla", "Linda Sue", "Martha-Mae", "Roxxy", "Peach", "Tucker",
  88.         "Patty Sue", "Shaneyney", "Trixibelle", "Waynelle", "Beaula", "Brandine", "Larlene", "Lilah", "Savannah", "Shelbylyn", "Lula", "Abner", "Barney", "Cal", "Chester", "Cy", "Cyrus", "Gus", "Homer",
  89.         "Ike", "Jasper", "Jeb", "Jethro", "Lem", "Luke", "Wilbur", "Willie", "Zeb", "Zed", "Zeke", "Hayseed", "Big Daddy", "West", "Les", "Meatloaf", "Uncle Ben", "Ronda", "Cherry", "Shawnda", "Vonda",
  90.         "Destiny", "Claudine", "Dreama", "EvaJo", "Faylene", "Gracelyn", "January", "Jazlean", "Kaylin", "Loribelle", "Misty Dawn", "Norma", "Raylene", "Rubyjane", "Sapphire", "Sheena", "Summer", "Sunset",
  91.         "Tabitha", "Vanity", "Kandy", "Erneshia", "Jicelle", "Mandy Lynn", "Misty Rain", "Amaleen", "Baylie", "Brittney"}
  92.        
  93.         local namescount = #anynames
  94.         local rand_name = getrandomnumber(1, namescount+1)
  95.         new_name = string.format("%s",  anynames[rand_name])
  96.         table.remove(anynames, rand_name)
  97.    
  98.     end    
  99.    
  100.     return true, new_name
  101. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement