[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  Probrobly Simple

Probrobly Simple

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


Posted by GageEndal   (14 posts)  [Biography] bio
Date Sun 06 Jul 2003 06:22 PM (UTC)
Message
Hello, I'm trying to make a space combat setup for a SWR game and I'm having a little problem, I want to make it so I can recognize the ship I'm fighting against the others. I have everything but this part down and it's the one that will bring it all together.

I am going to throw in some samples of what it looks like so y'all know and do examples with it.

Comet (ISD) -345 -987 1562
Ion Engine Fighter (TIE) 51849 51207 53756

In this one I would want to target the Comet ship. What I want the function to do is make it so when I target the ship, it will automaticly send me to it's coords. I have this set up also (Triger for it if it's the only ship in space). Now this is the problem. I need it to make sure that it will only set the coords to the Comet and not the TIE ship. Is there some way that I can make it so when I target the ship a script will pop in that will make my trigger know which one I'm looking for?

Thanks, I hope you understand what I just said!
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sun 06 Jul 2003 08:45 PM (UTC)

Amended on Sun 06 Jul 2003 08:46 PM (UTC) by Nick Gammon

Message
Without knowing exactly how this works, I would suggest this...

I gather you have a trigger like this:

* (*) * * *

Where the asterisks represent the ship name, type, and co-ords.

In the trigger you can just have a simple "if" (if you do a "send to script") like this:


If "%1" <> "Ion Engine Fighter" and _
   "%2" <> "TIE" Then
  Send "goto %3 %4 %5"
End If


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by GageEndal   (14 posts)  [Biography] bio
Date Reply #2 on Sun 06 Jul 2003 11:30 PM (UTC)
Message
Oh, I probrobly explained that wrong. The big problem with that is there are customizable ships. They can choose any name they want (but luckily no color codes). To do it the way you suggested would mean for me to put every ship in the game on that list.

Are there any other ways to do this?
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #3 on Mon 07 Jul 2003 02:28 AM (UTC)

Amended on Mon 07 Jul 2003 02:37 AM (UTC) by Magnum

Message
Copy the following to windows clipboard by highlighting and pressing CTRL-C:

<aliases>
  <alias
   name="Set_Target_Ship"
   match="target *"
   enabled="y"
   variable="ShipType"
   send_to="9"
   ignore_case="y"
   sequence="100"
  >
  <send>%1</send>
  </alias>
</aliases>
<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   match="@ShipType (*) * * *"
   sequence="100"
  >
  <send>goto %3 %4 %5</send>
  </trigger>
</triggers>

In MUSHclient, select File, Import, Clipboard.

You may need to change the send line in the trigger to whatever is appopriate for your needs.

Once they are in MUSHclient, type target _____, where _____ is the ship you want to chase.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by GageEndal   (14 posts)  [Biography] bio
Date Reply #4 on Mon 07 Jul 2003 09:36 AM (UTC)
Message
Alright, now I know I'm not explaining it right, I will go for a coders point of view here ;)

I want to make it so the trigger will do an IfCheck for a specific name of a ship that I can set into the Variables list.

The setup I have right now will have it so when someone targets me the variable is set to whatever ship it is (IE: Set to 'Durga's spaceship' or whatever). But there may be seven or eight other ships in that system. What I want to know is if there is a way for MC to decern between All of those other ships and the one that I am targeting so I can set my course to that ship. They all look identical except for their names. Here are the commands I will see when this happens... I used ship Sim-05 because that's the one my buddie used ;)

When I'm targeted:
You are being targetted by Sim-05 (X-Wing).

When this happens I set the ship Sim-05 as my target which is logged into Variables as 'SpaceFighter'. It also sends me into the Radar screen which would look like this.

Simulator Starsystem

Sim-04 (X-Wing) 218 -116 30
Sim-05 (X-Wing) -1109 2812 673

Your coordinates: -1135 2792 749

Now my problem is that I need to make it so I will set my course to Sim-05 instead of Sim-04 using an IfCheck of some sort. If this is possible I would be very happy to know how to do it, cause I'm at a total loss.

Thanks and sorry if I was confusing. (If you can help more I can be IMed at GageEndal almost anytime)
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #5 on Mon 07 Jul 2003 08:39 PM (UTC)
Message
Just use this trigger:

<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   match="@SpaceFighter (*) * * *"
   sequence="100"
  >
  <send>set coordinates %3 %4 %5</send>
  </trigger>
</triggers>

You don't mention what command you use on your mud to set coordinates, and what the syntax looks like. I assume "SpaceFighter" is the name of the variable you are setting, and that it is a mushclient variable.

This trigger assumes there is only one ship at a time stored in that variable. If you want multiple ships, it will require a slightly more complex setup (but definately possible).

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by GageEndal   (14 posts)  [Biography] bio
Date Reply #6 on Tue 08 Jul 2003 06:54 AM (UTC)
Message
Oi! I can't believe how stupid I am, The whole thing was so simple to do.

I had it set up so when I'm targeted I set the offending ship into my variables. Then I activate that radar and the ship will set course to the ship. Once that's done I target them and open fire.

So far I'm 0-15 since I made that

Thanks Everyone!
[Go to top] 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.


17,166 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]