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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Wed Mar 24, 2010 8:31 pm   

Logical Statement Issue
 
Here's the code in particular:

Edit: New info at the bottom

Help would be appreciated.
_________________
Listen to my Guitar - If you like it, listen to more

Last edited by chamenas on Thu Mar 25, 2010 1:10 pm; edited 1 time in total
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Wed Mar 24, 2010 9:21 pm   
 
shouldn't there be a number after Yasan and before Bladesinger? This wouldn't quite coordinate with what you are getting for an error so I think you typo'd that.

It also seems like you should not get that error internally to the "add" procedure. Is there an IF statement before this?
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Wed Mar 24, 2010 10:10 pm   
 
This is the entire alias, and yes, apologies, I typoed, it should have been: update add Yasan 51 Bladesinger Shalonesti Sha'falas
Edit: New code at bottom
_________________
Listen to my Guitar - If you like it, listen to more

Last edited by chamenas on Thu Mar 25, 2010 1:09 pm; edited 1 time in total
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Thu Mar 25, 2010 1:18 am   
 
I changed it to this for ease of reading, of course, it lack precision in reading the errors by doing such. But I can do that via switch if I want.

Edit: would help if I posted it

Here is the ENTIRE class. If you want to see what's going on, put it in and then do this:

type: update add Yasan 51 Bladesinger Shalonesti Sha'falas
then type: update add Arreana 51 Bladesinger Shalonesti Sha'falas

The Arreana one will get through the first statement, and then come to the second one and meet that too, to execute properly. i.e. she's already in the list and so you can't add her.

The one with Yasan will give you the standard error that you will find in the "undefined" part of the switch, given when none of the commands are met.

This is really odd for the simple fact that if Arreana goes through, and there's nothing different about Yasan except the characters in the name, then he should go through as well. He should make it to the second if, fail, and fit into the else clause. However, I put a "breakpoint" say in between the two ifs. You will see Arreana go through it, but Yasan doesn't. And I have no clue why.

Code:

<class name="Highlighter" id="436">
  <alias name="updater" id="437">
    <value>#T- Gatherer-Off
