PUPPET Jughead LOGIN: " has arrived!" LOGOUT: " says 'Hasta la vista, Baby!'" APPEAR: "" DISAPPEAR: "" OVERFLOW: HARAKIRI NEWOWNER: NO CITYCHAT: NO CASESENSITIV: NO OWN: NO INFO: "I live in /room C10-160 with snoozefest. I can create a list of games in any town for your .prop file (default = EnglishTown). See http://snipurl.com/BSWGameRooms for the most recent list (max 99 games listed there). Come visit me at /room C10-160, and type '@help' for more information. Thanks to /dev/joe, NaokiAobi, and TheBoomer for helping me (snoozefest) with some programming issues." SAVE: "Jughead" #SAVE1-90 - names of last 90 puppet users #SAVE91 - counter of names recorded #SAVE92 - total users since server restart #SET SAVE93 - month last run #SET SAVE94 - date last run #SET SAVE95 - year last run #SET SAVE96 - hour last run #SET SAVE97 - min last run #SAVE98 - flag if kicked #SAVE99 - user name of kicker @getgames: findgamerooms @getusers: userinfo @goaway: stopnexit @help: intro @helprp: realhelp ACTION start WHEN KEYWORD "getgames" DO findgamerooms WHEN KEYWORD "getusers" DO userinfo WHEN KEYWORD "goaway" DO stopnexit WHEN KEYWORD "help" DO intro WHEN KEYWORD "helprp" DO realhelp WHEN KICKED DO kicked # To add a new game, just add it to the lists below. # Also, make sure the ETmaxroomnumber is set correctly! EVAL ETmaxroomnumber = 800 # Highest number game room in ET # Old Puerto Rico rooms kept their [GAME] name, but are actually Pillars of the Earth # Add new games at the front of the first 2 items, below (actual BSW name first, then English name). # Add the English name to the 3rd item (englishgamelistalpha), IN ALPHABETICAL ORDER EVAL gamelist = "Numeri Pandemie SchutzDerBurg Wikinger Kingsburg Dominion Dog Stoneage Wizard AufAchse Imperial 6nimmt AllesImEimer Attika Attribut Backgammon Bazaar Bluff Bohnanza BohnDuell CafeInternational CantStop Carcassonne Caylus CCErweiterung CCHuB CCJuS Cartagena Clans Diamant Doko Doppelkopf Dudeln Dvonn EinfachGenial Emerald FinstereFlure Fuersten Funkenschlag FussballLigretto Geister Go Halali Heckmeck Intrige KingLui KUK Ligretto LostCities Manhattan Manitou Medina Meuterer Niagara NotreDame OhneFurchtUndAdel Packeis ParisParis PiranhaPedro PuertoRico RA SaeulenDerErde SanJuan SanktPetersburg SchrilleStille Siedler Sticheln StreetSoccer ThurnUndTaxis Tichu Tongiaki TopRace Transamerica TurnIt UmKroneUndKragen Vabanque Venedig Verraeter Verflixxt Yinsh" EVAL englishgamelist = "Numeri Pandemic Castle_for_all_Seasons Vikings Kingsburg Dominion Dog Stone_Age Wizard Convoy Imperial 6_Nimmt! Bucket_King Attika Attribute Backgammon Bazaar Bluff Bohnanza Cups Cafe_International Can't_Stop! Carcassonne Caylus Carc_Inns_and_Cathedrals Carc_Traders_and_Builders Carc_Hunters_and_Gatherers Cartagena Clans Diamant Doko Double_Sheepshead Dictionary Dvonn Ingenious Emerald Fearsome_Floors Princes_of_Florence Power_Grid Fussball_Ligretto Ghosts! Go Tally_Ho! Pickomino Intrigue King's_Breakfast Web_of_Power Ligretto Pandemic Manhattan Manitou Medina Meuterer Niagara Notre_Dame Citadels Hey!_That's_My_Fish! Paris_Paris Piranha_Pedro Pillars_of_the_Earth Pandemic Pillars_of_the_Earth San_Juan St_Petersburg Schrille_Stille Settlers_of_Catan Sticheln StreetSoccer Thurn_and_Taxis Tichu Tongiaki Top_Race TransAmerica Memory To_Court_the_King Vabanque Venedig Verraeter That's_Life! Yinsh" EVAL englishgamelistalpha ="6_Nimmt! Attika Attribute Backgammon Bazaar Bluff Bohnanza Bucket_King Cafe_International Can't_Stop! Carcassonne Carc_Hunters_and_Gatherers Carc_Inns_and_Cathedrals Carc_Traders_and_Builders Cartagena Castle_for_all_Seasons Caylus Citadels Clans Convoy Cups Diamant Dictionary Dog Doko Dominion Double_Sheepshead Dvonn Emerald Fearsome_Floors Fussball_Ligretto Ghosts! Go Hey!_That's_My_Fish! Imperial Ingenious Intrigue King's_Breakfast Kingsburg Ligretto Lost_Cities Manhattan Manitou Medina Memory Meuterer Niagara Notre_Dame Numeri Pandemic Paris_Paris Pickomino Pillars_of_the_Earth Piranha_Pedro Power_Grid Princes_of_Florence Ra St_Petersburg San_Juan Schrille_Stille Settlers_of_Catan Sticheln Stone_Age StreetSoccer Tally_Ho! That's_Life! Thurn_and_Taxis Tichu To_Court_the_King Tongiaki Top_Race TransAmerica Vabanque Venedig Verraeter Vikings Web_of_Power Wizard Yinsh" EVAL numgames = LISTLENGTH [gamelist] IF [SAVE98] == 1 #tell snoozefest if someone has kicked Jughead BEGIN >> /tell snoozefest I was kicked by [SAVE99] SET SAVE98 0 SET SAVE99 NULL END >> /room C10-160 #my house in ET >> /tell snoozefest Starting up now. I know of [numgames] games: >> /tell snoozefest German: [gamelist] >> /tell snoozefest English: [englishgamelist] >> /tell snoozefest English, alphabetical: [englishgamelistalpha] #look for where in gamelist the "M" games start EVAL MStart = 0 EVAL x = 1 WHILE [x] <= [numgames] BEGIN EVAL j = [x] ELEMENTOF [englishgamelistalpha] >> /tell snoozefest Searching for the first 'M' game: [j] IF [j] STARTSWITH "M" BEGIN EVAL MStart = [x] EVAL x = [numgames] + 1 END EVAL x = [x] + 1 END #reset PUBLIC array EVAL y = 0 WHILE [y] < 100 BEGIN EVAL y = [y] + 1 SET PUBLIC[y] "" END >> /tell snoozefest OK, I am ready! Type 'help' for more information. DO intro END ACTION findgamerooms #jump to all rooms, looking for games in gamelist IF EXISTS PARAM AND LISTLENGTH [PARAM] == 2 BEGIN EVAL town = 1 ELEMENTOF [PARAM] EVAL maxroomnumber = 2 ELEMENTOF [PARAM] END ELSE BEGIN EVAL town = 10 EVAL maxroomnumber = [ETmaxroomnumber] END DO trackusers #record who uses the puppet EVAL x = 0 # x tracks current room location EVAL y = 0 EVAL searchlimit = [maxroomnumber] + 1 >> /tell [WHO] [WHO], I am going to list the game rooms from C[town]-0 to C[town]-[maxroomnumber]. Here I go! # search loop WHILE [x] < [searchlimit] #start search loop BEGIN >> /room C[town]-[x] GETROOMINFO IF [ROOM] == "C[town]-[x]" # actually moved to target NEW room? BEGIN IF [GAME] INLIST [gamelist] #found room with legit game! BEGIN EVAL gameroomname = [GAME] DO getenglishname IF [match] == 1 BEGIN # found English match therefore single game DO assignsortnum #for sorting and assigning menu label DO calcroomnum EVAL foundgameroom[y] = "MenuRooms|[menulabel]-[englishgamename]-Rm[roomnum]=*/game [ROOM]" >> /tell [WHO] MenuRooms|[menulabel]-[englishgamename]-Rm[roomnum]=*/game [ROOM] SET PUBLIC[y] "MenuRooms|[menulabel]-[englishgamename]-Rm[roomnum]=*/game [ROOM]
" SET POS[y] [k] END # end of single room processing ELSE BEGIN # a room with multiple games: ET room (games): 143(3), 225(6), 343(3) SET multigamerooms [GAME] EVAL numgamerooms = LISTLENGTH [multigamerooms] WHILE [numgamerooms] > 0 # loop through multigame list BEGIN EVAL gameroomname = [numgamerooms] ELEMENTOF [multigamerooms] DO getenglishname DO assignsortnum #for sorting and assigning menu label DO calcroomnum SET foundgameroom[y] "MenuRooms|[menulabel]-[englishgamename]-Rm[roomnum]=*/game [ROOM]-[numgamerooms]" >> /tell [WHO] [foundgameroom[y]] SET PUBLIC[y] "[foundgameroom[y]]
" SET POS[y] [k] EVAL numgamerooms = [numgamerooms] - 1 END # end of while loop through multigame list END # end of multiple games processing END # end of found room with legit game END # end of if-then if found a NEW room EVAL x = [x] + 1 END #end of search while loop >> /tell [WHO] --------------- >> /tell [WHO] I found [y] game rooms. I am going home now >> /tell [WHO] to alphabetize this list! >> /tell [WHO] >> /tell [WHO] This was run number [SAVE92]. >> /room C10-160 EVAL lastplace = [y] WHILE [lastplace] > 1 # sort rooms alphabetically BEGIN >> /tell [WHO] ... sorting [lastplace] ... EVAL maxletter = [lastplace] #marker for which PUBLIC1-99 is last alphabetically (100=date of search) EVAL x = 1 WHILE [x] < [lastplace] BEGIN IF [POS[x]] > [POS[maxletter]] SET maxletter [x] EVAL x = [x] + 1 END SET temp1 [POS[maxletter]] SET temp2 [PUBLIC[maxletter]] SET temp3 [foundgameroom[maxletter]] SET POS[maxletter] [POS[lastplace]] SET POS[lastplace] [temp1] SET PUBLIC[maxletter] [PUBLIC[lastplace]] SET PUBLIC[lastplace] [temp2] SET foundgameroom[maxletter] [foundgameroom[lastplace]] SET foundgameroom[lastplace] [temp3] EVAL lastplace = [lastplace] - 1 END GETDATE SET SAVE93 [MONTH] SET SAVE94 [DAY] SET SAVE95 [YEAR] SET SAVE96 [HOUR] SET SAVE97 [MIN] SET z [y] IF [z] > 99 EVAL z = 99 SET PUBLIC[[z]+1] "# This lists the first [z] game rooms from C[town]-0 to C[town]-[maxroomnumber]. It is current as of [SAVE93]-[SAVE94]-[SAVE95], at [SAVE96]:[SAVE97] (GMT +1)" SAVEPUBLIC >> /tell [WHO] --------------- >> /tell [WHO] Here's the complete list, in alphabetical order: SET x 1 WHILE [x] <= [y] BEGIN >> /tell [WHO] [foundgameroom[x]] EVAL x = [x] + 1 END >> /tell [WHO] >> /tell [WHO] This list (up to the first 99 rooms) is also saved at: >> /tell [WHO] . http://snipurl.com/BSWGameRooms OR >> /tell [WHO] . http:/213.155.73.107/Client/puppetSave/Jughead.data >> /tell [WHO] Remember to remove all non-English characters (like u umlaut >> /tell [WHO] & the beta-looking letter) before putting it into your .prop file. >> /tell [WHO] >> /tell [WHO] FYI: I regularly update a copy of the .prop file, the contents of >> /tell [WHO] which you can simply copy/paste into your own .prop. You will find >> /tell [WHO] it at http://www.boardgamegeek.com/article/90993 >> /tell [WHO] >> /tell [WHO] I hope this is helpful! And remember, snoozefest will >> /tell [WHO] appreciate those BGG thumbs and Geekgold tips ;) ! >> /tell [WHO] >> /tell [WHO] See you next time! >> /tell [WHO] --------------- END # end of ACTION ACTION getenglishname EVAL match = 0 EVAL translate = 1 WHILE [translate] <= [numgames] BEGIN EVAL germanname = [translate] ELEMENTOF [gamelist] IF [gameroomname] == [germanname] BEGIN EVAL englishgamename = [translate] ELEMENTOF [englishgamelist] EVAL match = 1 #record that match was found EVAL translate = 10000 #exit loop when match found END EVAL translate = [translate] + 1 END END # end of ACTION ACTION assignsortnum #assign number for the sort; based on the [englishgamelistalpha] EVAL i = 1 EVAL match = 0 WHILE [match] == 0 BEGIN EVAL j = [i] ELEMENTOF [englishgamelistalpha] IF [englishgamename] == [j] BEGIN SET k [i] SET match 1 #exit loop when match found END EVAL i = [i] + 1 END EVAL y = [y] + 1 #y is counter for PUBLIC variable, for web page IF [k] < [MStart] #divide into 2 menus, 0-L and M-Z SET menulabel "0L" ELSE SET menulabel "MZ" END # end of ACTION ACTION calcroomnum EVAL roomlength = LENGTH [ROOM] #remove C10- part of location EVAL i = 0 EVAL foundhyphen = 0 WHILE [foundhyphen] == 0 BEGIN EVAL i = [i] + 1 #will mark where hyphen is in C10-__ EVAL scanChar = [i] CHAROF [ROOM] IF [scanChar] == "-" EVAL foundhyphen = 1 END EVAL roomnum = 0 WHILE [i] <= [roomlength] BEGIN EVAL i = [i] + 1 EVAL scanChar = [i] CHAROF [ROOM] EVAL roomnum = [scanChar] + (10 * [roomnum]) END END # end of ACTION ACTION trackusers EVAL SAVE92 = [SAVE92] + 1 #counts number of times run IF [SAVE91] < 90 #keeps track of names of last 90 users BEGIN EVAL SAVE91 = [SAVE91] + 1 SET SAVE[SAVE91] [WHO] END END # end of ACTION ACTION userinfo #summary of puppet users >> /tell [WHO] ----- [SAVE92] total users since server restart IF [WHO] == snoozefest AND [SAVE91] > 0 BEGIN >> /tell [WHO] ----- [SAVE91] names recorded since last run WHILE [SAVE91] > 0 BEGIN >> /tell [WHO] ---------- [SAVE91]. [SAVE[SAVE91]] EVAL SAVE91 = [SAVE91] - 1 END >> /tell [WHO] ----- User name data reset. END END # end of ACTION ACTION intro >> /tell [WHO] ----- Intro ----- >> /tell [WHO] Hello. My name is Jughead. I can help you get a list of all the >> /tell [WHO] gamerooms in a town, for your .prop file. The last time I >> /tell [WHO] did this was on [SAVE93]/[SAVE94]/[SAVE95], at [SAVE96]:[SAVE97] (GMT +3). You can >> /tell [WHO] see that data at: >> /tell [WHO] . http:/213.155.73.107/Client/puppetSave/Jughead.data >> /tell [WHO] I will normally make a list for my home city, EnglishTown, >> /tell [WHO] when you type @getgames in the main window. If you want a list >> /tell [WHO] for a different city, type @getgames {city#} {highest game room number} >> /tell [WHO] in the _MAIN WINDOW_. For example, @getgames 113 53 for C113. >> /tell [WHO] >> /tell [WHO] If you want to have me get data now, type @getgames; I will >> /tell [WHO] send you a /tell with the list of game rooms. Just remember that >> /tell [WHO] it will take me several minutes to finish making the list. >> /tell [WHO] Also, you will have to reformat (find/replace) to remove all >> /tell [WHO] non-English characters for the client to work correctly. >> /tell [WHO] >> /tell [WHO] If I cause any problems, please contact snoozefest. You can >> /tell [WHO] send a private /tell (if he is online), or just leave a >> /tell [WHO] message with Archie: >> /tell [WHO] . /tell Archie {opens a tell to Archie} >> /tell [WHO] . @send snoozefest >> /tell [WHO] ----------------- END # end of ACTION ACTION realhelp >> /tell snoozefest ----- Commands ----- >> /tell snoozefest @getgames - send Jughead to get game info. >> /tell snoozefest For other (not EnglishTown) cities, include >> /tell snoozefest the city, and the highest room number (e.g., >> /tell snoozefest "@getgames 91 15" for C91, up to room 15) >> /tell snoozefest getusers - user names, numbers; reset counter >> /tell snoozefest goaway - Jughead quits >> /tell snoozefest help - basic help >> /tell snoozefest helprp - this list (all commands) >> /tell snoozefest all of the above are also @ commands >> /tell snoozefest last run: [SAVE93]/[SAVE94]/[SAVE95], at [SAVE96]:[SAVE97] (GMT +3) >> /tell snoozefest URL - http://snipurl.com/BSWGameRooms, which is: >> /tell snoozefest http:/213.155.73.107/Client/puppetSave/Jughead.data >> /tell snoozefest -------------------- END # end of ACTION ACTION kicked SET SAVE98 1 SET SAVE99 [WHO] IF [WHO] != snoozefest BEGIN GETDATE >> /tell [WHO] Please don't kick me - I'm a friendly puppet ... I only want >> /tell [WHO] to help people! If I've behaved badly, please leave a message >> /tell [WHO] for snoozefest with Archie: >> /tell [WHO] . /tell Archie >> /tell [WHO] . @send snoozefest >> /tell [WHO] Bye bye! >> /tell snoozefest [WHO] just kicked me out! >> /tell Archie @send snoozefest [WHO] kicked me out on [MONTH]/[DAY]/[YEAR], at [HOUR]:[MIN] END HARAKIRI END # end of ACTION ACTION stopnexit >> /tell [WHO] I'll be back ... bye! HARAKIRI END # end of ACTION PUPPETEND