Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Fri Dec 24, 2004 11:14 pm   

Someone tell me why this script isn't working?
 
Hi, I'm working on making a script to capture the names of all the people in each clan, with their rank, into a db variable, and will be doing other stuff with it in the future. But for right now, I cannot get this to work for some reason, though it seems like it *should*. Here's the script so far:

#CLASS {Clanwatch}
#VAR clannames {Ahf'frait|Ghar'ghael|Green Ajah|Gray Ajah|Dragonsworn|Gaidin|Legion of Unity|Forreseter|Iron Fist|Gleeman|Morat'raken|Shienaran Lancer|Defender of the Stone|Civil Watch|Minion|Dha'vol|Ko'bal|Yellow Ajah|Brown Ajah|Wolfbrother|Child of Light|Black Talon|Queen's Guard of Andor|Wisdom|Illian Companion|Morat'torm|Red Eagle|Saldaean Cavalry|Sword and Hand|Winged Guard|Dhai'mon|Red Ajah|Blue Ajah|White Ajah|White Tower|Hand of Light|Kin|Blademaster|Watchers|Deathwatch|Thiefbane|Chosen|Rising Sun|Valon Guard|Illuminator}
#VAR Currentclan {}
#VAR Ranklist {}
#VAR Lineholder {}
#VAR ClanTemp {}
#TRIGGER {-- ({@clannames}) Members --} {
#VAR Currentclan %replace( %replace( %1, " ", ""), "'", "")
#T+ Rankcapture
}
#TRIGGER "rankcapture" {^Rank 1 *$} {
#VAR @Currentclan {} {} {Clanwatch|Clans}
#VAR Lineholder {}
#VAR Ranklist {}
#VAR ClanTemp {}
#T+ namegetter
} "" {disable}
#COND {^Rank 2 *$} {
#FORALL @Ranklist {#ADDK ClanTemp %i 1}
#VAR Ranklist {}
} {disable}
#COND {^Rank 3 *$} {
#FORALL @Ranklist {#ADDK ClanTemp %i 2}
#VAR Ranklist {}
} {disable}
#COND {^Rank 4 *$} {
#FORALL @Ranklist {#ADDK ClanTemp %i 3}
#VAR Ranklist {}
} {disable}
#COND {^Rank 5 *$} {
#FORALL @Ranklist {#ADDK ClanTemp %i 4}
#VAR Ranklist {}
} {disable}
#COND {^Rank 6 *$} {
#FORALL @Ranklist {#ADDK ClanTemp %i 5}
#VAR Ranklist {}
} {disable}
#COND {^Rank 7 *$} {
#FORALL @Ranklist {#ADDK ClanTemp %i 6}
#VAR Ranklist {}
} {disable}
#COND {^Rank 8 *$} {
#FORALL @Ranklist {#ADDK ClanTemp %i 7}
#VAR Ranklist {}
} {disable}
#COND {^Rank 9 *$} {
#FORALL @Ranklist {#ADDK ClanTemp %i 8}
#VAR Ranklist {}
} {disable}
#COND {is the current*$} {
#FORALL @Ranklist {#ADDK ClanTemp %i 9}
#VAR Ranklist {}
#T- namegetter
#T- rankcapture
} {disable}
#TRIGGER "namegetter" {^(*)$} {
#VAR Lineholder {%1}
#VAR Lineholder {%trim( @Lineholder)}
#VAR Lineholder %replace( @Lineholder, ",", "")
#VAR Lineholder %replace( @Lineholder, " ", " ")
#VAR Lineholder %replace( @Lineholder, " ", "|")
#IF ((%ismember( "Rank", @Lineholder)) OR (%ismember( "Press", @Lineholder)) OR (%ismember( "narrates", @Lineholder)) OR (%ismember( "arrives", @Lineholder)) OR (%ismember( "arrived", @Lineholder)) OR (%ismember( "leaves", @Lineholder)) OR (%ismember( "bellows", @Lineholder)) OR (%ismember( "speaks", @Lineholder))) {} {#FORALL @Lineholder {#ADDI Ranklist %i}}
#VAR Lineholder {}
} "" {disable}
#CLASS 0
#CLASS {Clanwatch|Clans}
#CLASS 0


Here's a sample from the mud:


Code:


vi cl
-- White Tower Members --

Rank  1  Fledgling Novice
  Mournie, Astria, Cadda, Venus, Xephyr, Naru, Carly, Crosere
  Saldria  Jiana, Rillie, Larian, Lithana, Lira, Garna, Benei, Lylah, Maryn
  Osdey  Myrna, Amida, Polia, Vellaren, Tirna, Taiseren, Akila, Elsie
  Lorana  Irele, Semih, Kria, Leylanna, Vilia, Edaen, Asiya, Liren, Daniella
  Kara  Jess, Kohaku, June, Kaiya, Alessia
Rank  2  Wearied Novice
  Elaesa, Vena, Lianela, Viviane, Alta, Niamh, Maetel, Mareen, Solare
  Tanaya  Chlyvia, Tetra, Nima, Kirie, Kaetlin, Iroly, Chiko, Delunei, Fala
  Mironda  Orea, Ryla, Junella, Becka, Liliana, Karina, Tesae, Hanna, Kaaydia
  Tariella  Riasa, Lise, Vera, Jessica, Calla, Janel, Elyse, Beth, Shan
  Calyssa  Aleatha, Klara, Brin, Kayleigh, Aislynn, Rycharda, Kaishia, Desirae
  Kaylie
Rank  3  Journey Accepted
  Ellysa, Charo, Tracy, Jasmynth, Nicci, Kylana, Calisto, Yuna
  Lashivia  Eliora, Caleia, Ahnvari, Llewia, Taetem, Lirianne, Ronde, Luchia
  Maureen  Miserie, Nikita, Elna, Mariana, Elsara, Laria, Seoninia, Selorien
  Aedomira  Marielle, Nisa, Catilann, Arasil, Inanna, Shakina, Prue, Juyen
  Rhiannon  Adelle, Damena, Melis, Kaidien, Tori, Caliadren, Mordiane, Sarai
  Ahrya  Nyamh, Farla, Zarina, Aleana, Anachita, Aerdrynn, Elsaei, Lain

* Press <Return> to continue, q to quit *>
  Aryana  Ravyn, Sylvanas
Rank  4  Tower Accepted
  Thalya, Azur, Gem, Alaina, Belasy, Aramaia, Alys, Chala, Aishling
  Carie  Cate, Penny, Lissa
Rank  5  Sister
  Fiona, Kalys, Rebeka, Svalin, Lilly, May, Sarene, Gansea, Christina
  Divina  Liana, Emalina, Yinia, Mahlinde, Lara, Hikiko, Danise, Adaire
  Karynas  Talathiri, Chrissy, Neladin
Rank  6  Elder Sister
  Hera, Feryl, Naji, Laena, Kalos, Rihanna, Lena, Zarene, Nest, Nadia
  Mariel  Caelophlyn, Amberyn
Rank  7  Honored Sister
  Mikaela, Beverlae, Mira, Arial, Argent, Silvania, Kielan, Wynoa
  Melyssan
Rank  8  Arch Sister
Rank  9  Revered Sister

Cadsuane Melaidhrin is the current Amyrlin Seat.


Obviously at the point it says "* Press <Return> to continue, q to quit *>" I have to hit return to get the rest of the list. Anyway, this is giving me some really messed up results in my ClanTemp variable, giving some names the wrong rank and missing most of them... can anyone help with this?[/code]
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Sun Dec 26, 2004 12:29 am   
 
Nvm, I changed some stuff and inserted a #PRIO, it now works
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net