Results 1 to 3 of 3

Thread: 615 Script?

  1. #1

    Post 615 Script?

    Checks if 615 is active
    If Not active, casts (based on stance argument provided to script)


    Basically right now i am casting 615 at every creature, but 615 remains active from kill to kill so it would be more efficient to only cast it when it is down. Is there a script like this already, or could someone perhaps write one? I think it would be pretty simple only a few lines?

    Thnx.

  2. #2

    Default

    Only problem is neither Lich nor SPELL ACTIVE tracks whether or not 615 is active.

    You could get the messaging for when you cast 615 and for when 615 ends (something like the swarm fades or something), which could be used to track whether or not 615 is active. Only problem is I tested it just now and if the critter or you leave the room you no longer get the messaging for when the swarm fades, so in that case you would have no way of knowing when the spell ends and the best you could do is have a timer that just assumes the spell ends after 30 seconds or something.

  3. #3

    Default

    So I suppose what you could do is something like this:

    Code:
    $spell_615_active = nil
    
    Thread.new{
    	loop{
    		wait_until { $spell_615_active }
    		150.times{
    			break if $spell_615_active.nil?
    			sleep 0.2
    		}
    		$spell_615_active = nil
    	}
    }
    
    while line = get
    	$spell_615_active = nil if line =~ /The insect swarm disperses and the buzzing subsides\./
    end
    Which would do what I mentioned above: look for when the swarm fades and waits 30 seconds before assuming the swarm has faded. This script would need to be running in the background while you're hunting, or you could just leave it running all the time, it won't hurt anything.

    Then in your attacking script you could do something like:

    Code:
    if $spell_615_active.nil?
    	Spell[615].cast
    	$spell_615_active = true
    end
    Again the script won't be perfect because of the aforementioned critter/you leaving the room before you see the message about the swarm fading, but at most you would just have to wait 30 seconds before the script would try again. Or reduce the wait time to 10 or 15 seconds, it all good!

    You could also have the script check to see if there is a swarm in the room with you and if there is the 30 second timer won't assume the swarm has dispersed because...well...the swarm is there.
    Last edited by Tgo01; 06-29-2021 at 05:49 AM.

Similar Threads

  1. Learn how to script with this simple hunting script
    By Tgo01 in forum The Lich Project
    Replies: 69
    Last Post: 08-24-2020, 03:20 PM
  2. adding a custom script to my script folder
    By sentral in forum The Lich Project
    Replies: 1
    Last Post: 08-09-2016, 10:05 AM
  3. Replies: 19
    Last Post: 02-03-2010, 09:49 PM
  4. In Search of COL Script and a Huntin Script...
    By Gizmo in forum Scripting Discussion
    Replies: 5
    Last Post: 01-13-2005, 06:15 PM
  5. Pookas: Smart cone script and 906 bolt script.
    By J-Tech in forum Scripting Discussion
    Replies: 27
    Last Post: 01-15-2004, 03:06 PM

Posting Permissions

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