cMUD: Enhanced Login Selections

MUD Client Links and Help
Post Reply
Inames
Bilge Rat
Posts: 5
Joined: Mon Jul 17, 2023 4:02 pm

cMUD: Enhanced Login Selections

Post by Inames »

So the whole script would setup a file system encompassing all races, and all classes, so that you might save unique settings in each folder and disable/enable them as needed depending on which character you were on. Personally I have a subfolder for each of my characters by name inside of each of the race folders. I.e. I have a subfolder for each of my elf characters (Inames, Aleadis, Itanul, etc.)inside of the Moon Elf "race" folder... But realistically you can set up folders for character names anywhere in your file system, or if you dont want to have a special folder for each character, just change the loadchar alias to

Code: Select all

#Forall {%1|%-2} {#T+ %i}
.

The "enhanced" bit mostly refers to the fact that the name of the character is made into clickable text, that can send commands to your client, and select the name of the character you want to log into for the MUD. so if that's all you're interested in you can just pull out the Login Selection trigger and change the send line.

Code: Select all

from

send '{LoadChar %2 %4 %5}'

to

send '%2'

(after importing the script, the xml )

FULL SCRIPT: make sure to copy/paste into notepad and save as .xml before importing to cmud

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <class name="CharSettings">
    <class name="ClassSettings">
      <class name="Tank">
        <class name="Blackguard" initdisable="true" enabled="false"/>
        <class name="Paladin" initdisable="true" enabled="false"/>
        <class name="Warrior" initdisable="true" enabled="false"/>
      </class>
      <class name="Hitter">
        <class name="Ranger" initdisable="true" enabled="false"/>
        <class name="Bard" initdisable="true" enabled="false"/>
        <class name="Battlechanter" initdisable="true" enabled="false"/>
        <class name="Hexblade" initdisable="true" enabled="false"/>
        <class name="Rogue" initdisable="true" enabled="false"/>
      </class>
      <class name="Priest">
        <class name="Cleric" initdisable="true" enabled="false"/>
        <class name="Druid" initdisable="true" enabled="false"/>
        <class name="Shaman" initdisable="true" enabled="false"/>
      </class>
      <class name="Mage">
        <class name="Elementalist" initdisable="true" enabled="false"/>
        <class name="Enchanter" initdisable="true" enabled="false"/>
        <class name="Illusionist" initdisable="true" enabled="false"/>
        <class name="Invoker" initdisable="true" enabled="false"/>
        <class name="Lich" initdisable="true" enabled="false"/>
        <class name="Necromancer" initdisable="true" enabled="false"/>
        <class name="Psionicist" initdisable="true" enabled="false"/>
        <class name="Sorcerer" initdisable="true" enabled="false"/>
      </class>
    </class>
    <trigger name="Login Selection" priority="3950">
      <pattern>(%s%d)~) (%w)(%s%w%s%d%s)(%w) ~((*)~)</pattern>
      <value>#sub {%1 <send '{LoadChar %2 %4 %5}'>%ansi(bold,white)%2</send> %ansi(white)%3 %subregex(%4,"Bard|Battlechanter|Blackguard|Cleric|Druid|Elementalist|Enchanter|Hexblade|Illusionist|Invoker|Lich|Necromancer|Paladin|Psionicist|Ranger|Rogue|Shaman|Sorcerer|Warrior",%switch(
      %4 = Bard,%ansi(blue,white)Bard%ansi(default),
      %4 = Battlechanter,%ansi(green)Battlechanter,
      %4 = Blackguard,%ansi(high,black)Blackguard,
      %4 = Cleric,%ansi(cyan)Cleric,
      %4 = Druid,%ansi(green)Druid,
      %4 = Elementalist,%ansi(brown)Elementalist,
      %4 = Enchanter,%ansi(high,blue)Enchanter,
      %4 = Hexblade,%ansi(magenta)Hexblade,
      %4 = Illusionist,%ansi(magenta)Illusionist,
      %4 = Invoker,%ansi(high,red)Invoker,
      %4 = Lich,%ansi(black,magenta)Lich%ansi(default),
      %4 = Necromancer,%ansi(high,black)Necromancer,
      %4 = Paladin,%ansi(high,white)Paladin,
      %4 = Psionicist,%ansi(gray,red)Psionicist%ansi(default),
      %4 = Ranger,%ansi(high,green)Ranger,
      %4 = Rogue,%ansi(red)Rogue,
      %4 = Shaman,%ansi(high,cyan)Shaman,
      %4 = Sorcerer,%ansi(magenta)Sorcerer,
      %4 = Warrior,%ansi(blue)Warrior)) %ansi(white,black)~(%subregex(
        %5,"Barbarian|Drow Elf|Duergar|Gnome|Half-Elf|Half-Orc|Halfling|Human|Illithid|Moon Elf|Ogre|Orc|Shield Dwarf|Troll|Yuan-Ti",%switch(
          %5 = "Barbarian",%ansi(high,blue)Barbarian,
          %5 = "Drow Elf",%ansi(magenta)Drow Elf,
          %5 = "Duergar",%ansi(red)Duergar,
          %5 = "Gnome",%ansi(high,red)Gnome,
          %5 = "Half-Elf",%ansi(high,green)Half%ansi(white)~-%ansi(high,green)Elf,
          %5 = "Half-Orc",%ansi(green)Half%ansi(white)~-%ansi(green)Orc,
          %5 = "Halfling",%ansi(brown)Halfling,
          %5 = "Human",%ansi(cyan)Human,
          %5 = "Illithid",%ansi(high,magenta)Illithid,
          %5 = "Moon Elf",%ansi(cyan)Moon Elf,
          %5 = "Ogre",%ansi(blue)Ogre,
          %5 = "Orc",%ansi(green)Orc,
          %5 = "Shield Dwarf",%ansi(yellow)Shield Dwarf,
          %5 = "Troll",%ansi(green)Troll,
          %5 = "Yuan-Ti",%ansi(high,black)Yuan-Ti))%ansi(white,black)~)}</value>
    </trigger>
    <alias name="LoadChar">
      <value>%1
      #Forall {%1|%2|%-3} {#T+ %i}</value>
    </alias>
    <class name="RaceSettings">
      <class name="Barbarian" initdisable="true" enabled="false"/>
      <class name="Drow Elf" initdisable="true" enabled="false"/>
      <class name="Duergar" initdisable="true" enabled="false"/>
      <class name="Gnome" initdisable="true" enabled="false"/>
      <class name="Half-Elf" initdisable="true" enabled="false"/>
      <class name="Half-Orc" initdisable="true" enabled="false"/>
      <class name="Halfling" initdisable="true" enabled="false"/>
      <class name="Human" initdisable="true" enabled="false"/>
      <class name="Illithid" initdisable="true" enabled="false"/>
      <class name="Moon Elf" initdisable="true" enabled="false"/>
      <class name="Ogre" initdisable="true" enabled="false"/>
      <class name="Orc" initdisable="true" enabled="false"/>
      <class name="Shield Dwarf" initdisable="true" enabled="false"/>
      <class name="Troll" initdisable="true" enabled="false"/>
      <class name="Yuan-Ti" initdisable="true" enabled="false"/>
    </class>
  </class>
</cmud>
Post Reply