Help - Search - Members - Calendar
Full Version: Archery
Achaea's Forums > Off-Topic > Tech Support > Client Help
Kresslack
I've been trying to set up an archery system in Mush that allows me to just type aim and it will search line of sights and aim in the direction of what I have targeted, then auto shoot in the same direction once it recieves a successful aim message, and upon a sucessful strike, send <target> hit with arrow(or meteor) to PT. I tried triggering the aim line to Shoot @t n, shoot @t s, etc, but it runs through all the directions and doesn't shoot, even when I know they are in line of sight. Thanks for any help.
shalishaska
I believe that trying to shoot in the wrong direction will negate your aiming, but you should still fire when you get the right direction. Post the code you have so far.
Sena
There are two methods that I know of for a script like that. I can only describe the logic, since I'm not familiar with Mush.

First, you could start by aiming in any direction, and if your target is in that direction, shoot, if not, aim in the next direction, and repeat that for every direction.

The other way is to aim in every direction at once, and keep track of which direction was successful, then aim and shoot in that direction.

The second method is faster, but leaves an extra arrow in your inventory, which will have to be put back in the quiver, losing any venom on it. Also, you'll need a delay before shooting, since it's possible to aim;shoot, and have shoot go through before aim finishes.
Trevize
QUOTE (Sena @ Aug 11 2009, 05:59 PM) *
First, you could start by aiming in any direction, and if your target is in that direction, shoot, if not, aim in the next direction, and repeat that for every direction.

I'd recommend this method.
Kresslack
Ok, I'll try that. Thank you.
Soulfyriani
I've actually been trying to figure something like this out for a while, only with Nexus. I'm not sure if it'd work, or even be worth the time to write up, but I was thinking triggering the command 'fire' to aim $tar n, aim $tar ne, aim $tar e, et cetera, and when I get the message for aiming, trigger that to turn the group off and shoot $tar (whatever direction). I'm not sure, though, if turning the group it's in off at the successful acquisition of a target would be quick enough to stop aiming at the next direction and ruining the aim. Has anyone coded something like this for Nexus before?
Trevize
QUOTE (Soulfyriani @ Aug 11 2009, 07:38 PM) *
I've actually been trying to figure something like this out for a while, only with Nexus. I'm not sure if it'd work, or even be worth the time to write up, but I was thinking triggering the command 'fire' to aim $tar n, aim $tar ne, aim $tar e, et cetera, and when I get the message for aiming, trigger that to turn the group off and shoot $tar (whatever direction). I'm not sure, though, if turning the group it's in off at the successful acquisition of a target would be quick enough to stop aiming at the next direction and ruining the aim. Has anyone coded something like this for Nexus before?

If you wait for the success/failure then check the next direction, it won't continue if you turn off the trigger. If you send all aim commands at once, and aim/fire on a success, then it will do all aims. You can't 'unsend' the command.
Soulfyriani
So I would have to create an insanely long list of aliases, and have my 'fire' send those aliases one at a time, each one containing yet another list of aliases-...yeah, too complicated. I've just always wondered how, when I'm fleeing for my life from Shecks, turning several turns that aren't in a straight line, he seems to keep up the hail of arrows, evade or not. It's got to be a system, unless he's just that manly.
Sena
In zMUD, it would be one alias and two triggers. An alias to start aiming, a trigger to match the message when the person isn't there and aim in the next direction, and a trigger to match when the person is there and shoot in that direction. You'd also need to track what direction you're aiming in, but even in Nexus that should be easy.
Mymyc
Consider setting up manual archery stuff first and test it. Minimal coding needed, you have to set up aliases only and map it to macros.