#T+ Gatherer-Off
#switch (%params)
 ("clan") {
    #T+ Gatherer-c
    #send "whoc"
    #T+ Continue-who
    #T+ Stop-who
    #say "Gathering updates..."
    #show "Please do not input commands until the 'Updates Complete' message is shown. Thank you."
    }
 ("loner") {
    #T+ Gatherer-c
    #send "whoc loner"
    #T+ Continue-who
    #T+ Stop-who
    #say "Gathering updates..."
    #show "Please do not input commands until the 'Updates Complete' message is shown. Thank you."
 }
 ("kingdom") {
    #T+ Gatherer-k
    #send "whok"
    #T+ Continue-who
    #T+ Stop-who
    #say "Gathering updates..."
    #show "Please do not input commands until the 'Updates Complete' message is shown. Thank you."
 }
 ("king") {
    #T+ Gatherer-k
    #send "whok"
    #T+ Continue-who
    #T+ Stop-who
    #say "Gathering updates..."
    #show "Please do not input commands until the 'Updates Complete' message is shown. Thank you."
 }
 ("angel") {
    #T+ Gatherer-a
    #send "who angel"
    #T+ Continue-who
    #T+ Stop-who
    #say "Gathering updates..."
    #show "Please do not input commands until the 'Updates Complete' message is shown. Thank you."
 }
 ("ang") {
    #T+ Gatherer-a
    #send "who angel"
    #T+ Continue-who
    #T+ Stop-who
    #say "Gathering updates..."
    #show "Please do not input commands until the 'Updates Complete' message is shown. Thank you."
 } 
 {
    #T+ Gatherer-c
    #send "whoc"
    #T+ Continue-who
    #T+ Stop-who
    #say "Gathering updates..."
    #show "Please do not input commands until the 'Updates Complete' message is shown. Thank you."
 }</value>
  </alias>
  <var name="c_name" type="StringList" id="438">Dorigar|Arelius|Betha|Enshyer|Drondon|Berhar|Gwaine|Murloc|Kamdyn|Chucco|Clu'banga|Eckert|Makeran|Indico|Dredo|Khazmyr|Kadaris|Leonitis|Iulh|Veleris|Croith|Bra'hvchk|Dxutim|Abram|Tiyrau|Dekaios|Henrietta|Nyxt|Crelius|Sadriendra|Kelthas|Ruglif|Tylarn|Tyhal|Rithor|Villnius|Gimle|Mariam|Dwid|Meldibar|Ardath|Kirez|Luiz|Steckel|Rhoswen|Arthul|Omngoten|Excellias|Qilue|Aothien|Cyrte|Ragrak|Ylot|Krecks|Zypher|Rawat|Abrienne|Z'Quarus|Daraex|Eva|Bevan|Regus|Moran|Malchaos|Anithone|Zpeoth|Atomar|Samiliat|Itaeyonapat|Izziael|Brakkha|Saio|Berty|Jindr|Uuedo|Ealanil|Brockner|Tsearo|Nazerin|Linhi|Zhaid|Lanival|Rochford|Samaetha|Jayne|Plike|Beydalar|Dahakon|Kotho|Yxus|Datai|Rolandor|Verenian|Ehlremir|Nehjecetal|Gruhd|Qzxauip|Zyles|Z'bek|Jhacob|Rilien|Carborundum|Cedany|Ashaki|Boknog|Ambrosse|Xelin|Monbo|Kenethan|Marcaus|Torral|Edirne|Dinol|Thrakhath|Amyth'lynn|Pirvib|Argam|Grohgan|Fexate|Xuerin|Kerrisacza|Rimunath|Gorrakh|Pytch|Gildred|Vadol|Vrykolas|Zaythen|Skoch|Domlin|Kallistos|Braynon|Verque|Cesario|Galeru|Amex|Sylpheed|Trachelismos|Lactan|Tikhondrius|B'Hog|Cromble|Amena|Arianny|Nathiel|Anbraxas|Iraeyna|Alexis|Grashuk|Arthese|Divad|Ejylos|Argeta|Bodrum|Kimpaz|Merilith|Soranthal|Solae|Diraen|Orncaex|Ziro|Zaerhya|Adra'steia|Vashj|Evary|Laisreyn|Drakonn|Xuroc|Alissya|Styrm|Rassilon|Vandavar|Kaikias|Cambeot|Ramias|Damarcus|Carthus|Ogroq|Enthil|Dresuril|Silmen|Rylie|Turssh|Kiid|Kellus|Malignite|Glubumph|Kylore|Girn|Seredath|Azerius|Atrin|Calaeron|Anathaelynn|Giltarald|Avangelion|Saliuk|Xercobaltax|Xaerik|Hyxxnthasca|Grizzul|Zoloto|Cahlizna|Annemari|Yatebalublu|Sceliceth|Bof|Mandark|Barbarus|Telandaris|Aikius|Bakkengar|Dreykath|Ashlei|Faelinda|Jes'arens|Vantok|Biryn|Rendur|Adsuldra|Anysse|Dhalia|Nevak|Llyssa|Mardunit|Bernadette|Scuzzlerump|Kiliar|Inazuma|Rhamiel|Anastacia|Ke'arinel|Variern|Humby|Crystavia|Toroth|Bumad|Tyrrgoth|Ewart|Lillymae|Jalm|Havocke|Glungor|Ollivaxsuhat|Salainn|Kaisan|Sorley|Undeng|G'ran|Gilrim|Zikabrik|Spiris|Hyohachi|Mraneth|Hzar|Tul'eth|Krystlyn|Seusen|Gesat|Caenarfon|Aethran|Raxxar|Gobo|Maerliya|Carrionmaw|Gor'Jair|Ekimmu|Pragler|Xerces|Kroc|Grundo|Booomie|Hache|Darnthas|Sereb|Beijo|Dalaban|Kestian|Maisie|Jarghulk|Xep|Madilyn|Thorsten|Frug|Falef|Daygan|Amarie|Azula|Octaivius|Shevaera|Faywen|Kareveta|Zekmuh|Kyrlynn|Leglyana|Emylae|Grizzle|Ainin|Mirthal|Isacc|Kea|Parle|Meki|Epistatia|Ariadna|Dontay|Kl'axe|Headric|Ryasan'i|Bormgin|Dartokk|Erlead|Conchobhar|Wapp|Samos|Arreana|Hyathes|Opilithium|Yugami|Kravis|Lenron|Ryim|Cobbmip|Trallin|Lylynda|Heier|Linool|Jochaim|Grognor|Kuldaj|Hyacint|Alistriona|Azkin|Gywenneth|Blodivick|Chameron|Chel'rei|Kraxul|Xaex|Alerius|Glirb|Azarna|Kesar|Nobka|Thoser|Corrynthea|Kaethen|Exegis|Draxim|Kirkland|Teirnan|Orven|Taisei|Arthais|Lothaw|Dialook|Exiled|Lazaras|Ogilvy|Raghilda|Elove|Kaerlia|Wehyo|Rojara|Kalodyn|Maddyline|Kermine|Shikamaru|Clancey|Koffing|Naiora|Jazaren|Michael|Kha'os|Erikson|Norgrim|Haguer|Andry|Zayin|Szayel|Olivena|Araxia|Laithayn|Archaon|Dechantra|Adenund|Valendal|Py'nan|Reklah|Wynnefreede|Veic|Gudrun|Vizierian|Sleet|Decin|Cruks|Phuey|Calcla|Gulath|Skelton|Danadoir|Karael|Leiedros|Azbogah</var>
  <var name="c_clan" type="StringList" id="439">Wargar|Knighthood|Wargar|Bloodlust|Shalonesti|Wargar|Knighthood|Red Robes|White Robes|Slayers|Justice|Knighthood|White Robes|White Robes|Knighthood|Bloodlust|Bloodlust|Justice|Wargar|White Robes|Wargar|Red Robes|Red Robes|Shadow|Shalonesti|Justice|Knighthood|Bloodlust|Shadow|Shalonesti|Bloodlust|Justice|Shalonesti|Justice|Knighthood|Wargar|Althainia|White Robes|Wargar|Slayers|Bloodlust|Shadow|Black Robes|Wargar|Justice|White Robes|Black Robes|Shalonesti|Bloodlust|Shadow|Shadow|White Robes|Black Robes|Knighthood|Conclave|Bloodlust|Red Robes|Bloodlust|Black Robes|Black Robes|Bloodlust|Knighthood|Bloodlust|Bloodlust|Slayers|Black Robes|Black Robes|Red Robes|Bloodlust|Wargar|Justice|Shalonesti|Bloodlust|Slayers|Bloodlust|Bloodlust|Black Robes|Bloodlust|Slayers|White Robes|Bloodlust|Shadow|Shadow|Bloodlust|Knighthood|Wargar|Shadow|Bloodlust|Wargar|Wargar|Knighthood|Shadow|Shadow|Justice|Red Robes|Slayers|Justice|Red Robes|Slayers|Knighthood|Justice|Slayers|White Robes|Bloodlust|Justice|White Robes|Shalonesti|Wargar|White Robes|Shadow|Wargar|Knighthood|Wargar|Knighthood|Shalonesti|Wargar|Wargar|Wargar|Justice|Shadow|Dragon|Dragon|Justice|Dragon|Wargar|Black Robes|Slayers|Justice|Wargar|Slayers|Shadow|Shalonesti|Wargar|White Robes|Dragon|Black Robes|Dragon|Slayers|Slayers|Dragon|Bloodlust|Slayers|Bloodlust|Slayers|Shalonesti|Dragon|Shalonesti|Justice|Red Robes|Shalonesti|Red Robes|Shalonesti|Wargar|Black Robes|Red Robes|Bloodlust|Shalonesti|Shalonesti|Shalonesti|Dragon|Shalonesti|Shalonesti|Dragon|Red Robes|Black Robes|Dragon|Shadow|Slayers|Red Robes|Justice|Knighthood|Bloodlust|Dragon|Justice|Knighthood|Bloodlust|Red Robes|Bloodlust|Red Robes|Dragon|Justice|Knighthood|Bloodlust|Bloodlust|Bloodlust|Dragon|Bloodlust|Knighthood|Wargar|Dragon|Knighthood|Black Robes|Shalonesti|Shalonesti|Dragon|Shalonesti|Justice|Dragon|Bloodlust|Dragon|Wargar|Justice|Conclave|Shalonesti|Dragon|Dragon|Slayers|Bloodlust|Justice|Black Robes|Knighthood|Justice|Justice|Black Robes|Knighthood|Justice|Red Robes|Black Robes|Wargar|Shalonesti|Knighthood|Knighthood|Black Robes|White Robes|Justice|Red Robes|Slayers|Knighthood|Dragon|Slayers|Black Robes|Slayers|Justice|Slayers|Slayers|Slayers|Justice|Justice|Bloodlust|Shadow|Shadow|Justice|Slayers|Dragon|Shadow|Shadow|Bloodlust|Bloodlust|Slayers|Wargar|Wargar|Wargar|Red Robes|Justice|Wargar|Shalonesti|Shadow|Knighthood|Bloodlust|Knighthood|Knighthood|Justice|Slayers|Shalonesti|Dragon|Bloodlust|White Robes|Wargar|Bloodlust|Bloodlust|Wargar|Althainia|Arkane|Arkane|Abaddon|Arkane|Arkane|Althainia|Shalonesti|Arkane|Arkane|Abaddon|Althainia|Althainia|Shalonesti|Althainia|Shalonesti|Althainia|Arkane|Arkane|Althainia|Abaddon|Verminasia|Althainia|Althainia|Nordmaar|Abaddon|Abaddon|Verminasia|Nordmaar|Shalonesti|Althainia|Althainia|Abaddon|Abaddon|Verminasia|Thaxanos|Althainia|Abaddon|Arkane|Marauders|Shalonesti|Nordmaar|Arkane|Althainia|Justice|Knighthood|Shalonesti|Shalonesti|Althainia|Arkane|Marauders|Arkane|Verminasia|Marauders|Shalonesti|Abaddon|Arkane|Althainia|Marauders|Nordmaar|New Thalos|Althainia|Althainia|Arkane|Nordmaar|Verminasia|Thaxanos|Althainia|Arkane|Althainia|Verminasia|Thaxanos|Althainia|Arkane|Shalonesti|Justice|Black Robes|Wargar|Shadow|Nordmaar|Darkonin|Abaddon|Arkane|Arkane|Darkonin|Verminasia|Thaxanos|Nordmaar|Thaxanos|Althainia|Arkane|New Thalos|Althainia|Althainia|Althainia|Althainia|Althainia|Nordmaar|Abaddon|Arkane|Bloodlust|Knighthood|Black Robes|Wargar|Wargar|Wargar|Arkane|Verminasia|Abaddon|Althainia|Retired|Nordmaar|Verminasia|Verminasia|Althainia|Shalonesti|Abaddon|Verminasia|Marauders|Thaxanos|Wargar|Dragon|Dragon|Bloodlust|Wargar|Slayers|Wargar|Wargar|Black Robes|Wargar|Angel|Wargar|Angel</var>
  <var name="c_lvl" type="StringList" id="440">51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|30|47|47|43|30|25|34|23|51|51|65|51|51|51|51|38|29|24|26|51|51|51|51|51|36|51|51|51|44|32|51|51|51|51|51|51|25|51|39|68|51|31|51|51|51|51|51|51|51|51|39|51|51|51|51|51|51|51|51|51|51|43|23|51|51|51|51|51|51|25|51|51|51|51|51|51|51|51|31|51|25|51|51|46|35|51|51|44|40|51|51|51|51|51|51|51|51|51|51|51|51|25|39|25|51|51|51|51|51|51|51|51|46|51|45|51|51|51|51|51|51|51|39|51|51|34|51|35|38|51|15|51|51|35|27|48|41|51|51|51|34|26|51|51|51|25|51|51|44|44|51|51|51|47|50|51|51|51|51|51|51|51|42|23|5|51|51|51|51|25|51|39|40|34|51|51|51|51|51|42|35|28|36|51|25|49|51|68|51|51|6|42|40|33|51|46|27|41|51|51|51|51|51|31|51|51|51|36|51|51|51|48|26|51|51|43|23|51|51|42|29|51|51|25|51|51|48|45|23|51|51|33|33|30|44|51|26|51|51|31|51|51|51|51|51|51|51|26|51|51|49|51|25|51|51|46|51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|51|47|40|33|25|20|16|51|51|51|51|41|35|34|51|51|40|30|30|25|27|51|51|51|51|51|51|51|51|51|51|50|50|44|29|27|25|25|25|18|19|15|51|51|25|24|13|6|51|51|51|51|51|44|26|31|51|51|51|51|51|51|51|51|51|51|51|51|42|27|26|26|23|16|15|13|3|51|51|25|51|51|40|51|51|51|51|51|51|51|51|42|20|18|6|51|8|51|51|51|51|44|26|28|51|47|26|51|33|43</var>
  <var name="c_class" type="StringList" id="441">Crusader|Swashbuckler|Runesmith|Druid|Bladesinger|Jongleur|Paladin|Transmuter|Mage|Skald|Ranger|Crusader|Mage|Mage|Jongleur|Priest|Assassin|Barbarian|Battlerager|Battlemage|Priest|Mage|Mage|Shadowknight|Cleric|Swashbuckler|Druid|Priest|Shadowknight|Eldritch|Armsman|Skald|Ranger|Assassin|Paladin|Battlerager|Ranger|Invoker|Battlerager|Warrior|Invoker|Mage|Transmuter|Illusionist|Illusionist|Transmuter|Mage|Eldritch|Enchantor|Mage|Enchantor|Mage|Invoker|Druid|Warlock|Monk|Transmuter|Priest|Invoker|Necromancer|Thief|Priest|Necromancer|Warlock|Enchantor|Necromancer|Necromancer|Battlemage|Crusader|Armsman|Barbarian|Eldritch|Enchantor|Dragonslayer|Shaman|Illusionist|Transmuter|Assassin|Assassin|Transmuter|Nightshade|Shadowknight|Enchantor|Witch|Priest|Battlerager|Swashbuckler|Priest|Skald|Assassin|Bard|Armsman|Charlatan|Druid|Barbarian|Skald|Skald|Mage|Shaman|Ranger|Druid|Warrior|Necromancer|Shaman|Shaman|Invoker|Bladesinger|Warlock|Transmuter|Monk|Jongleur|Swashbuckler|Battlerager|Crusader|Eldritch|Shaman|Ranger|Armsman|Druid|Shadowknight|Dragon|Dragon|Bandit|Dragon|Priest|Invoker|Swashbuckler|Crusader|Barbarian|Warrior|Assassin|Illusionist|Enchantor|Invoker|Dragon|Mage|Dragon|Warrior|Dragonslayer|Dragon|Bandit|Dragonslayer|Ranger|Warrior|Cleric|Dragon|Enchantor|Swashbuckler|Invoker|Assassin|Invoker|Swashbuckler|Assassin|Necromancer|Invoker|Druid|Ranger|Assassin|Assassin|Dragon|Thief|Priest|Dragon|Transmuter|Transmuter|Dragon|Druid|Assassin|Invoker|Swashbuckler|Swashbuckler|Assassin|Dragon|Shaman|Mage|Druid|Transmuter|Barbarian|Mage|Dragon|Monk|Crusader|Barbarian|Swashbuckler|Ranger|Dragon|Assassin|Shaman|Battlerager|Dragon|Swashbuckler|Mage|Eldritch|Priest|Dragon|Druid|Ranger|Dragon|Warlock|Dragon|Ranger|Invoker|Assassin|Bladesinger|Dragon|Dragon|Assassin|Nightshade|Barbarian|Enchantor|Druid|Armsman|Assassin|Mage|Enchantor|Warlock|Necromancer|Mage|Illusionist|Jongleur|Enchantor|Armsman|Battlemage|Invoker|Jongleur|Invoker|Dragonslayer|Jongleur|Dragon|Enchantor|Mage|Armsman|Priest|Druid|Priest|Warrior|Armsman|Armsman|Swashbuckler|Witch|Skald|Druid|Warrior|Dragon|Bandit|Swashbuckler|Jongleur|Skald|Barbarian|Armsman|Shaman|Ranger|Invoker|Warlock|Assassin|Assassin|Shadowknight|Enchantor|Assassin|Priest|Skald|Skald|Nightshade|Bladesinger|Dragon|Warrior|Invoker|Ranger|Mage|Shaman|Runesmith|Enchantor|Nightshade|Assassin|Assassin|Armsman|Crusader|Ranger|Bladesinger|Shaman|Armsman|Priest|Assassin|Armsman|Enchantor|Assassin|Monk|Druid|Cleric|Crusader|Warrior|Jongleur|Shaman|Swashbuckler|Druid|Warrior|Shaman|Shaman|Enchantor|Mage|Mage|Druid|Shaman|Illusionist|Witch|Armsman|Assassin|Warrior|Druid|Skald|Assassin|Assassin|Warrior|Bandit|Swashbuckler|Priest|Warrior|Ranger|Bladesinger|Crusader|Enchantor|Assassin|Transmuter|Shaman|Enchantor|Assassin|Warrior|Bard|Barbarian|Bandit|Druid|Nightshade|Warrior|Cleric|Bard|Barbarian|Jongleur|Warrior|Assassin|Warrior|Barbarian|Witch|Battlerager|Jongleur|Enchantor|Illusionist|Transmuter|Mage|Skald|Barbarian|Crusader|Barbarian|Enchantor|Armsman|Cleric|Armsman|Bladesinger|Skald|Druid|Enchantor|Enchantor|Druid|Ranger|Cleric|Skald|Shaman|Cleric|Warrior|Bard|Barbarian|Bard|Shadowknight|Shaman|Mage|Druid|Skald|Shaman|Transmuter|Priest|Priest|Enchantor|Mage|Skald|Assassin|Enchantor|Mage|Warrior|Cleric|Cleric|Enchantor|Barbarian|Crusader|Dragon|Dragon|Bandit|Armsman|Warrior|Cleric|Cleric|Mage|Warrior|Angel|Battlerager|Angel</var>
  <var name="c_rank" type="StringList" id="442">Clansmen|Page|Thane|Devourer|Regent|Clansmen|General|Advisor|Student|Follower|Soldier|Page|Magus|Apprentice|Page|Savage|Ravager|Recruit|Clansmen|Magus|Oreborn|Student|Apprentice|Field_Marshall|Sha'enlas|Watcher|Lieutenant:Shield|Spiritualist|Elder:Templar|Sage|Devourer|Recruit|Nameless|Recruit|Colonel:Lance|Clansmen|Soldier (War)|Sorcerer|Clansmen|Unproven|Overlord|Novice|Magus|Oreborn|Soldier (Revenge)|Sorcerer|Magus|Senator|Deathknight|Esquire|Dark_Knight:Gray_Robes|Student|Magus|Page|Watcher|Underlord|Magus|Spiritualist|Advisor|Magus|Savage|Knight:Shield|Blood Reaver|Ravager|Chancellor|Magus|Advisor|Wizard|Blood Rager|Warcouncil(Hill)|Soldier (War)|Sage|Ravager|Overlord|Ravager|Devourer|Sorcerer|Minion|Follower|Magus|Dread Pirate|Dark_Lord|Esquire|Ravager|Page|Clansmen|Supplicant|Devourer|Clansmen|Clansmen|Captain:Shield|Supplicant|Dark_Knight:Crimson_Rose|Sergeant (Survival)|Magus|Unproven|Lord of War|Apprentice|Zealot|Page|Executor|Slayer|Advisor|Savage|Soldier (Survival)|Advisor|Regent|Clansmen|Archmagus|Supplicant|Clansmen|Squire|Warcouncil(Thane)|General|Keeper|Clansmen|Oreborn|Clansmen|Recruit|Lord_Templar|Member|Member|Soldier (Tactics)|Member|Warcouncil(Mountain)|Vizier|Slayer|Recruit|Clansmen|Unproven|Esquire|Sha'enlas|Longbeard|Wizard|Member|Apprentice|Member|Unproven|Champion|Member|Savage|Crimson Guard|Savage|Follower|Nameless|Member|Sha'enlas|Captain (War)|Magus|Sha'falas|Magus|Savage|Clansmen|Master|Sorcerer|Savage|Savage|Nameless|Sha'falas|Member|Member|Nameless|Member|Member|Magus|Member|Master|Unproven|Magus|Recruit|Knight:Shield|Warlord|Member|Recruit|Squire|Devourer|Archmagus|Ravager|Student|Member|Sergeant (Revenge)|Knight:Shield|Devourer|Dread Pirate|Minion|Member|Minion|Squire|Clansmen|Member|Member|Apprentice|High Keeper|Shalonost|Member|Nameless|Recruit|Member|Blood Reaver|Member|Oreborn|Soldier (Revenge)|Student|Speaker|Member|Member|Unproven|Savage|Recruit|Magus|Page|Recruit|Soldier (Tactics)|Apprentice|Squire|Soldier (Revenge)|Sorcerer|Apprentice|Oreborn|Nameless|General|Squire|Sorcerer|Sorcerer|Recruit|Archmagus|Crimson Guard|Page|Member|Follower|Apprentice|Unproven|Sergeant (Survival)|Dragoon|Unproven|Unproven|Soldier (War)|Sergeant (War)|Minion|Dark_Knight:Templar|Chancellor|Soldier (Survival)|Unproven|Member|Esquire|Novice|Savage|Savage|Unproven|Lord Mountain|Clansmen|Oreborn|Vizier|Soldier (Revenge)|Oreborn|Sha'relas|Elder:Crimson_Rose|Page|Devourer|Captain:Shield|Knight:Lance|Soldier (War)|Unproven|SongMaster|Member|Minion|Vizier|Oreborn|Minion|Devourer|Lord Mountain|Citizen|Trader|Citizen|Count|Citizen|Scribe|Specialist|Senator|Guard|Guard|Countess|Citizen|Citizen|Cadet|Citizen|Regent|Guardian|Pontiff|Citizen|Citizen|Executioneer|Shade|Marshal|Citizen|Citizen|Digger|Citizen|Student|Citizen|Citizen|Citizen|Citizen|Wizardess|Magus|Captain|Citizen|Citizen|Citizen|Recruit|Citizen|Citizen|Citizen|Citizen|Citizen|Lady of Survival|Knight:Shield|Sha'falas|Sha'falas|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Sha'enlas|Captain (Revenge)|Student|Oreborn|Petitioner|Citizen|Citizen|Citizen|Citizen|Citizen|King|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Overlord|Knight:Shield|Student|Oreborn|Clansmen|Oreborn|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Citizen|Clansmen|Member|Member|Overlord|Oreborn|Follower|Oreborn|Clansmen|Student|Oreborn|Lesser|Hammerer|Arch</var>
  <trigger name="Continue-who" priority="3740" regex="true" enabled="false" id="443">
    <pattern>\[ \(C\)ontinue, \(R\)efresh, \(B\)ack, \(H\)elp, \(E\)nd, \(T\)op, \(Q\)uit, or RETURN \]\:</pattern>
    <value>_continue = 1
