Hello all,
I've been working a little big with a trigger to automatically capture clan members within the mud that I partake in (wotmud). Basically the idea I want is when I do a 'view clan <xxx>' it will list the clan and then take each member of that clan and add it to a Key Value variable with the Key being the character and the value being the clan:
Character = White Tower
Chraracter2 = Lion Warden
Like that. The issue I will have tho that the clan list can obviously be variable in length with the largest one being a couple of pages. Here is an example of the longest one:
Code: |
view clan white tower
-- White Tower Members --
Rank 1 Fledgling Novice
Mournie, Jiana, Elvira, Kierra, Cathlynn, Celiea, Asheria, Laetha
Rayne Sauscony, Darlana, Kisandra, Brea, Rukia, Serlla, Seraphim, Gale
Susan Isira, Temari, Aedrin, Helen, Adriana, Lierra, Isaine, Sira, Zaira
Tamblyn Hadley, Alvana, Meriwin, Genei, Ellene, Janet, Ketti, Mallory
Dayair Saphyre, Diotima, Karina, Tyeine, Kafka, Kaitlin, Aliese, Chasity
Adreana Tamara, Terria, Arianna, Liandhde, Ailein, Movralei, Jaine, Edda
Taija Tuin, Jaime, Madeline, Kice, Tyza, Atressa, Jelanna, Liandra
Carmella Miendra, Amaranth, Abalonia, Elisende, Shekure, Lyria, Noellyn
Adrianna Madelyn, Karolyn, Kailynna, Edana, Cherri, Elarein, Abigail, Loira
Laritas Devi, Aideen, Ele, Fien, Nilli, Eveline, Carai
Rank 2 Wearied Novice
Narai, Cameo, Zerna, Mahogany, Sandara, Bellatrix, Rixie, Cresiana
Taya Daenara, Philionemia, Abby, Yachiru, Cya, Iteshtest, Sena, Kushina
Suffa Asandra, Merwyn, Faith, Melete, Erulisse, Beldam, Eviale
Desdemonea Valince, Everesta, Dorles, Ariella, Fauna, Nora, Fashara, Grainne
Medina Scarlette, Firenze, Alice, Lina, Juzlyn, Arrietty, Tarsha, Auril
Lenora Saelyn, Nissa, Marlett, Ysara, Jelena, Kerie, Trena, Alanah
Calipso Merilin, Lysin, Aedwyn, Alaia, Conice, Kirsty, Joe, Ylsa
Rank 3 Journey Accepted
* Press <Return> to continue, q to quit *>
Elasande, Kylana, Calisto, Isendre, Kristyn, Taetem, Bellina
Miserie Catilann, Inanna, Jame, Rhiannon, Adelle, Delunei, Sarai, Zarina
Calla Kaiya, Patience, Calaway, Saleen, Meliine, Alaysha, Nevirha, Cindy
Wyn Aska, Cerelle, Sharon, Tesolin, Nynoa, Cally, Arianne, Niv
Chesmerima Bianca, Samphere, Kirsten, Sansa, Rosey, Tamrutamallinen, Alexia
Corianna Colby, Aneirron, Synli, Xephria, Candi, Ayna, Evie, Starr, Arythia
Niszane Delilah, Ri, Vaia, Artemis, Alidia, Lania, Yysorha, Evee, Rylai
Youmu Anniah, Kalinia, Jubilee, Caillean, Nayama, Jocelyn, Roisin, Finley
Emia Tamra, Jomin, Galowyn, Tlaloctest, Terry, Vorona, Seraphine
Julianna Yasmi, Madari, Eva, Talinia, Cate, Verna, Derana, Ulga, Livae
Sarinda Nari, Ciciera, Shiera, Jeia, Ellannya, Celestine, Eldrenia, Nerys
Kallyn Hilde
Rank 4 Tower Accepted
Mina, Kathleen, Tracy, Jasmynth, Eve, Saldria, Chiko, Tori, Lissa
Brin Limia, Arlina, Mayle, Mairy, Bellaria, Pietra, Lolita, Meiandhra
Natascha Metis, Jaye, Yhsabel, Alexa, Aralleen, Liia, Guin, Xenva, Becka
Airianna Rueta, Lisette, Blair, Keden, Amarie, Mariah, Miranda, Myrie, Etain
Hienra Aish, Leria, Talitha, Tetsaei, Annabelle, Carlia, Chloe, Nasira
Taleena Thuvia, Kitiara, Osara, Alli, Kiralyta, Cyren, Angelia, Danila
Amelya Morgain, Vianca, Sylvie, Neyena, Elyssa, Covasa, Darla
Itsytestfctwo Khloe, Jiera, Catie, Fareleaen, Ysabelle
Rank 5 Sister
* Press <Return> to continue, q to quit *>
Sarene, Lara, Riasa, Shamara, Elychannietest, Mirielyn, Elotestfc
Elodintesterfc
Rank 6 Elder Sister
Evangaline, Caelophlyn, Talathiri, Aishling, Gaea, Aria, Callesa
Serilda Hope, Khahliana, Zizek, Hiroko
Rank 7 Honored Sister
Naji, Mikaela, Ellysa, Divina, Mariel, Alaina, Neladin, Damena
Elyse Kathala, Maegon, Plyva, Vivtestchannie, Via, Vevina, Iria, Alayla
Naerin Lenara, Lyren
Rank 8 Arch Sister
Petra, Melyssan
Rank 9 Revered Sister
Hallofsitters
Cadsuane Melaidhrin is the current Amyrlin Seat.
|
So here I would want to start by capturing the clan name from '--- White Tower Members ---' and then loops through each character listed here and add them to a key value variable. Some clans may only have a few characters, this is the largest one by far.
Any ideas?
Thanks. |