PDA

View Full Version : wraith hunter



vontez
09-29-2006, 07:00 PM
looking for a wraith hunter for a bolt wizard for use with SF. Icemule/Landing is fine.

Caede
09-29-2006, 11:49 PM
Alas, for Lich.

I'm in the process of redoing all of my Lich hunting scripts to be a 'pluggable' set of classes where I can swap characters / areas into a base hunting script. BUT... until then, here! Have a kludgey wraith hunter that starts from the Dark One's Keep in Landing GY Wraiths.

Some notes:

1) This is suitable for a runestave wizard, or any wizard with their left hand open. (Mine uses a polearm)
I use the auto-pickup option in SF, which is why it does checkleft, then puts it in my lootsack.
Feel free to substitute the much more intelligent 'fetchloot' command for the loot_routine, you'll be happier.

2) This casts 904 as long as there is at least 5 mana, then switches to 901 until you have 1 mana left.

3) Uses CoL signs. Just modify the spellup portion to remove these if you want, and add your own spells. I tend to spellup manually between runs, while the script is still running but waiting to recoup mana.

4) It seems to occasionally get hung up on wraith talons. Guess this is a bug in ;walk? I hadn't noticed it until I dragged this out of retirement tonight to test it.



def start_hunt
post_hunt
while ((checkmana != maxmana) || (checkfried))
pause 5
end
pre_hunt
path_from_rest
hunt_loop
end

def post_hunt
stop_script 'signs'
end

def pre_hunt
fput 'sign of warding'
fput 'sign of defending'
fput 'sign of smiting'
fput 'sign of deflection'
fput 'sign of swords'
fput 'sign of striking'
fput 'sign of shields'
start_script 'signs'
end

def hunt_loop
diskoverride = false
until fried?

walked = false
unless !checkpcs and checknpcs and !diskoverride
walked = true
diskoverride = false
walk {
!checkpcs and checknpcs
}
end

diskcheck = waitfor "You also (?:see|notice) " if walked
disks = diskcheck.scan(/\w+ disk/)
if disks.find { |disk| disk.split.first != Char.name }
diskoverride = true
next
end

waitrt?
attack_routine
until waitfor('you don\'t have a spell prepared','but it is dead', 'roundtime', 'no valid target', 'dies', 'motionless','lifelessly', 'could not find', 'target','You do not currently have a target','what\?') =~ /you don\'t have a spell prepared|but it is dead|what|dies|motionless|lifelessly|no valid target|you do not currently have a target/i
fput 'stance defensive'
pause 2
waitrt?
attack_routine
end
waitrt?
loot_routine
end
goto "flee_to_rest"
end

def path_from_rest
fput 'stand' if not standing?
waitrt?
fput 'n'
fput 's'
fput 's'
fput 's'
fput 'search'
fput 'go stair'
end

def attack_routine
fput 'stand' if not standing?
if (checkmana > 4)
fput 'prep 904'
fput 'stance offensive'
fput 'cast at wraith'
elsif (checkmana > 1)
fput 'prep 901'
fput 'stance offensive'
fput 'cast at wraith'
else
goto "flee_to_rest"
end
end

def loot_routine
fput 'loot'
fput 'stance defensive'
if (checkleft)
fput "open my #{Lich.lootsack}"
fput "put left in #{Lich.lootsack}"
fput "close #{Lich.lootsack}"
end
fput 'look'
end

start:
match "start_hunt","Lavish can not even begin to describe this room."
fput "look"
matchwait

hunt_loop:
hunt_loop()
goto "start"

start_hunt:
start_hunt()
goto "start"


flee_to_rest:
match "start_hunt","Lavish can not even begin to describe this room."
match "flee1", "Heat as from the depths of the underworld assaults you as you enter the room."
match "flee2", "Dead bodies are everywhere. They are thrown into stacks that go all the way to the ceiling."
match "flee3", "As you enter this cavern, it quickly opens up into a spacious dome."
match "flee4", "The fog hangs very close to the floor here."
match "flee5", "This room looks much like an infirmary by the contents, but somehow you get the feeling that healing has nothing to do with what goes on here."
match "flee6", "The walls still have that melted look except where some excavation has been done to widen the area or search for something"
match "flee7", "You know now what was eating at you in the crypts above."
match "flee8", "The ground is covered with the swirling monster of a mist."
match "flee10", "The heat is not quite so intense here. But the air is still hot with humidity."
match "flee11", "A long table designed to hold many a guest sits in the middle of the room."
match "flee12", "Magma bubbles from the ground here."
match "flee13", "The heat here is very intense, and you take short shallow breaths to prevent your lungs from being singed."
match "flee14", "There is a large smelting pot suspended by stone supports hanging over a small magma pool here."
match "flee16", "You now see what has caused the fog."
match "flee17", "This room is the bed chamber."
match "flee18", "A thin layer of gold reflects from the torch as you enter the room."
match "flee19", "A small stack of bodies, stripped of all valuables, are stacked in the corner."
match "flee20", "In the corner stands what could only be described as a giant chopper."
match "flee21", "This room is empty except for a few bloody barrels used to transport something, which are empty now but caked with dried blood."
match "fleefinal", "This room houses bins and containers"
fput "look"
matchwait

