Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Plugins
➜ Targetswitching
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Orvan
(2 posts) Bio
|
| Date
| Wed 24 Jan 2007 01:39 AM (UTC) |
| Message
| | I'm using the targetting script on the script page and have to say I love it. However I have a question. I've created a monk in achaea and would like to be able to string together a full combo by using triggers. I've tried a few different things but haven't been able to figure it out. I'm guessing I would have to send the trigger to the target switching script. Is this correct? If so could you help me figure out how to do so? I haven't been able to so far. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Wed 24 Jan 2007 05:54 AM (UTC) |
| Message
| It helps if you paste the triggers (and code) you are using so we have an idea of what you are doing, even if it doesn't work perfectly. That way we can see the general drift of your design.
Quote:
I'm guessing I would have to send the trigger to the target switching script. Is this correct?
This part puzzles me, do you mean, if the trigger fires you want to call a script? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Orvan
(2 posts) Bio
|
| Date
| Reply #2 on Wed 24 Jan 2007 05:39 PM (UTC) |
| Message
| - <muclient>
- <plugin name="TargetSwitch" author="Nick Gammon" id="2adec0ac37689537f9e3daf2" language="VBscript" purpose="Demonstrates switching targets" save_state="y" date_written="2002-11-06 09:20:06" requires="3.23" version="1.0">
- <description trim="y">
- <![CDATA[ Demonstrates how you can switch targets with a couple of aliases.
Usage
-----
t1 = person (set target 1)
t2 = person (set target 2)
t3 = person (set target 3) ... and so on up to 9 ...
t1 (choose target 1)
t2 (choose target 2)
t3 (choose target 3) ... and so on up to 9 ...
punch (punch target)
kick (kick target)
eg.
t1=Bill (target 1 is Bill)
t2=Benjamin (target 2 is Benjamin)
t1 (choose Bill)
kick (kick Bill)
t2 (choose Benjamin)
kick (kick Benjamin)
t1 (choose Bill again)
punch (punch Bill)
kick (kick Bill)
t2 (choose Benjamin again)
punch (punch Benjamin)
kick (kick Benjamin)
TargetSwitch:help <-- this help
]]>
</description>
</plugin>
- <!-- Aliases
-->
- <aliases>
<alias script="SetTarget" match="^t([1-9])\s*\=\s*(.+)$" enabled="y" regexp="y" />
<alias script="ChooseTarget" match="^t([1-9])$" enabled="y" regexp="y" />
- <alias match="^(sdk|ucp|bbt)" enabled="y" expand_variables="y" regexp="y">
<send>%1 @target</send>
</alias>
</aliases>
- <!-- Script
-->
- <script>
- <![CDATA[ sub SetTarget (sName, sLine, wildcards)
dim which, to_whom
which = wildcards (1)
to_whom = wildcards (2)
world.SetVariable "target" & which, to_whom
world.ColourNote "moccasin", "darkgreen", _
"Target " & CStr (which) & " now '" & to_whom & "'"
end sub
sub ChooseTarget (sName, sLine, wildcards)
world.SetVariable "target", _
world.GetVariable ("target" & wildcards (1))
world.ColourNote "moccasin", "darkgreen", _
"Target now '" & _
world.GetVariable ("target") & "'"
end sub
]]>
</script>
- <!-- Plugin help
-->
- <aliases>
<alias script="OnHelp" match="TargetSwitch:help" enabled="y" />
</aliases>
- <script>
- <![CDATA[ Sub OnHelp (sName, sLine, wildcards)
World.Note World.GetPluginInfo (World.GetPluginID, 3)
End Sub
]]>
</script>
</muclient>
That's the targeting script, I got that from the script page here. As a monk in Achaea I can do a combo of three attacks one right after another. Sdk,ucp,ucp.
Quote:Target 1 now 'rat'
Target now 'rat'
sdk rat
You pump out at a rat with a powerful side kick.
You connect!
ucp rat
You launch a powerful uppercut at a rat.
You miss.
ucp rat
You launch a powerful uppercut at a rat.
You miss.
Quote:
That's an example of the targetting system and using the combo.
I'd like to do be able to just type sdk, the first attack in the combo and have the combo finish itself with triggers or a script if triggers didn't work. The problem is that I use your targeting system Mr.Gammon so I'm not sure how to get a trigger to work properly to accomplish that. Does that cover everything you need? | | Top |
|
| Posted by
| Hyperion
(1 post) Bio
|
| Date
| Reply #3 on Mon 15 Sep 2008 01:19 AM (UTC) |
| Message
| Yes but
sdk
ucp
ucp
is mostly a basic combo for hunting.
Lets say you wanted to do a few different combos and use simple keys to send those combos, such as:
"c"
sdk
ucp
ucp
"x"
mnk
spp
spp
"z"
snk
hfp
hfp
These are 3 examples of different combos that a Monk can do among several others. Can you help us out? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #4 on Tue 16 Sep 2008 10:31 AM (UTC) |
| Message
| | I don't fully understand the question, sorry. Can you rephrase it? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Srpeck
(3 posts) Bio
|
| Date
| Reply #5 on Tue 16 Sep 2008 05:51 PM (UTC) |
| Message
| You have already selected a target through the target-switching system ('rat') and wish to execute three moves in succession on the same target, correct?
Here's what I would do. Set an alias for the name of the combo ('kuu' for Kick-Uppercut-Uppercut), and have the alias set like this:
sdk @target
ucp @target
ucp @target
So every time you type 'kuu', those three commands are sent to the world, to be executed on whatever target you had selected via the target-switching system.
The situation becomes harder if you have to recover your balance in between each attack, however, but your text example from the MUD does not show this. | | Top |
|
| Posted by
| Srpeck
(3 posts) Bio
|
| Date
| Reply #6 on Tue 16 Sep 2008 05:59 PM (UTC) |
| Message
| I was half-replying to the OP, sorry about that (didn't see the date).
Once you have set aliases for each combo, place those aliases in Macros, such as F1, F2, etc. | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
25,043 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top