#send "c"
_continue = 0</value>
  </trigger>
  <trigger name="Stop-who" priority="3750" regex="true" enabled="false" id="444">
    <pattern>(Total|Players found): \d+\.</pattern>
    <value>#T- Continue-who
#say "Updates complete."
#send {~~}
#send %cr
#T- Gatherer-c
#T- Gatherer-k
#T- Gatherer-a
#T- Stop-who</value>
  </trigger>
  <trigger name="Turn-Highlight-On" priority="3840" regex="true" id="445">
    <pattern>(Players near you:|You quest out with your magic in search of others\.|Looking around you see:)</pattern>
    <value>#T+ Highlight-t
#T+ Turn-Highlight-Off</value>
  </trigger>
  <trigger name="Turn-Highlight-Off" priority="3860" regex="true" enabled="false" id="446">
    <pattern>^$</pattern>
    <value>#T- Highlight-t
#T- Turn-Highlight-Off</value>
  </trigger>
  <var name="_s_highlight" id="447">1</var>
  <var name="_s_flag" id="448">1</var>
  <var name="_s_class" id="449">1</var>
  <var name="_s_rank" id="450">0</var>
  <var name="_s_lvl" id="451">1</var>
  <alias name="highlight" id="452">
    <value><![CDATA[#switch (%params)
 ("lvl") {
  #if (@_s_lvl)
  {
   _s_lvl=0
   #say "Levels will no longer be shown in the Highlighter."
  }
  {
   _s_lvl=1
   #say "Levels will now be shown in the Highlighter."
  }
 }
 ("level") {
  #if (@_s_lvl)
  {
   _s_lvl=0
   #say "Levels will no longer be shown in the Highlighter."
  }
  {
   _s_lvl=1
   #say "Levels will now be shown in the Highlighter."
  }
 }
 ("rank") {
  #if (@_s_rank)
  {
   _s_rank=0
   #say "Ranks will no longer be shown in the Highlighter."
  }
  {
   _s_rank=1
   #say "Ranks will now be shown in the Highlighter."
  }
 }
 ("flag") {
  #if (@_s_flag)
  {
   _s_flag=0
   #say "Flags will no longer be shown in the Highlighter."
  }
  {
   _s_flag=1
   #say "Flags will now be shown in the Highlighter."
  }
 } 
 ("class") {
  #if (@_s_class)
  {
   _s_class=0
   #say "Classes will no longer be shown in the Highlighter."
  }
  {
   _s_class=1
   #say "Classes will now be shown in the Highlighter."
  }
 } 
 ("high") {
  #if (@_s_highlight)
  {
   _s_highlight=0
   #say "Highlighting will no longer be shown in the Highlighter."
  }
  {
   _s_highlight=1
   #say "Highlighting will now be shown in the Highlighter."
  }
 } 
 ("highlight") {
  #if (@_s_highlight)
  {
   _s_highlight=0
   #say "Highlighting will no longer be shown in the Highlighter."
  }
  {
   _s_highlight=1
   #say "Highlighting will now be shown in the Highlighter."
  }
 }
 ("help") {
 #say "Commands:"
 #wait 200
 #say "Highlight <params>"
 #say "- lvl or level - using either one will toggle levels being shown in the Highlight"
 #say "- rank - will toggle ranks being shown in the Highlight"
 #say "- flag - will toggle flags being shown in the Highlight"
 #say "- class - will toggle classes being shown in the Highlight"
 #say "- high or highlight - using either will toggle the colored highlights."
 #say "- help - typing this, or typing the command with no parameters brings up this help section."
 #wait 200
 #say "updater"
 #say "- Takes the parameters 'clan' and 'loner' and updates from the appropriate lists."
 #say "- Typing updater without parameters defaults to clans."
 #wait 200
 #say "update <params> <name> <new entry>"
 #say "- Allows you to manually update entries."
 #say "- parameters: clan, rank, lvl/level, class"
 #say "- ex: update clan Yasan Shalonesti"
 #wait 200
 #say "find <name>"
 #say "- Brings up relevant information on the name entered if it's in the records."
 #say "- Typing 'all' will show all the names in the records."
 #say "- You can search for names by entering a part of the name." 
 }
 (%null) {
 #say "Commands:"
 #wait 200
 #say "Highlight <params>"
 #say "- lvl or level - using either one will toggle levels being shown in the Highlight"
 #say "- rank - will toggle ranks being shown in the Highlight"
 #say "- flag - will toggle flags being shown in the Highlight"
 #say "- class - will toggle classes being shown in the Highlight"
 #say "- high or highlight - using either will toggle the colored highlights."
 #say "- help - typing this, or typing the command with no parameters brings up this help section."
 #wait 200
 #say "updater"
 #say "- Takes the parameters 'clan' and 'loner' and updates from the appropriate lists."
 #say "- Typing updater without parameters defaults to clans."
 #wait 200
 #say "update <params> <name> <new entry>"
 #say "- Allows you to manually update entries."
 #say "- parameters: clan, rank, lvl/level, class"
 #say "- ex: update clan Yasan Shalonesti"
 #wait 200
 #say "find <name>"
 #say "- Brings up relevant information on the name entered if it's in the records."
 #say "- Typing 'all' will show all the names in the records."
 #say "- You can search for names by entering a part of the name." 
 }
#send %cr]]></value>
  </alias>
  <trigger name="Highlight-t" priority="3940" regex="true" enabled="false" id="453">
    <pattern>^(?:The ghost of )?(@c_name)</pattern>
    <value>$_mem_num = %ismember(%1, @c_name)

$_is_bracket = @isbrackets(@c_clan, $_mem_num)
$_clan_color = @clancolor(@c_clan, $_mem_num)
$_clan = %item(@c_clan, $_mem_num)

#if (@_s_highlight)
{
 #IF (%item(@c_clan, $_mem_num) = "Shadow")
 {
  #cw 8
 }
 {
  #cw $_clan_color
 }
}

#if (@_s_flag)
{
 #sayadd " "%ansi(7)%switch($_is_bracket=1, "[ ",$_is_bracket=0, "( ", $_is_bracket=2, %ansi(11)"(")%ansi($_clan_color)$_clan%ansi(7)%switch($_is_bracket=1, " ]", $_is_bracket=0, " )", $_is_bracket=2, %ansi(11)")"%ansi(reset))
}

#if (@_s_lvl)
{
 #sayadd "("%item(@c_lvl, $_mem_num)")"
}
#if (@_s_class)
{
 #sayadd "("%item(@c_class, $_mem_num)")"
}
#if (@_s_rank)
{
 #sayadd "("%item(@c_rank, $_mem_num)")"
}</value>
  </trigger>
  <alias name="find" id="454">
    <value>#if (%ismember(%params, @c_name))
{
   $_mem_num = %ismember(%params, @c_name)
   $_lvl = %item(@c_lvl, $_mem_num)
   $_class = %item(@c_class, $_mem_num)
   $_rank = %item(@c_rank, $_mem_num)
   $_clan = %item(@c_clan, $_mem_num)
   $_clan_color = @clancolor(@c_clan, $_mem_num)
   $_is_brackets = @isbrackets(@c_clan, $_mem_num)
 
   #show %switch($_is_brackets=1, "[ ",$_is_brackets=0, "( ",$_is_brackets=2, %ansi(11)"(")%ansi($_clan_color)$_clan%ansi(reset)%switch($_is_brackets=1, " ]",$_is_brackets=0, " )", $_is_brackets=2, %ansi(11)")"%ansi(reset))"["$_lvl" "$_class"] "%params" ("$_rank")"
}
{
 #if (%params = "all")
 {
  $_num_items = %numitems(@c_name)
  #say "Listing off all current names, this will be spammy..."
  #say $_num_items " entries."
  #wait 500
  $_curr_item = 1
  #loop $_curr_item,$_num_items {
   #say $_curr_item". "%item(@c_name, $_curr_item)
   $_curr_item = $_curr_item + 1
   #wait 200
   }
 }
 {
  $_curr_iter = 1
  $_max_iter = %numitems(@c_name)
  $_is_match = 0
  $_curr_char = "NULL"
 
  #LOOP $_curr_iter,$_max_iter {
   $_curr_char = %item(@c_name, $_curr_iter)
   #IF (%match($_curr_char, %params))
   {
    #VAR _par_match %additem($_curr_char, @_par_match)
    $_is_match = 1
   }
   $_curr_iter = $_curr_iter + 1
  }
 
  #IF ($_is_match)
  {
   $_iter = 1
   $_max_iter = %numitems(@_par_match)
   
   #if ($_max_iter > 1)
   {
    #show "Found "$_max_iter" partial matches!"
   }
   {
    #show "Found a partial match!"
   }
   
   #LOOP $_iter,$_max_iter {
   
   $_mem_num = %ismember(%item(@_par_match, $_iter), @c_name)
   $_is_brackets = @isbrackets(@c_clan, $_mem_num)
   $_clan_color = @clancolor(@c_clan, $_mem_num)
   $_clan = %item(@c_clan, $_mem_num)
    #show "Found: "%item(@_par_match, $_iter)%switch($_is_brackets=1, " [ ",$_is_brackets=0, " ( ", $_is_brackets=2, %ansi(11)" (")%ansi($_clan_color)$_clan%ansi(reset)%switch($_is_brackets=1, " ]", $_is_brackets=0, " )", $_is_brackets=2, %ansi(11)")"%ansi(reset))
    #wait 200
    $_iter = $_iter + 1
   
   }
   
   $_iter = 1
   #LOOP $_iter,$_max_iter {
    #DELNITEM _par_match 1
    $_iter = $_iter + 1
   }
   #send %cr
   
  }
  {
   #say "Could not find "%params
   #say "Make sure the name is spelled correctly, or try 'find all' to get a listing of the names."
  }
 }
}

