Results 1 to 5 of 5

Thread: Script to start/ end scripts?

  1. Default Script to start/ end scripts?

    I love the ;disarm-no-more script when hunting in OTF. I also love ;webdispel for OTF hunting.

    Issues:

    When swimming through the muck disarm-no-more freaks out and I have drowned 2X because I was not paying attention (hunt over, ;go 188 - oh look I am dead).

    With web dispel I keep killing Ylandra's webs when she is hunting bandits.

    So I need something to start these scripts and then end them? Maybe based on entering a room?

    Any suggestions?

    Thanks,

    Brian

  2. #2
    Join Date
    Mar 2008
    Location
    Virginia, USA
    Posts
    287

    Default

    you could create a script that looks for the starting room# to be true, then it launches support scripts, then it goes into loop waiting to see you hit one of the boundary rooms (ie you left the hunting area) and it would kill them. Should be something like:

    Code:
    hunting_scripts = Array["disarmed","webdispel"]
    
    before_dying {
    	hunting_scripts.each { |s| kill_script(s) }
    }
    
    loop {
      line = get
      if Room.current.id == UserVars.op['hunting_room_id'].to_i
        hunting_scripts.each { |s| Script.start(s) }
        loop {
    		line = get
    		if UserVars.op['hunting_boundaries'].split(",").map{ |s| s.to_i }.include? Room.current.id
    			hunting_scripts.each { |s| kill_script(s) }
    			break
    		end
        }
      end
    }
    Websites
    Lich Wiki Info
    EO Scripts Github Repository - Collaborative script development by the community.
    EO Lich5 Github Repository - Collaborative Lich Development for GS4 & DR for modern Ruby.
    Elanthia Online Forums Archive

    Player of Tysong

  3. Default

    That's exactly what I was hoping for and I assume I would put the script names I want to run in the array? Makes sense... Thanks for the help!!!

    I was actually thinking a bit more simple with matching a specific room # to start and a specific # to leave - but this is farm more adaptable.

  4. #4

    Default

    I think we should probably just fix disarm-no-more. Part of the magic of that script is that it also watches for something to get knocked out of your hands as you're running in and out of a place, which is a big deal in OTF. There's code in disarm-no-more that's supposed to keep it from freaking out when you swim through the water, but it's obviously not working. I'm going to take a look at it this weekend and see if I can figure out why.

  5. Default

    Imp - you get a chance to look at this?

Similar Threads

  1. pause at start of running Scripts
    By yagan in forum The Lich Project
    Replies: 5
    Last Post: 11-30-2017, 06:38 PM
  2. Possible to start a script earlier in the login process?
    By LostRanger in forum The Lich Project
    Replies: 0
    Last Post: 04-25-2017, 12:54 PM
  3. Replies: 9
    Last Post: 10-29-2012, 09:05 PM
  4. How to Start a War
    By ClydeR in forum Politics
    Replies: 0
    Last Post: 06-20-2012, 11:25 AM
  5. Scripts start moving super slow after about 10-15 minutes
    By whiteflash in forum The Lich Project
    Replies: 21
    Last Post: 09-27-2011, 09:52 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
  •