Results 1 to 9 of 9

Thread: How do I Spell Active without the spam?

  1. #1

    Default How do I Spell Active without the spam?

    I want to perform a Spell Active command (to update my current active spells list) without displaying the screen scroll spam. Any mechanic to do this via a script? Someone had mentioned using some downstreamhook function, but that is not something I'm familiar with.
    Last edited by Maerit; 07-28-2017 at 12:54 PM.

  2. #2

    Default

    The ;dreavening script on the repo makes use of downstreamhook. You can pretty much just copy and paste that code and just change what you want squelched.

  3. #3

    Default

    Are you using Stormfront? It has a Spell Active window.

  4. #4

    Default

    I use stormfront, but the problem is I have to spell active to refresh the spells for infomon, so my script has to do spell active - I'll check out the dreavening script, thanks!

  5. #5

    Default

    Hmm, I think your script is too smart for me, so I can't identify which areas of the script I have to copy to squelch all the spell active lines.

  6. #6

    Default

    Quote Originally Posted by Maerit View Post
    Hmm, I think your script is too smart for me, so I can't identify which areas of the script I have to copy to squelch all the spell active lines.
    Well I never!!!!!!!!!!!!!!!!!!!!

    Code:
    silence = proc {
    	action = proc { |server_string|
    		if server_string =~ /Elemental Defense II .|Elemental Defense III ./
    			nil
    		else
    			server_string
    		end
    	}
    		DownstreamHook.add("#{script.name}_silence", action)
    }
    
    silence.call
    Just do something like that so whenever, for example, "Elemental Defense II ." appears in the game it will be automatically squelched. You can make it less sensitive, like just whenever "Elemental Defense" pops up on the screen it will be squelched (so you don't need to do Elemental Defense, Elemental Defense II, and Elemental Defense III), but then you run into the risk of a game line you actually want to see being squelched.
    Last edited by Tgo01; 07-28-2017 at 01:41 PM.

  7. #7

    Default

    Cool, so I just changed it to "if server_string =~ /........./". How do I remove the squelch after it's been turned on? I noticed that running the script now makes it always squelch those lines - even after the script ends.
    Last edited by Maerit; 07-28-2017 at 01:50 PM.

  8. #8

    Default

    You can do:

    Code:
    before_dying { 
    	DownstreamHook.remove("#{script.name}_silence")
    }
    To the script so when you kill the script it removes the squelching stuffs.

  9. #9

    Default

    Quote Originally Posted by Maerit View Post
    Cool, so I just changed it to "if server_string =~ /........./". How do I remove the squelch after it's been turned on? I noticed that running the script now makes it always squelch those lines - even after the script ends.
    Almost forgot, in Ruby regex a . means a wildcard so this setup would squelch any line with at least 9 characters.

    You should escape the periods so Ruby will only match actual periods, like so:

    if server_string =~ /\.\.\.\.\.\.\.\.\./

Similar Threads

  1. 604 support for ;magic, Spell[604].active?, check spell
    By Samire in forum The Lich Project
    Replies: 2
    Last Post: 05-22-2021, 03:00 AM
  2. SPELL ACTIVE {target} and SPELL PRIVACY
    By Damsels & Distress in forum The Lich Project
    Replies: 0
    Last Post: 08-20-2020, 04:30 PM
  3. Spell Active Issue
    By SashaFierce in forum The Lich Project
    Replies: 4
    Last Post: 01-28-2016, 09:10 AM
  4. Lost Spell Active & Lumnis Info
    By lyranni in forum The Lich Project
    Replies: 1
    Last Post: 03-18-2014, 03:01 PM
  5. Lich: Sigil Durations and Spell.active?
    By Danical in forum The Lich Project
    Replies: 5
    Last Post: 05-17-2008, 03:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •