From c08f480bbee11441962c759e9574f8812d76bea6 Mon Sep 17 00:00:00 2001 From: OSXLich-Doug Date: Tue, 17 Jun 2025 21:49:25 -0400 Subject: [PATCH 1/5] feat(gs): DRAFT new elogin 5.12 + This proposal for a new elogin comes with some particulars. Please check 'other scripts' channel for details and helpful hints. --- scripts/elogin.lic | 698 +++++++++++++++++++++++++++++---------------- 1 file changed, 450 insertions(+), 248 deletions(-) diff --git a/scripts/elogin.lic b/scripts/elogin.lic index a105bd477..08002347e 100644 --- a/scripts/elogin.lic +++ b/scripts/elogin.lic @@ -1,287 +1,489 @@ =begin - elogin.lic: A script for logging into other characters from within lich. - - Useful for switching characters or logging into characters on other accounts. - - This script uses the same entry.dat as lich.rbw. - list/add/modify/delete commands are available to modify the entry.dat from within the script. - - You have the option of running a script(s) at startup. - - Please see ;elogin help for additional informaiton. - - author: elanthia-online - contributors: Phalen33 - game: Gemstone - tags: login - required: Lich > 5.0.1 - version: 1.2.3 - - 1.2.3 (2024-12-02) - - Wrap RUBY & LICH location path in quotes incase of spaces in path - 1.2.2 (2024-11-24) - - Remove references to ;trust script, deprecated - 1.2.1 (2024-10-10) - - Anchor regex comparisons and convert to_s - 1.2.0 (2024-07-22) - - Add support for GSTest instance - 1.1.3 (2023-11-15) - - Change ruby process launching from using system() to Process.spawn() - 1.1.2 (2023-03-28) - - Change from using SAL login method to native character saved entry CLI login method - 1.1.1 (2023-01-23) - - Update for Ruby v3 compatibility - 1.1.0 (2022-02-01) - - Fix for Wrayth login method - - Add Lich version check - 1.0.0 (2015-09-19) - - Initial release + e_elogin.lic – Character launcher for Lich 5+ + Uses fallback-aware LoginHelpers to select best character entry and spawn login. + + Usage: + ;elogin help # Show usage + ;elogin set realm # Set game realm + ;elogin [script1,script2] # Login with optional scripts + ;elogin add # Add character entry + ;elogin delete # Delete character entry =end LICH_GEM_REQUIRES = '5.0.1' if Gem::Version.new(LICH_VERSION) < Gem::Version.new(LICH_GEM_REQUIRES) - if $frontend == 'stormfront' || $frontend == 'profanity' - _respond "\" + "########################################" + "\<\/preset\>" - _respond "\" + "Script:#{script.name} now requires a newer version of Lich(#{LICH_GEM_REQUIRES}+) to run." + "\<\/preset\>" - _respond "\" + "Please update to a newer version." + "\<\/preset\>" - _respond "" - _respond "\" + "Currently Running Lich Version: #{Gem::Version.new(LICH_VERSION)}" + "\<\/preset\>" - _respond "\" + "For help updating visit: https://gswiki.play.net/Lich_(software)/Installation" + "\<\/preset\>" - _respond "\" + "########################################" + "\<\/preset\>" - else - _respond "##" + "########################################" - _respond ">" + "Script:#{script.name} now requires a newer version of Lich(#{LICH_GEM_REQUIRES}+) to run." - _respond ">" + "Please update to a newer version." - _respond ">" + "" - _respond ">" + "Currently Running Lich Version: #{Gem::Version.new(LICH_VERSION)}" - _respond ">" + "For help updating visit: https://gswiki.play.net/Lich_(software)/Installation" - _respond "##" + "########################################" - end + echo "elogin.lic requires Lich v#{LICH_GEM_REQUIRES}+." exit end -if script.vars[1].nil? || script.vars[1].to_s =~ /^help$/i - echo "elogin.lic: A script for logging into other characters from within lich" - echo - echo "You must first set a realm for use with the script commands." - echo ";elogin set realm " - echo - echo "Your frontend setting will be set using your current client (wizard or Wrayth)" - echo "when using the add or modify command" - echo - echo "This script uses the same entry.dat file as the quick game entry in lich.rbw." - echo "You can add character information using lich.rbw by saving the information for quick game entry." - echo "You can also use this scripts add/delete/modify options for managing saved character information." - echo - echo "List all characters saved in the entry.dat," - echo ";elogin list" - echo - echo "Add a character\'s information to the entry.dat file," - echo ";elogin add " - echo - echo "Delete a character from the entry.dat file," - echo ";elogin delete " - echo - echo "Modify the login information for an existing character," - echo ";elogin modify " - echo - echo "Login as a character using saved account information" - echo ";elogin " - echo - echo "Login as a character and run a script after logging in." - echo "Multiple scripts can be run by seperating names with a comma." - echo ";elogin