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 =~ /\.\.\.\.\.\.\.\.\./

Posting Permissions

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