Page 97 of 153 FirstFirst ... 47879596979899107147 ... LastLast
Results 961 to 970 of 1527

Thread: Bigshot: The New Optimus Prime

  1. #961

    Default

    Quote Originally Posted by zzentar View Post
    this is an ass backwards way to do it but, make the resting room the first room in the camp, then make the first script in your resting script a movement script to go path then go to your resting room. Its ugly but it works really well.
    Hah. That makes sense in a strange way. Its why I was missing the problem. Thanks. If anyone has additional ways to do this I am still interested.
    Chris

  2. #962

    Default

    Quote Originally Posted by DaCapn View Post
    There are really three issues with movement in the rift:
    (1) Getting rifted (make a helper script that checks room criteria, pauses bigshot and runs you back to a known location, then unpauses it).
    (2) Avoiding the threads/stairs with wandering routines.
    (3) Avoiding voids (yeah... sort of like (1)... you may want to modify bigshot and have a look at how the avoid clouds setting is used but that doesn't help if you're in the neighboring room
    Thanks for the advice DaCapn, when I'm feeling a bit more ambitious I might see if I can get this working.

    In the meantime I noticed Bigshot doesn't skip rooms with another player's disk in it like it is supposed to.

    Here is the part of the code that I think is supposed to make it skip such rooms:

    Code:
            loop { # wander until we find a valid target
                group = checkpcs.to_a
                wander.call
                sleep 0.1
                next unless (checkpcs.to_a - group).empty?
                next if GameObj.loot.find { |obj| (obj.noun == 'disk') and (obj.name !~ /#{group.join('|')}/) }
                start_npcs = npcs = GameObj.npcs
                npcs.delete_if { |npc| (npc.status =~ /dead|gone/) }
                next if npcs.nil? or npcs.empty?
                if npcs.size > 0 # we call this twice.... I don't like it either
                    sort_npcs.each { |i| return i if valid_target?( i, true ) }
                end
            }
    Thing is it looks fine to me, can anyone else see what the problem might be?

  3. #963

    Default

    That happened to me once when the person who cast mass spells was in my area. For some reason it was like the XML still showed me being grouped to that person so it ignored their disk. Probably not your problem however.
    Chris

  4. #964

    Default

    Quote Originally Posted by Buckwheet View Post
    That happened to me once when the person who cast mass spells was in my area. For some reason it was like the XML still showed me being grouped to that person so it ignored their disk. Probably not your problem however.
    Unfortunately not. It's the same person I'm doing it to over and over again. At first they were understanding but now they are getting a bit upset and I can't say I blame them.

    But do you normally not have a problem with bigshot ignoring disks Buckwheet? Is it just something I'm doing wrong then? There isn't a setting I have overlooked for this is there?

  5. #965

    Default

    I rarely use bigshot to travel around. I sort of camp between a couple rooms when I use it. I primarily use it just because of the ability to control my team and have them prioritize targets and attack types. But my experience has been that it sees disk just fine from when I used it a lot in shattered.
    Chris

  6. #966

    Default

    Still not sure what's up with bigshot not seeing disks for me.

    Another question, is there a way to change any of the settings in bigshot (like starting room and resting room) from the command line without having to use the GUI?

  7. Default

    For Rift hunting, avoiding threads and stairs isn't as hard as you might think. Each room on each plane has a path to find and use the door/mirror/thread/stair/maw/fissure if there is one on that plane. The thing is, except for the door and mirror, those things leave you in a random room. There's no way to tell the map database that the path leads to a random room, so in the database the path always leads to the same room, even though it's usually wrong, and it just restarts go2 when it gets there. For example, on plane 4, boundaries of 12207 will keep you from climbing the thread, and 12122 will keep you out of the scatter. To find the boundaries for the other planes, just go to the plane and do

    ;e echo Room.current.wayto.inspect

    and pick out the room numbers that point at StringProcs. Or use narost to find a room number and do

    ;e echo Room[number].wayto.inspect

    That doesn't really help with being rifted though. Here's what I think is the right way of dealing with being rifted, which also takes care of the first problem. Rewrite the wander routine to use a list of acceptable rooms instead of a list of boundaries. Each time it's called, it picks the adjacent room that is in the list and has been visited least recently, or if no adjacent rooms are in the list, start up go2 and send it to the nearest room in the list.

    Here's the code I've been using for this. I don't use bigshot though, so it's not going to work with just a copy and paste.

    Code:
    hunting_ground_rooms = [ '1001', '1002', '1003', '1004', 'etc' ]
    wander_rooms = Array.new
    wander = proc {
    	sleep 0.1
    	room = Room.current
    	acceptable_adjacent_rooms = room.wayto.keys & hunting_ground_rooms
    	not_visited_rooms = acceptable_adjacent_rooms.find_all { |r| not wander_rooms.include?(r) }
    	if not_visited_rooms.empty?
    		next_room = wander_rooms.find { |r| acceptable_adjacent_rooms.include?(r) }
    	else
    		next_room = not_visited_rooms[rand(not_visited_rooms.length)]
    	end
    	if next_room
    		wander_rooms.delete(next_room)
    		wander_rooms.push(next_room)
    		way = room.wayto[next_room]
    		if way.class == String 
    			move(way)
    		else
    			way.call
    		end
    	else
    		start_script 'go2', [ Room.current.find_nearest(hunting_ground_rooms.collect { |id| id.to_i }).to_s ]
    		wait_while { running?('go2') }
    	end
    }
    Get Lich - Vote for Gemstone (topmudsites.com)

  8. #968

    Default

    Quote Originally Posted by Tillmen View Post
    To find the boundaries for the other planes, just go to the plane and do

    ;e echo Room.current.wayto.inspect

    and pick out the room numbers that point at StringProcs.
    That worked perfectly, I was able to keep my character on Plane 3 by just entering 3 boundry rooms. I also appreciate your code for dealing with Rifting but I don't think I'm quite up to editing my bigshot script to make it work with it, I'm still pretty new to lich/ruby scripting.

    I figure for now until I can write up my own hunting script or edit bigshot I'll just write up a script that will watch for the messaging of when you get rifted then I'll have it stop bigshot and start up go2 to bring me back to the starting room of Plane 3.

    Thanks again Tillmen, you the man.

  9. #969

    Default

    I'm getting around to using your wander code there Tillmen and I was just wondering, what is the difference between a procedure and a method? I think they're called methods anyways, I do:

    Code:
    def blahblah
         code stuff
         code stuff
    end

  10. #970

    Default

    Quote Originally Posted by Tgo01 View Post
    I'm getting around to using your wander code there Tillmen and I was just wondering, what is the difference between a procedure and a method? I think they're called methods anyways, I do:

    Code:
    def blahblah
         code stuff
         code stuff
    end
    I'm no Ruby guru but proc's (procedures) appear to be similar to lambda/anonymous functions from other languages. Definitions are more akin to regular functions.

    http://en.wikipedia.org/wiki/Anonymous_function
    Last edited by SpiffyJr; 02-20-2013 at 04:22 PM.
    It must be hard to type with ghostcrawlers penis lodged in your ass. - g++

Similar Threads

  1. Bigshot tail without bigshot head?
    By Erez in forum The Lich Project
    Replies: 2
    Last Post: 11-26-2016, 06:15 PM
  2. Do you want Optimus Prime to hunt for you?
    By Alorn15 in forum The Lich Project
    Replies: 50
    Last Post: 06-20-2010, 09:34 PM
  3. Optimus Crap
    By Alorn15 in forum The Lich Project
    Replies: 3
    Last Post: 04-11-2010, 11:42 AM
  4. Replies: 8
    Last Post: 10-23-2007, 03:56 PM
  5. Have Optimus Prime call your friends
    By Drew in forum Social Forum
    Replies: 4
    Last Post: 10-15-2007, 01:01 PM

Tags for this Thread

Posting Permissions

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