Register forum user name Search FAQ

Gammon Forum

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 ➜ VBscript ➜ Need help writing a script

Need help writing a script

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Pippysmurf   (11 posts)  Bio
Date Reply #15 on Mon 21 Apr 2003 11:22 PM (UTC)
Message
Well I dont know what buffer it would be. However the promblem continues. It cycles down the list of "target ID's" starting with the first one ever entered and cycling through them all until it does the last one (most recent) "target id" entered.

I need some means to correct this. So it only attempts to lock the "target id" that i enter each time and ignore all the previous ones.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #16 on Tue 22 Apr 2003 04:32 AM (UTC)
Message
Can you copy and paste some output or something? I don't understand what you mean by "It cycles down the list" - what cycles? what list?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Pippysmurf   (11 posts)  Bio
Date Reply #17 on Tue 22 Apr 2003 09:03 AM (UTC)
Message
Ok well I made a mistake in describing the problem.

It locks every "target" in sight and tries to shoot it. I want to be able to only enter 1 target id. Here is the info as requested.

You notice Aw Centipede [st] in your Forward arc.

The following are commands are sent from the trigger
lock -
lock st
firetic 0

The following are emits back from the mud
All locks cleared.
Target set to Aw Centipede [st].
Firing weapons in tic #0!

Then it repeats the process on the next target in Sight and continues until it runs out of targets.

I need to be able to limit what it shoots. By being able to enter the "target" id before I see it. Then the trigger should shoot nothing else until I regain sight on the target or enter a new target id.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #18 on Wed 23 Apr 2003 02:39 AM (UTC)
Message
OK, I see it now. What you need is an alias to set the lock, like this:



<aliases>
  <alias
   match="target *"
   enabled="y"
   variable="target"
   send_to="9"
   sequence="100"
  >
  <send>%1</send>
  </alias>
</aliases>



This will set a target, eg. type "target CK".

Then the trigger matches that exact target, by using the variable "target" and variable expansion in the trigger:



<triggers>
  <trigger
   custom_colour="7"
   enabled="y"
   expand_variables="y"
   match="You notice * [@target] in your * arc."
   send_to="12"
   sequence="100"
   variable="target"
  >
  <send>Send &quot;lock -&quot;
Send &quot;lock @target&quot;
Send &quot;firetic 0&quot;</send>
  </trigger>
</triggers>


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Pippysmurf   (11 posts)  Bio
Date Reply #19 on Wed 23 Apr 2003 05:15 AM (UTC)
Message
Thanks for your help. That works great. I do have 1 more question how can I add one more command line at the end I want to speed back. How can and another command in the trigger?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #20 on Wed 23 Apr 2003 06:07 AM (UTC)
Message
If you convert &quot; to " in the trigger text above, the trigger "send" box will look like this:


Send "lock -"
Send "lock @target"
Send "firetic 0"


To add another command, simply put another "send" command there, eg.


Send "laugh"


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by WRTIII   Canada  (76 posts)  Bio
Date Reply #21 on Sun 08 Jun 2003 11:23 PM (UTC)
Message
Dealing with battletech I know there was talk about here posted here..

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1515

As well as If you want somethat works well for battletech check out Mav's BTSuite at..

www.mavsoft.net/

The BTSuite works verywell for any sort of addons you could want with Btech.
And last I recall was easy to configurate to do anything special you wanted it to.
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.


76,188 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.