In Mush I use the Numeric pad 1234 6789 +-/* that is sw-s-se-e w-nw-n-ne up-down-in-out

Go east NumPad 6
Dash east CTRL+NumPad6
Aim east <target> CTRL+ALT+NumPad6
Shoot/Snipe east <target> ALT+NumPad6

shoot meteor CTRL+NumPad5

I am able to aim EVERY direction under 0.5-1 seconds. My left hand pressing ctrl+alt, my right fingers rapidly pressing 123456789 on numpad!

Set up a short click sound when your aim find a target.
Nitro
QUOTE (Sena @ Aug 11 2009, 11:59 PM) *
The other way is to aim in every direction at once, and keep track of which direction was successful, then aim and shoot in that direction.


This works but since failed aim attempts actually take endurance (I think), it will be quite a big drain. Failed shoot attempts don't take endurance. So you could fire your first arrow without aim (spam shoot in every direction) and then use aim from your second arrow.

Keeping track of which direction is the right one is rather easy. Remember the order of directions in which you try to shoot. If the first is the right one, it is (for example) NORTH, if the first one is not the good one, then you set some variable to 2, then if the next is succesful it will be NORTHEAST, if not, set some variable to 3, and so on ...

Additionally you can use the ATCP information about room exits to only try shooting in those directions, and thus reducing the spam. That will however not shoot in hidden directions.
Trevize
QUOTE (Soulfyriani @ Aug 11 2009, 10:04 PM) *
So I would have to create an insanely long list of aliases, and have my 'fire' send those aliases one at a time, each one containing yet another list of aliases-...yeah, too complicated. I've just always wondered how, when I'm fleeing for my life from Shecks, turning several turns that aren't in a straight line, he seems to keep up the hail of arrows, evade or not. It's got to be a system, unless he's just that manly.

I do it using macros, and rarely have trouble. Evade makes it easier than just walking, due to the balance loss.

QUOTE (Mymyc @ Aug 12 2009, 03:10 AM) *
Consider setting up manual archery stuff first and test it. Minimal coding needed, you have to set up aliases only and map it to macros.

In Mush I use the Numeric pad 1234 6789 +-/* that is sw-s-se-e w-nw-n-ne up-down-in-out

Go east NumPad 6
Dash east CTRL+NumPad6
Aim east <target> CTRL+ALT+NumPad6
Shoot/Snipe east <target> ALT+NumPad6

shoot meteor CTRL+NumPad5

I am able to aim EVERY direction under 0.5-1 seconds. My left hand pressing ctrl+alt, my right fingers rapidly pressing 123456789 on numpad!

Set up a short click sound when your aim find a target.

smile.gif Almost exactly what I do.
Mymyc
MushClient alias "setup-archery-macros *"
(Send-to:script)

USAGE: setup-archery-macros <target name>

Accelerator("Ctrl+Alt+Numpad2","aim %1 s")
Accelerator("Ctrl+Alt+Numpad3","aim %1 se")
Accelerator("Ctrl+Alt+Numpad4","aim %1 w")
Accelerator("Ctrl+Alt+Numpad1","aim %1 sw")
Accelerator("Ctrl+Alt+Numpad5","shoot %1 with meteor")
Accelerator("Ctrl+Alt+Numpad6","aim %1 e")
Accelerator("Ctrl+Alt+Numpad7","aim %1 nw")
Accelerator("Ctrl+Alt+Numpad8","aim %1 n")
Accelerator("Ctrl+Alt+Numpad9","aim %1 ne")
Accelerator("Ctrl+Alt+Divide","aim %1 in") <---- NumPad /
Accelerator("Ctrl+Alt+Multiply","aim %1 out") <---- NumPad *
Accelerator("Ctrl+Alt+Add","aim %1 up") <---- NumPad +
Accelerator("Ctrl+Alt+Subtract","aim %1 down") <---- NumPad -

Do the same combination with CTRL+whatever to snipe
or
Do the same combination with ALT+whatever to snipe

Comine it freely with your targeting alias.
Kresslack
Does the number pad interpret for directional movement only if Numlock is on?
Saadya
Num9 is PgUp when numpad is off.
Kresslack
And it seems Numpad 3 is page down. That would be annoying.
Dontarion
I use an alias

^sni(\w+)$

Send("snipe " .. GetVariable("target") .. "%1")
Wattsee a'Lenendra
Working out a logic setup for this, I would do a small manual loop setup

alias1 = starting the aiming process
set target name
set targethere 0
set aimdirection north
set aimsequenc 0
autoaim

alias2 = autoaim <-- cycles through until an aim target gets hit
if targethere = 0
if aimsequence = 0
aim aimdirection
if targethere = 0, aimsequence +1
autoaim

if aimsequence = 1
set aimdirection northeast

so on and so forth


if targethere = 1 <-- after the trigger goes through
shoot target aimdirection

aimtrigger
whenever the trigger for successful aiming goes off, have it set targethere 1 (will stop the other aiming)

you will have your aimdirection saved as well. having it split between two aliases (one that cycles) give the game enough time to respond before it sends it all out to achaea like some LOOP systems work. You would be hitting alias1, the client would cycle through autoaim, giving a small break in between for achaea to respond, then fire off a round. If your target runs or moves, simply hit alias1 again.
Jonathin
I have a script for aiming and shooting. It doesn't sound too hard to come up with something that works off squint or observe (it would just be hella-spammy).

then again, what translates from "doesn't sound too hard" usually ends up translating into "Impossible" for me.
Sena
It wouldn't be too hard to use squint. Observe wouldn't work as well since it only shows you one room in each direction, and it takes eq. Still, just aiming/shooting to see if the target is there is much simpler than squinting to see if they're there, and much easier to script.
Jonathin
I just don't like having to redye and envenom my arrows.
Sena
Nevermind, made a mistake testing it. Anyways, as long as you shoot when you find the right direction, instead of aiming in every direction before shooting, no arrows will be left out. You can also just shoot in every direction to find the right direction, and then aim after you know where they are. That also won't leave arrows out.
Jonathin
By shoot, you literally mean shoot, not snipe, right?
Sena
QUOTE (Jonathin @ Aug 15 2009, 03:03 AM) *
By shoot, you literally mean shoot, not snipe, right?

I haven't been a serpent in a long time, I'm rusty with archery. tongue.gif I'm pretty sure shoot and snipe work the same for that.
Jonathin
I dunno, it still knocks an arrow, maybe I'm just too tired to know what the hell I'm even saying.
Sena
If you try and shoot/snipe in a direction that your target isn't in, no arrow is taken out. If you try and shoot/snipe in a direction your target is in, you fire the arrow. Either way, there's no arrows left out to redye/envenom. If you try to aim in a direction that your target isn't in, you don't take an arrow out. If you aim in a direction your target is in, and shoot/snipe right away, no arrows are left out. The only thing to worry about is successfully aiming, and then trying to aim again, which will leave the arrow in your inventory.

It's 3am, so that probably isn't as clear as it could be. unsure.gif
Trevize
Simple explanation: to avoid taking arrows out do one of the two.

1. Attempt to snipe in every direction. When you hit, set that direction as your target direction and aim/snipe there from then on.
1. Attempt to aim in every direction, one at a time, only doing the next when the first fails. When your aim works, snipe that direction instead of aiming elsewhere.
Kresslack
QUOTE (Sena @ Aug 15 2009, 06:44 AM) *
It wouldn't be too hard to use squint. Observe wouldn't work as well since it only shows you one room in each direction, and it takes eq. Still, just aiming/shooting to see if the target is there is much simpler than squinting to see if they're there, and much easier to script.


My main thing was with time. It's taking me to long to find, aim, and shoot at my target, and a lot of times a few seconds can be the deciding factor in a fight, because you're giving your opponent time to heal. Also, I don't have snipe yet, so trying to make this work with regular aim and shoot. So far, nothing has worked.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.