PDA

View Full Version : Do you want Optimus Prime to hunt for you?



Alorn15
11-11-2009, 05:39 PM
Optimus.lic
Because these days, the only real men left are giant robots...
Requires Lich V4

http://img264.imageshack.us/img264/7441/optimuse.jpg

Q: Optimus Prime?
A: Basically, a lot of people ask me to write them hunting scripts. One day (yesterday) I decided to write the end-all be-all of hunting scripts. I envisioned it having two basic requirements:
1. It has to be about as versatile as the hunting scripts I already use - any profession should be able to use it with any hunting style in any area of the game.
2. The setup would have to be both approachable and fast, even for a non-technical user.

Q: Er.... Optimus Prime?
A: Based on the feedback I've gotten from people I've distributed hunting scripts to, I know that the above functionality is highly desirable. More importantly, I find the idea of people using a script with a dumb-as-bricks name like Optimus Prime - that talks to them - to be hilarious.

Q: It will talk to me?
A: Yes.

Q: *Facepalm*
A: ...

Q: ...That's really really stupid.
A: I know.

Q: What will it say?
A: Things like this: "My father was a wheel! The first wheel! And do you know what he transformed into? Nothing! But he did it with honor!"

Q: Your sense of humor is kind of... eh...
A: Eh...

Q: Can I go AFK while I use it?
A: Ya, but you'll probably get banned.

Q: Can I have it now?
A: Ya.

Q: I'm a caster.
A: Then you probably want to do stuff like this in the Attack Routine: '413 target, 910 target, 903 target(xx)'

Q: Okay... but I want to spell myself up while resting.
A: Add 'waggle' to Resting Scripts.

Q: What's up with this? '903 target(xx)'.
A: If you add (xx) to a command, Optimus will continue executing it until the fight is over. You can also do things like (x2).

Q: What if I only want to cast 910 when i have at least 50 mana?
A: 910 target(m50).

Q: It says Attack Routine Signs, but I'm in Sunfist/Voln! And I want to use Cman Surge!
A: You can add any sign/sigil/symbol/cman to Attack Routine Signs. Spells like 506 too. Just add the correct spell ID.

Q: What's the spell ID for <insert sign/sigil/symbol/cman>?
A: Mouse over the signs/sigils/cmans entry field in setup for a complete list of ID's.

Shaelun
11-12-2009, 09:21 PM
Q: What will it say?
A: Things like this: "My father was a wheel! The first wheel! And do you know what he transformed into? Nothing! But he did it with honor!"


I dunno, personally I think that's hilarious. Granted, I've been insulted for thinking MegaTokyo is cute, but whatever :whistle:

Jace Solo
11-12-2009, 09:56 PM
Nice work sir

crb
11-13-2009, 11:12 PM
What about using things like sacrifice or mana leech? I suppose with leech you could put it into the routine, but that isn't perfect, ideal you'd have it become a priority when a certain mana level is reached.

Alorn15
11-13-2009, 11:24 PM
I'm not familiar with those spells, but it sounds like what you're talking about could be worked in without much hassle.

EDIT: Added optional mana/stamina checks.

Alorn15
11-16-2009, 05:03 PM
Optimus.lic is now on the repository for beta testing. It does require V4.