flee1:
fput "sw"
goto "flee2"

flee2:
fput "sw"
goto "flee3"

flee3:
fput "se"
goto "fleefinal"

flee4:
fput "nw"
goto "fleefinal"

flee5:
fput "sw"
goto "flee4"

flee6:
fput "sw"
goto "flee5"

flee7:
fput "n"
goto "flee8"

flee8:
fput "w"
goto "flee10"

flee10:
fput "w"
goto "flee1"

flee11:
fput "n"
goto "flee12"

flee12:
fput "e"
goto "flee13"

flee13:
fput "e"
goto "flee1"

flee14:
fput "se"
goto "flee6"

flee16:
fput "n"
goto "flee3"

flee17:
fput "n"
goto "flee16"

flee18:
fput "w"
goto "flee17"

flee19:
fput "w"
goto "flee4"

flee20:
fput "w"
goto "flee19"

flee21:
fput "s"
goto "flee20"

fleefinal:
fput "go crack"
fput "release"
sleep 0.1
goto "start"


It's nasty, but it works fairly well. The only thing is with my CoL wizard I have trouble accurately capturing the death messaging, hence the giant =~ block. With my Voln characters, I can catch undead deaths 100% with the 'weeping' messaging.

Anyone have a surefire way to capture deaths?

Enjoy. Oh, and this is kinda speedy. Use AFK at your peril.

Celephais
09-30-2006, 08:38 AM
I don't use Lich, but in order to capture deaths 100% of the time I use the room description... That might sound obvious, the "that appears dead." is kind of a dead giveaway.

To avoid having to look again you'd need to be using stormfront and Lich would need to let you run code against the component tags (does it?)

Caede
10-02-2006, 02:09 PM
I updated the script with a smaller, more consistent check for death. Still not 100%, I don't think, but I've run this for about 30 loops without a problem.

I also updated the 'run back to the crack' stuff, showcasing how with Lich you can put together a bastard script of Ruby and Wizard-style scripting.

Merzbow
11-25-2006, 01:52 PM
Here is one specifically designed to advance low-level Volners strictly through wraith-hunting.

Shaelun
11-26-2006, 10:03 PM
A few random suggestions; selectput is confusing and requires v3.43+, but I'm finding it so useful I dunno why I didn't add it sooner...

Reliable "catch the death message" thing...


death_msgs = [ 'dies', 'still', 'collapsing lifelessly', 'could not find', 'target', 'what\?' ]
not_dead_msgs = [ "Roundtime", "wait", "type ahead" ]
selectput("kill", death_msgs, not_dead_msgs, 5) { waitrt? }
waitrt?
fput "loot"
fetchloot

Lich's goto script plots the shortest route and includes getting to/from wraiths; why not let it do the work...


start_script "goto", "some node or other destination"
unpause_script "goto"

And yes, if you're able to make use of it, Lich lets you scan the raw data it sees from the game; I've done absolutely nothing with that, personally, but Xygon put together a neat little script the other day if you want an example: http://www.xygon.net/images/guitweaklich.png

Have fun.

Annioxi
07-27-2009, 07:35 PM
I created a very basic wraith script that moves room to room and just swings.

My problem is that they cast fear which sends you bolting to a new room which causes my script to stick.

Tell me if this fix looks correct

checkroom:
put look
match goback1 You bolt northward!
match goback2 You bolt southward!
match goback3 You bolt westward!
match goback4 You bolt eastward!
match R%c You can't go there
match filter wraith
match R%c Obvious paths:
match R%c Obvious exits:
matchwait

goback1:
move s
goto checkroom

goback2:
move n
goto checkroom

goback3:
move e
goto checkroom

goback4:
move w
goto checkroom


Thanks

Donquix
07-27-2009, 07:41 PM
That won't work. just have it swing as per normal, on the swing have it match "What were you refering to?" (or whatever the message is for when you attack a target that isn't in the room) to start patrolling again, it will find the wraith again eventually.

If you wanted to have it try to get back to where the wraith is, you could have it peer n/s/e/w/ne/nw/se/sw to try to find the wraith and go that way.