#send %cr</value>
  </alias>
  <alias name="update" id="455">
    <value><![CDATA[#if (%ismember(%2, @c_name))
{
 $_mem_num = %ismember(%2, @c_name)
 $_name_count = %numitems(@c_name)
 #switch (%1)
  ("clan") {
   $_clan_count = %numitems(@c_clan)
   #if ($_clan_count < $_name_count)
   {
    #VAR c_clan %additem(%-3, @c_clan)
    $_c_color = @clancolor(@c_clan, $_mem_num)
    $_is_brackets = @isbrackets(@c_clan, $_mem_num)
    $_new_item = %item(@c_clan, $_mem_num)
    #show "Entry updated for: "%item(@c_name, $_mem_num)
    #show "Clan changed to "%switch($_is_brackets=1, "[ ", $_is_brackets=0, "( ", $_is_brackets=2, %ansi(11)"(")%ansi($_c_color)$_new_item%ansi(reset)%switch($_is_brackets=1, " ]", $_is_brackets=0, " )", $_is_brackets=2, %ansi(11)")"%ansi(reset))
   }
   {
    $_old_item = %item(@c_clan, $_mem_num)
    $o_c_color = @clancolor(@c_clan, $_mem_num)
    $o_is_brackets = @isbrackets(@c_clan, $_mem_num)     
    #VAR c_clan %replaceitem(%-3, $_mem_num, @c_clan)
    $_c_color = @clancolor(@c_clan, $_mem_num)
    $_is_brackets = @isbrackets(@c_clan, $_mem_num)   
    $_new_item = %item(@c_clan, $_mem_num)
    #show "Entry updated for: "%item(@c_name, $_mem_num)
    #show "Clan changed from "%switch($o_is_brackets=1, "[ ", $o_is_brackets=0, "( ", $o_is_brackets=2, %ansi(11)"("%ansi(reset))%ansi($o_c_color)$_old_item%ansi(reset)%switch($o_is_brackets=1, " ]", $o_is_brackets=0, " )", $o_is_brackets=2, %ansi(11)")"%ansi(reset))" to "%switch($_is_brackets=1, "[ ", $_is_brackets=0, "( ", $_is_brackets=2, %ansi(11)"("%ansi(reset))%ansi($_c_color)$_new_item%ansi(reset)%switch($_is_brackets=1, " ]", $_is_brackets=0, " )", $_is_brackets=2, %ansi(11)")"%ansi(reset))
   }
  }
  ("rank") {
   $_rank_count = %numitems(@c_rank)
   #if ($_rank_count < $_name_count)
   {
    #VAR c_rank %additem(%-3, @c_rank)
    $_new_item = %item(@c_rank, $_mem_num)
    #show "Entry updated for: "%item(@c_name, $_mem_num)
    #show "Rank changed to "$_new_item   
   }
   {
    $_old_item = %item(@c_rank, $_mem_num)
    #VAR c_rank %replaceitem(%-3, $_mem_num, @c_rank)
    $_new_item = %item(@c_rank, $_mem_num)
    #show "Entry updated for: "%item(@c_name, $_mem_num)
    #show "Rank changed from "$_old_item" to "$_new_item
   } 
  }
  ("lvl") {
   $_lvl_count = %numitems(@c_lvl)
   #if ($_lvl_count < $_name_count)
   {
    #VAR c_lvl %additem(%-3, @c_lvl)
    $_new_item = %item(@c_lvl, $_mem_num)
    #show "Entry updated for: "%item(@c_name, $_mem_num)
    #show "Level changed to "$_new_item   
   }
   {
    $_old_item = %item(@c_lvl, $_mem_num)
    #VAR c_lvl %replaceitem(%-3, $_mem_num, @c_lvl)
    $_new_item = %item(@c_lvl, $_mem_num)
    #show "Entry updated for: "%item(@c_name, $_mem_num)
    #show "Level changed from "$_old_item" to "$_new_item
   } 
  }
  ("level") {
   $_lvl_count = %numitems(@c_lvl)
   #if ($_lvl_count < $_name_count)
   {
    #VAR c_lvl %additem(%-3, @c_lvl)
    $_new_item = %item(@c_lvl, $_mem_num)
    #show "Entry updated for: "%item(@c_name, $_mem_num)
    #show "Level changed to "$_new_item   
   }
   {
    $_old_item = %item(@c_lvl, $_mem_num)
    #VAR c_lvl %replaceitem(%-3, $_mem_num, @c_lvl)
    $_new_item = %item(@c_lvl, $_mem_num)
    #show "Entry updated for: "%item(@c_name, $_mem_num)
    #show "Level changed from "$_old_item" to "$_new_item
   }
  }
  ("class") {
   $_class_count = %numitems(@c_class)
   #if ($_class_count < $_name_count)
   {
    #VAR c_class %additem(%-3, @c_class)
    $_new_item = %item(@c_class, $_mem_num)
    #show "Entry updated for: "%item(@c_name, $_mem_num)
    #show "Class changed to "$_new_item   
   }
   {
    $_old_item = %item(@c_class, $_mem_num)
    #VAR c_class %replaceitem(%-3, $_mem_num, @c_class)
    $_new_item = %item(@c_class, $_mem_num)
    #show "Entry updated for: "%item(@c_name, $_mem_num)
    #show "Class changed from "$_old_item" to "$_new_item
   }
  }
  ("delete") {
    #if (@_del_char = 0)
    {
     #show "You have selected to delete "%2" from the records."
     #show "Please type the command again with the same character name in order to confirm."
     _del_char_name=%2
     _del_char=1
     #T+ Clear-Delete
    }
    {
     #if (%2 = @_del_char_name)
     {
      #show "Deleting all records associated with "%2
      $_mem_num = %ismember(%2, @c_name)
      #DELNITEM c_name $_mem_num
      #DELNITEM c_clan $_mem_num
      #DELNITEM c_class $_mem_num
      #DELNITEM c_lvl $_mem_num
      #DELNITEM c_rank $_mem_num
     }
     {
      #show "You have selected to delete "%2" from the records."
      #show "Please type the command again with the same character name in order to confirm."
      _del_char_name=%2
      #T- Clear-Delete
      #T+ Clear-Delete
     }
    }
  }
  ("del") {
    #if (@_del_char = 0)
    {
     #show "You have selected to delete "%2" from the records."
     #show "Please type the command again with the same character name in order to confirm."
     _del_char_name=%2
     _del_char=1
     #T+ Clear-Delete
    }
    {
     #if (%2 = @_del_char_name)
     {
      #show "Deleting all records associated with "%2
      $_mem_num = %ismember(%2, @c_name)
      #DELNITEM c_name $_mem_num
      #DELNITEM c_clan $_mem_num
      #DELNITEM c_class $_mem_num
      #DELNITEM c_lvl $_mem_num
      #DELNITEM c_rank $_mem_num
     }
     {
      #show "You have selected to delete "%2" from the records."
      #show "Please type the command again with the same character name in order to confirm."
      _del_char_name=%2
      #T- Clear-Delete
      #T+ Clear-Delete
     }
    } 
  }
  ("add") {
   #IF (!%isnumber(%2) AND %isnumber(%3) AND %ismember(%4, @_class_list) AND (%ismember(%5, @_clan_list) OR %ismember(%5, @_kingdom_list)))
   {
    #say "Breakpoint A"
    #IF (%ismember(%2, @c_name))
    {
     #show "Sorry, that name already exists in the records."
    }
    {
        #show "Break point B"
        #ADDI c_name %2
        $_test_A = %ismember(%2, @c_name)
        #show "Break point C"
        #show %item(@c_name, $_test_A)
        #VAR c_lvl %additem(%3, @c_lvl)
        #VAR c_class %additem(%4, @c_class)
        #VAR c_clan %additem(%5, @c_clan)
        #VAR c_rank %additem(%-6, @c_rank)
        find %2         
    }
   }
   {
    #show "Sorry, one or more of your arguments was incorrect."
    #show "update add <name> <lvl> <class> <clan> <rank>"
   }
  }
}
{
 #if (%params = "delete all" OR %params = "del all")
 {
  #switch (@_del_all)
   (0) {
    #show "You have chosen to delete all of your current records."
    #show "Please type 'update delete all' two more times in order to confirm."
    _del_all = 1
    #T+ Del-All-Off
   }
   (1) {
    #show "First confirmation made. Type the command one more time to execute the process."
    _del_all = 2
    #T- Del-All-Off
    #T+ Del-All-Off
   }
   (2) {
    #show "Process confirmed twice. Deleting records..."
    #T- Del-All-Off
    $_total_name = %numitems(@c_name)
    $_total_clan = %numitems(@c_clan)
    $_total_class = %numitems(@c_class)
    $_total_lvl = %numitems(@c_lvl)
    $_total_rank = %numitems(@c_rank)
    $_total = @compare($_total_name, $_total_clan)
    $_total = @compare($_total, $_total_class)
    $_total = @compare($_total, $_total_lvl)
    $_total = @compare($_total, $_total_rank)

    $_iter = 0
    #LOOP $_iter,$_total-1 {
      #show "Deleting... "%item(@c_name, 1)
      #wait 200
      #DELNITEM c_name 1
      #DELNITEM c_clan 1
      #DELNITEM c_class 1
      #DELNITEM c_lvl 1
      #DELNITEM c_rank 1

       $_iter = $_iter + 1
     }
      #show $_total" entries deleted successfully."
    }
 }
 {
   #show %2 "not found in the listings."
   #show "Try: update <parameter> <name> <updated entry>"
   #show "Parameters: clan, rank, lvl/level, class"
 }
}

#send %cr]]></value>
  </alias>
  <trigger name="Gatherer-c" priority="4160" regex="true" enabled="false" id="456">
    <pattern>^\[\s?(\d+) (\w{3})\] (\[ [\w '-]+ \]|\( \w+ \))\s+([\w'-]+)\s+([\w '-]+:?(?:\s+)?(?:\(\w+\)|\w+)?)(?:\s+)?(?:\((Leader)\))?(?: \(Recruiter\))?</pattern>
    <value>#if (%ismember(%4, @c_name))
{

 $_trim_rank = @trimrank(%5)
 
 $_trim_clan = @trimclan(%3)
 
 $_member_num = %ismember(%4, @c_name)
 $_curr_lvl = %item(@c_lvl, $_member_num)
 $_curr_class = %item(@c_class, $_member_num)
 $_curr_clan = %item(@c_clan, $_member_num)
 $_curr_rank = %item(@c_rank, $_member_num)
 
 #if ($_curr_lvl != %1)
 {
  $_old_lvl = $_curr_lvl
  #VAR c_lvl %replaceitem(%1, $_member_num, @c_lvl)
  $_new_lvl = %item(@c_lvl, $_member_num)
  #show "Level changed from "$_old_lvl" to "$_new_lvl" for: "%4
 }
 
 $_sel_class = @selclass(%2)
 
 #if ($_sel_class !=  $_curr_class)
 {
  $_old_class = $_curr_class
  #VAR c_class %replaceitem($_sel_class, $_member_num, @c_class)
  $_new_class = %item(@c_class, $_member_num)
  #show "Class changed from "$_old_class" to "$_new_class" for: "%4
 }
 
 #if ($_curr_clan != $_trim_clan)
 {
  $_old_clan = $_curr_clan
  $_old_color = @clancolor(@c_clan, $_member_num)
  $_old_brack = @isbrackets(@c_clan, $_member_num)
  #VAR c_clan %replaceitem($_trim_clan, $_member_num, @c_clan)
  $_new_clan = %item(@c_clan, $_member_num)
  $_new_color = @clancolor(@c_clan, $_member_num)
  $_new_brack = @isbrackets(@c_clan, $_member_num)
  #show "Clan changed from "%if($_old_brack, "[ ", "( ")%ansi($_old_color)$_old_clan%ansi(reset)%if($_old_brack, " ]", " )")" to "%if($_new_brack, "[ ", "( ")%ansi($_new_color)$_new_clan%ansi(reset)%if($_new_brack, " ]", " )")" for: "%4
 }
 
 #if ($_curr_rank != $_trim_rank)
 {
  $_old_rank = $_curr_rank
  #VAR c_rank %replaceitem($_trim_rank, $_member_num, @c_rank)
  $_new_rank = %item(@c_rank, $_member_num)
  #show "Rank changed from "$_old_rank" to "$_new_rank" for: "%4
 }
 
}
{

 #ADDI c_name %4

 #VAR c_lvl %additem(%1, @c_lvl)
 
 #VAR c_class %additem(@selclass(%2), @c_class)
 
 $_trim_clan = @trimclan(%3)
 
 #VAR c_clan %additem($_trim_clan, @c_clan)

 $_trim_rank = @trimrank(%5)

 #VAR c_rank %additem($_trim_rank, @c_rank)
 
 $_new_member = %ismember(%4, @c_name)
 $_lvl = %item(@c_lvl, $_new_member)
 $_class = %item(@c_class, $_new_member)
 $_rank = %item(@c_rank, $_new_member)
 
 $_member_num = %ismember(%4, @c_name)
 
 $_c_color = @clancolor(@c_clan, $_member_num)
 
 $_brackets = @isbrackets(@c_clan, $_member_num)
 
 #say %ansi(7)%if($_brackets = 1, "[ ", "( ")%ansi($_c_color)%item(@c_clan, $_member_num)%ansi(7)%if($_brackets = 1, " ]", " )")" ["$_lvl" "$_class"] "%4" ("$_rank") has been added!"%ansi(reset)
}</value>
  </trigger>
  <func name="clancolor" id="457">
    <value>#RETURN %switch(%item($char_clan, $mem_num) = "Justice", 1, %item($char_clan, $mem_num) = "Bloodlust", 4, %item($char_clan, $mem_num) = "Knighthood", 9, %item($char_clan, $mem_num) = "Shadow", 7, %item($char_clan, $mem_num) = "Slayers", 14, %item($char_clan, $mem_num) = "Conclave", 14, %item($char_clan, $mem_num) = "Red Robes", 12, %item($char_clan, $mem_num) = "Black Robes", 8, %item($char_clan, $mem_num) = "White Robes", 15, %item($char_clan, $mem_num) = "Shalonesti", 2, %item($char_clan, $mem_num) = "Wargar", 11, %item($char_clan, $mem_num) = "Loner", 15, %item($char_clan, $mem_num) = "Renegade", 15, %item($char_clan, $mem_num) = "Dragon", 10, %item($char_clan, $mem_num) = "Angel", 10, %item($char_clan, $mem_num) = "Demon", 10, %ismember(%item(@c_clan, $mem_num), @_kingdom_list), 3)</value>
    <arglist>$char_clan, $mem_num</arglist>
  </func>
  <func name="isbrackets" id="458">
    <value>#RETURN %switch(%ismember(%item($c_clan, $_mem_num), @_remort_list), 0, %ismember(%item($c_clan, $_mem_num), @_clan_list), 1,%ismember(%item($c_clan, $_mem_num), @_kingdom_list), 2, 3)</value>
    <arglist>$c_clan, $_mem_num</arglist>
  </func>
  <func name="selclass" id="459">
    <value>#RETURN %switch($_c_abbr="War","Warrior", $_c_abbr="Ran", "Ranger", $_c_abbr="Bar", "Barbarian", $_c_abbr="Swb", "Swashbuckler", $_c_abbr="Arm", "Armsman", $_c_abbr="Cle", "Cleric", $_c_abbr="Cru", "Crusader", $_c_abbr="Dru", "Druid", $_c_abbr="Sha", "Shaman", $_c_abbr="Pri", "Priest", $_c_abbr="Mag", "Mage", $_c_abbr="Wit", "Witch", $_c_abbr="Wlk", "Warlock", $_c_abbr="Ill", "Illusionist", $_c_abbr="Enc", "Enchantor", $_c_abbr="Brd", "Bard", $_c_abbr="Jng", "Jongleur", $_c_abbr="Cha", "Charlatan", $_c_abbr="Skd", "Skald", $_c_abbr="Thi", "Thief", $_c_abbr="Asn", "Assassin", $_c_abbr="Bnd", "Bandit", $_c_abbr="Nsh", "Nightshade", $_c_abbr="Inv", "Invoker", $_c_abbr="Tra", "Transmuter", $_c_abbr="Bmg", "Battlemage", $_c_abbr="Nec", "Necromancer", $_c_abbr="Pal", "Paladin", $_c_abbr="Skn", "Shadowknight", $_c_abbr="Bla", "Bladesinger", $_c_abbr="Eld", "Eldritch", $_c_abbr="Bat", "Battlerager", $_c_abbr="Run", "Runesmith", $_c_abbr="Mon", "Monk", $_c_abbr="Slr", "Dragonslayer", $_c_abbr="Dra", "Dragon", $_c_abbr="Ang", "Angel", $_c_abbr="Dem", "Demon", $_c_abbr="Gia", "Giant", 1, "Null")</value>
    <arglist>$_c_abbr</arglist>
  </func>
  <func name="trimclan" id="460">
    <value>$_trim_clan = %replace($_trim_clan, "[", "")
$_trim_clan = %replace($_trim_clan, "]", "")
$_trim_clan = %replace($_trim_clan, "(", "")
$_trim_clan = %replace($_trim_clan, ")", "")
#RETURN %trim($_trim_clan)</value>
    <arglist>$_trim_clan</arglist>
  </func>
  <func name="trimrank" id="461">
    <value>$_trim_rank = %replace($_trim_rank, "(Leader)", "")
$_trim_rank = %replace($_trim_rank, "(Recruiter)", "")
#RETURN %trim($_trim_rank)</value>
    <arglist>$_trim_rank</arglist>
  </func>
  <var name="_par_match" type="StringList" id="462"/>
  <trigger name="Gatherer-k" priority="4250" regex="true" enabled="false" id="463">
    <pattern>^\[\s?(\d+) (\w{3})\] (?:\(\w+\))?\((\w+)\)(?:\s[\w '-]+)?\s+([\w'-]+)(?:\s+)?(?:\(Leader\))?(?: \(Recruiter\))?</pattern>
    <value>#if (%ismember(%4, @c_name))
{
 $_member_num = %ismember(%4, @c_name)
 $_curr_lvl = %item(@c_lvl, $_member_num)
 $_curr_class = %item(@c_class, $_member_num)
 $_curr_clan = %item(@c_clan, $_member_num)
 $_curr_rank = %item(@c_rank, $_member_num)
 $_gathered_clan = @selkingdom(%3)
 
 #if ($_curr_lvl != %1)
 {
  $_old_lvl = $_curr_lvl
  #VAR c_lvl %replaceitem(%1, $_member_num, @c_lvl)
  $_new_lvl = %item(@c_lvl, $_member_num)
  #show "Level changed from "$_old_lvl" to "$_new_lvl" for: "%4
 }
 
 $_sel_class = @selclass(%2)
 
 #if ($_sel_class !=  $_curr_class)
 {
  $_old_class = $_curr_class
  #VAR c_class %replaceitem($_sel_class, $_member_num, @c_class)
  $_new_class = %item(@c_class, $_member_num)
  #show "Class changed from "$_old_class" to "$_new_class" for: "%4
 }
 
 #if ($_curr_clan != $_gathered_clan AND $_gathered_clan != "No Kingdom")
 {
  $_old_king = $_curr_clan
  #VAR c_clan %replaceitem($_gathered_clan, $_member_num, @c_clan)
  #show "Kingdom changed from "%ansi(11)"("%ansi(3)$_old_king%ansi(11)")"%ansi(reset)" to "%ansi(11)"("%ansi(3)%item(@c_clan, $_member_num)%ansi(11)")"%ansi(reset)" for: "%4
 }
 
}
{

 #ADDI c_name %4

 #VAR c_lvl %additem(%1, @c_lvl)
 
 #VAR c_class %additem(@selclass(%2), @c_class)
 
 #VAR c_clan %additem(@selkingdom(%3), @c_clan)

 #VAR c_rank %additem("Citizen", @c_rank)
 
 $_new_member = %ismember(%4, @c_name)
 $_lvl = %item(@c_lvl, $_new_member)
 $_class = %item(@c_class, $_new_member)
 $_rank = %item(@c_rank, $_new_member)
 
 $_member_num = %ismember(%4, @c_name)
 
 #say %ansi(11)"("%ansi(3)%item(@c_clan, $_member_num)%ansi(11)")"%ansi(reset)" ["$_lvl" "$_class"] "%4" has been added!"%ansi(reset)
}</value>
  </trigger>
  <func name="selkingdom" id="464">
    <value>#RETURN %switch($_king_abbr="VR", "Verminasia", $_king_abbr="AL", "Althainia", $_king_abbr="AR", "Arkane", $_king_abbr="NT", "New Thalos", $_king_abbr="SH", "Shalonesti", $_king_abbr="THAX", "Thaxanos", $_king_abbr="Darkonin", "Darkonin", $_king_abbr="Verminasia", "Verminasia", $_king_abbr="Abaddon", "Abaddon", $_king_abbr="Ganth", "Ganth", $_king_abbr="Nordmaar", "Nordmaar", $_king_abbr="Retired", "Retired", $_king_abbr="Marauders", "Marauders", 1, "No Kingdom")</value>
    <arglist>$_king_abbr</arglist>
  </func>
  <var name="_kingdom_list" type="StringList" id="465">Althainia|Arkane|Verminasia|Darkonin|Shalonesti|Thaxanos|Arkane|New Thalos|Ganth|Marauders|Abaddon|Nordmaar</var>
  <var name="_clan_list" type="StringList" id="466">Wargar|Shalonesti|Conclave|Slayers|Red Robes|Black Robes|White Robes|Justice|Bloodlust|Shadow|Knighthood</var>
  <var name="_remort_list" type="StringList" id="467">Angel|Dragon|Demon|Giant|Balanx</var>
  <var name="_del_all" id="468">0</var>
  <var name="_del_char" id="469">0</var>
  <var name="_del_char_name" id="470"/>
  <trigger name="Clear-Delete" type="Alarm" priority="4330" enabled="false" id="471">
    <pattern>30</pattern>
    <value>_del_char_name=%null
_del_char=0
#T- Clear-Delete</value>
  </trigger>
  <func name="compare" id="472">
    <value>#RETURN %switch($_val1 > $_val2, $_val1, $_val2 > $_val1, $_val2, 1, $_val1)</value>
    <arglist>$_val1, $_val2</arglist>
  </func>
  <trigger name="Del-All-Off" type="Alarm" priority="4350" enabled="false" id="473">
    <pattern>10</pattern>
    <value>_del_all = 0
#T- Del-All-Off</value>
  </trigger>
  <var name="_class_list" type="StringList" id="474">Warrior|Ranger|Barbarian|Swashbuckler|Armsman|Cleric|Crusader|Druid|Shaman|Priest|Mage|Witch|Warlock|Illusionist|Enchantor|Bard|Jongleur|Charlatan|Skald|Thief|Assassin|Bandit|Nightshade|Invoker|Transmuter|Battlemage|Necromancer|Paladin|Shadowknight|Bladesinger|Eldritch|Battlerager|Runesmith|Monk|Dragonslayer|Dragon|Angel|Demon|Giant</var>
  <trigger name="Gatherer-a" priority="4940" regex="true" enabled="false" id="475">
    <pattern>\[(\d+)\s+(\w+) Ang(?:\s+)?] \( (Angel) \) ([\w'-]+)</pattern>
    <value>#IF (%ismember(%4, @c_name))
{
 $_mem_num = %ismember(%4, @c_name)
 #IF (%item(@c_lvl, $_mem_num) != %1)
 {
  $_old_lvl = %item(@c_lvl, $_mem_num)
  #VAR c_lvl %replaceitem(%1, $_mem_num, @c_lvl)
  $_new_lvl = %item(@c_lvl, $_mem_num)
  #show "Level changed from "$_old_lvl" to "$_new_lvl" for: "%4 
 }
 #if (%item(@c_rank, $_mem_num) != %2)
 {
  $_old_rank = %item(@c_rank, $_mem_num)
  #VAR c_rank %replaceitem(%2, $_mem_num, @c_rank)
  $_new_rank = %item(@c_rank, $_mem_num)
  #show "Rank changed from "$_old_rank" to "$_new_rank" for: "%4
 }
}
{
 #ADDI c_name %4
 #VAR c_lvl %additem(%1, @c_lvl)
 #VAR c_clan %additem(%3, @c_clan)
 #VAR c_class %additem(%3, @c_class)
 #VAR c_rank %additem(%2, @c_rank)
 $_mem_num = %ismember(%4, @c_name)
 $_c_color = @clancolor(@c_clan, $_mem_num)
 $_is_brackets = @isbrackets(@c_clan, $_mem_num)
 #show %switch($_is_brackets = 1, "[ ", $_is_brackets = 0, "( ", $_is_brackets = 2, %ansi(11)"(")%ansi($_c_color)%item(@c_clan, $_mem_num)%ansi(reset)%switch($_is_brackets = 1, " ] ",  $_is_brackets = 0, " ) ", $_is_brackets = 2, %ansi(11)") "%ansi(reset))" "%item(@c_name, $_mem_num)" has been added."
}</value>
  </trigger>
  <trigger name="Gatherer-Off" type="Alarm" priority="4950" enabled="false" id="476">
    <pattern>60</pattern>
    <value>#IF (@_continue)
{
 #send "c"
}
#send %cr
#T- "Gatherer-c"
#T- "Gatherer-k"
#T- "Gatherer-a"
#T- "Stop-who"
#T- "Continue-who"
#T- "Gatherer-Off"</value>
  </trigger>
  <var name="_continue" id="477">0</var>
</class>
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Thu Mar 25, 2010 1:28 pm   
 
I cut out the older scripts. If you need more info, let me know.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Mar 25, 2010 1:44 pm   
 
The message "Yasan not found in the listings." comes from the Else section of the very first #if, not the switch:
Code:
#if (%ismember(%2, @c_name))

Yasan is not in @c_name, Arreana is. That is the difference.
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Thu Mar 25, 2010 1:46 pm   
 
D'oh, I see now. That could be the problem. First if is #if (%ismember(%2, @c_name))
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Fri Mar 26, 2010 6:28 am   
 
Thanks. I can't believe I missed that. Did you notice it right away or did you do something to figure it out? Debugging has always been a weakpoint of mine that I would like to strengthen.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Fri Mar 26, 2010 2:12 pm   
 
I pasted it into a blank session and tried to follow the logic. I didn't see it immediately. I couldn't figure out how it could be failing in the switch (just like you).
So I went looking for the code section containing the line that was printing. From there I traced back the braces to see what command this was within.
If you click on a brace/bracket/parenthesis, it will automatically highlight the matching one. After locating the matching brace of the preceding clause,
it was obvious the output was in the Else part of the #If statement. Highlighting braces can be a handy debugging trick.
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Fri Mar 26, 2010 2:17 pm   
 
Certainly good to know. I also ended up changing the logic a bit to better suit
a more organized parameter setting. It's still not ideal, but it's better. The first
IF statement is now searching for a non-null parameter. From there, the IF
statement moves on to a SWITCH which contains the various parameters.
The check for the name only occurs in the parameters in which it is
relevant (which is most of them), but separating them into an encompassing
IF statement means splitting up the SWITCH, which makes it much more
difficult to follow and thus track problems.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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