New features:
- Option to wait for creature to swing
- Option to use sign of wracking (won't wrack if impending spirit drains will drop you below 1)
- Ranged functionality, including ammunition gathering
- Caster functionality, with optional mana checks (checks are not necessary to prevent Optimus from frying your nerves, which should never happen. This is a way of allowing the user to specify which spells they would like to cast at certain mana thresholds)
- Option to hide while waiting for ammunition to become gatherable
- Will record and display average hunt times
- Will talk to you

Known issues include:
- Cmans don't yet work when included in "Refresh these society abilities/cmans"
- I'd like to improve upon the clarity of the GUI labels, as well as implement more tooltips. Suggestions welcome here.

A new version of sloot is ready and should be uploaded in the next day or so. This version includes a 'sell' command, which will sell loot and deposit silvers. The two scripts interface very well, and to include this functionality in Optimus simply add 'sloot sell' to your settings, under 'Run these scripts while resting.'

Androidpk
11-16-2009, 05:06 PM
How about hunting with berserk?

SpiffyJr
11-16-2009, 05:24 PM
How about downloading it and checking the options?

Alorn15
11-16-2009, 05:25 PM
Berserk is in my copy of the script, but not the one on the repository. I'm still trying to figure out everything the script should do. So far it's basically this:

if(stamina is at least 12)
berserk
loop until "The redness fades from the world"
put stop if mind is fried
else
target random
kill

Androidpk
11-16-2009, 05:31 PM
I would change that to

if(stamina is at least 20)

20 is the minimum cost to berserk without pulling a muscle. Other then that it looks good.

Alorn15
11-16-2009, 08:00 PM
Updated the repository version to include the following:
- Berserk is now a recognized attack command
- "Wait for swing" will now attack if the critter is stunned/prone

crb
11-17-2009, 08:52 AM
by the way, sacrifice is not a spell, it is a manuever.

here is what you'd need to do.

IF manathreshold is reached
IF sorcerer has at least 3 spirit
IF critter has been dealt at least 100 damage (approximately, it varies, to little damage and it'll fail)
IF critter is currently stunned
Sacrifice (command is sacrifice <critter>)

You can have 3 outcomes.

Outcome 1: loss of 2 spirit and gain of mana, and 10 seconds of rt, success, critter dies
outcome 2: loss of 1 spirit, failure (not stunned or not wounded enough) 10 seconds of rt
outcome 3: failure, no rt, you're still in the cooldown from your last sacrifice (20 minutes)

Sean of the Thread
11-17-2009, 10:03 AM
Optimus Prime stole my password.

Alorn15
11-17-2009, 12:09 PM
IF critter has been dealt at least 100 damage (approximately, it varies, to little damage and it'll fail)

This is the difficult part, though it's not impossible. The inelegant solution is to just have sacrifice appear later in your attack sequence and hope that you've done enough damage.

Here's the better solution, and an opportunity to implement something really cool into Lich: Have GameObj track the approximate damage done to monsters so that you could call functions like npc.damage_done and npc.health_remaining. This would be all kinds of awesome.

pabstblueribbon
11-17-2009, 12:29 PM
This is the difficult part, though it's not impossible. The inelegant solution is to just have sacrifice appear later in your attack sequence and hope that you've done enough damage.

Here's the better solution, and an opportunity to implement something really cool into Lich: Have GameObj track the approximate damage done to monsters so that you could call functions like npc.damage_done and npc.health_remaining. This would be all kinds of awesome.

This would be all kinds of awesome. You'd have to write up a lic file to track approximate HP's of monsters throughout elanthia and compile them. Then its smooth sailing. if GameObj.npc == "whatever" then critter_hp = blah, then track the damage you do to it, compare the two, whaaaalaaa.

Alorn15
11-17-2009, 03:22 PM
Updated the repository version to include the following:
- Cmans now work when included in "Refresh these society abilities/spells/cmans"
- Will now stance defense before hiding in case of failure

EDIT: And another one:
- Spells now allowed in "Refresh these societal abilities/cmans/etc" - handy for short-duration spells like haste
- Should swap to defense prior to casting
- Improved stance dancing, more intelligent with less spam
- Wait_for_swing should be smarter
- Fixed a bug where arrows wouldn't be gathered if target left the room
- Spells should re-cast upon hindrance failure

EDIT: Again:
- Should run more quietly
- Fixed a bug where it would stop resting while mind was still full
- Will error-handle if using non-magical ammo on magical creatures
- Optimus has been reading www.bash.org

gs_zen
12-07-2009, 01:12 AM
I tried using optimus in the nexus area of the catacombs in Wehnimers. it was really sporatic with attacks, sometimes it'd hit two in a row, sometimes it would skip 15 rats before attacking one. There didn't seem to be any reason for not attacking.

Granted it is rats... just thought I'd mention it.

- Zen

Alorn15
12-07-2009, 02:04 AM
In the rooms in which you wouldn't attack...
...was there more than 1 rat? Default max critters is 1. (This can be changed in settings)
...were there people? Won't attack if there are other pc's. (This includes, for now at least, party members)

Does wander actually exit, and then just start again? A log would be helpful, one that includes a 'look'.

Tisket
12-07-2009, 02:26 AM
I've gotten Optimus to work perfectly in other areas so I too tried it in rats and it does run right by rooms with only one rat or multiple rats and no people. I've tried setting the default critter max at different amounts and it doesn't seem to make a difference. Sometimes it will stop and attack and other times it just zips right by. I was very careful in the setup so I'm mystified as well. I've tried multiple setups, some with skinning and others just as basic as I can make it, all with no luck. And no, I didn't do any logging so I have nothing to paste here.

gs_zen
12-07-2009, 03:08 AM
What tisket said...

Attached is a quick log I took. I just copied/paste from the game window. If you want more, PM me how to collect what details you would want.

Thanks,
- Zen

Tillmen
12-07-2009, 03:11 AM
I've gotten Optimus to work perfectly in other areas so I tried it in rats and it does run right by rooms with only one rat or multiple rats and no people. I've tried setting the default critter max at different amounts and it doesn't seem to make a difference. Sometimes it will stop and attack and other times it just zips right by. I was very careful in the setup so I'm mystified as well. I've tried multiple setups, some with skinning and others just as basic as I can make it, all with no luck. And no, I didn't do any logging so I have nothing to paste here.

That's probably because of the map database. The area of the catacombs with the nexus was hell to map. There are many many identical rooms. I went through a lot of trouble to make it so go2 can be started in any of the identical rooms without giving an invalid direction, but this means moving to what appears to be the next room is actually a mini-script moving one direction until it see's a room without duplicates, at which point it can figure out if it's moving in the right direction, and may continue or turn around and go the other direction. All this happens using the same command that 95% of the time moves you one room.

Or if none of that makes sense.. optimus is telling the map database to go to the next room. The map database is moving several rooms, which may have rats in them, and then returning control to optimus.

Tisket
12-07-2009, 03:15 AM
Ah that makes sense. It's easy enough to make a simple script for rathunting so it's not a big deal. Just was worried that I might run into the same issue later on so it's good to know why it happened.

Boreus
12-28-2009, 10:34 AM
First of all let me say I love my Optimus, as a matter of fact I've come to love it so much I feel lost when I try hunting without it. So that leads me to a few suggestions/requests if this is still being worked on. I would love to see a group option, something that if you join a group optimus still will attack and stand you up and everything but wander will be disabled and you follow the leader and don't move because of other players etc. Or if your leading the group wander would still be up but you would recognize that the other people in your group were in your group and would stop to hunt with them in the room. The other thing I'd really like to see is an option for wand users, I know I can put wave wand at target in the attack option but I'd like to know if it's possible for optimus to notice when my wand is out of mana, disguard it and get a new one from a specified container. And lastly my dream wish, a scaled down version of optimus you can leave running and then if you imput something like attack target it will start up and fight just that target without being part of a whole hunting trip. This would be great for things like when your foraging and that annoying critter walks in and won't leave you alone.

I know I ask for the moon but hey if you don't aim high you never get anywhere.

Thanks so much for all the great work you guys put into LICH

Lance

Whimsi
12-28-2009, 01:17 PM
I'd just be happy if there was a way to make wander disable automatically when you die. I don't usually script hunt afk but I fell asleep and when I came back my character had died, decayed, started wandering when alive at the altar, and died again.

Durgrimst
12-28-2009, 01:33 PM
I'd just be happy if there was a way to make wander disable automatically when you die. I don't usually script hunt afk but I fell asleep and when I came back my character had died, decayed, started wandering when alive at the altar, and died again.

Use SF and have it speed up the auto disconnect after death.

Whimsi
12-28-2009, 02:19 PM
Oh, I will do that. Thanks.

Das Uberdog
12-29-2009, 10:43 AM
Oh, I will do that. Thanks.

the "Engage Deadman's Switch" option in Optimus will disconnect you if you die.

Alorn15
12-29-2009, 10:34 PM
When I was a kid my favorite relative was Uncle Caveman. After school we'd all go play in his cave, and every once in a while he would eat one of us. It wasn't until later that I found out that Uncle Caveman was a bear.

Boreus
12-30-2009, 08:27 AM
See it's comments like that that make Optimus so much fun.

Whimsi
12-31-2009, 09:48 PM
I keep getting booted when I try to hunt with Optimus today. I don't know what the issue is except that it has to do with the lack of type ahead lines? I have used it without a problem with another character on the same account though so I don't know if that's the problem but here's a sample of what happens at some point in almost every hunt I've attempted today:

Burrows, Tool Room]
Rough digging tools clutter the room. The passage leading down seems relatively new, and the air blowing up from it smells of the outdoors. You also see a greater burrow orc, some silver coins, a short sword, a wooden shield and some double leather.
Obvious exits: east, down
>
--- Lich: wander has exited.
Sorry, you may only type ahead 1 command.
Sorry, you may only type ahead 1 command.
Sorry, you may only type ahead 1 command.
Sorry, you may only type ahead 1 command.
Sorry, you may only type ahead 1 command.
Sorry, you may only type ahead 1 command.
Sorry, you may only type ahead 1 command.
Sorry, you may only type ahead 1 command.
Sorry, you may only type ahead 1 command.
>
You are now in an offensive stance.
>
You are now in an offensive stance.
>
You are now in an offensive stance.
>
You are now in an offensive stance.
>
You are now in an offensive stance.
>


--- Lich: lnet has exited.

--- Lich: infomon has exited.
| Optimus Prime deactivated.

*
* Connection to the game has been lost. You will need to login again to continue playing.

Boreus
01-03-2010, 11:08 AM
So that's a no on the if this is still being workd on questions?

Alorn15
01-03-2010, 01:34 PM
I'm not really playing anymore, so probably not...

But anyone that wants to take ownership of the script certainly can, just express interest to Tillmen.

Flessen
01-05-2010, 10:47 AM
New version of Lich breaks Optimus. I have ;trust optimus, go2, wander, infomon, voodoo, sloot (and sloot2), slib, azlib. I have tried to do Spiffy's loot databases but it wouldn't do that. I have trusted a bunch of other scripts I use regularly.

So I just downgraded back to V. 4.0.15.

I didn't want this to break citizendata too.

Flessen
01-05-2010, 11:15 AM
percentmana seems to be the problem. And a fix was made

[LNet]-Kupplermann: "ha ha i fixed percentmana" (9:10:11 AM)
[LNet]-Kupplermann: "okay, go into Lich.rb and search for def percentmana" (9:10:32 AM)
[LNet]-Kupplermann: "there is an if statement, the second part has this line: ((XMLData.mana.to_f / XMLData.max_mana.to_f) * 100).to_i" (9:10:50 AM)
[LNet]-Kupplermann: "change that to: percent = ((XMLData.mana.to_f / XMLData.max_mana.to_f) * 100).to_i" (9:10:59 AM)

I will wait till Tillmen can do this.

Tillmen
01-05-2010, 02:08 PM
I put the percentmana fix in and updated Lich.

Maxx
01-05-2010, 06:59 PM
Is there a way to make optimus search for more then 1 creature in the room before it swings. Currently, if I have already attacked a creature and another comes in wander will not move until I wait for the original creature to swing again and I swing. Only after my swing will it check for the new creature that came in.

This is causing me to get hit by the new creature that came in. This only happens when I have the wait for swing box checked.

Alorn15
01-05-2010, 08:30 PM
If I recall correctly, Optimus basically sits in a wait_while { get !~ /you!/; } loop to implement the wait-for-swing functionality. You would basically want to just expand on that loop to return true for other conditions, such as monster checks. Also, you'd want to make sure it checked room conditions before swinging again, obviously. Wait for swing code should probably just be ported into the room conditions block, actually.

Xaerve
01-10-2010, 11:17 AM
come back!

egreenleaf
03-24-2010, 04:32 PM
so i set up optimus, but it isn't working. it just runs around and doesn't ever stop to kill anything.

ideas?

Bobmuhthol
03-24-2010, 04:40 PM
Use Megatron and put in the monsters you want it to kill under the Attack Routine tab.

egreenleaf
03-24-2010, 04:43 PM
you're awesome, thank you!

crb
03-24-2010, 05:20 PM
or use starscream and put a different attack routine in for each beast

FNLN
03-24-2010, 05:31 PM
I've had an issue with Megatron/Optimus/Starscream. After a creature died it wouldn't attempt to loot it, it would keep prepping and releasing a spell (702) until I was out of mana then fuck off.

Bobmuhthol
03-24-2010, 05:32 PM
Did you enable "use sloot"?

Subsequently, did you have sloot.lic in your scripts folder?

FNLN
03-24-2010, 09:08 PM
Yes and yes.

Durgrimst
03-24-2010, 09:11 PM
What kind of critter was it, I know a few months ago people were saying that some critters with unique death messaging were screwing with the looting portion of the script and had to put a loot command at the beginning of their attack routine.

More information would be helpful.

Flessen
03-24-2010, 09:13 PM
Was it a undead? For some reason undead creatures sometimes screw up the xml showing it died or is dead. So it will keep casting. I have bypassed that by adding in death messages (Yes there was alot of them). That will be something you have to do. If your voln, it will be alot easier of course.

Note: This is a game problem with the xml not a Lich problem.

FNLN
03-24-2010, 09:14 PM
It was a large ogre. Though it also happened with werebears.

crb
03-24-2010, 09:23 PM
if you're using starscream you can change the debug line at the top to turn debugging on which will make it run slow, and also echo a bunch of crap while running, to maybe help narrow down where the problem is.

FNLN
03-24-2010, 10:05 PM
I'll give that a go later.

Szhrike
06-20-2010, 10:34 PM
retracted