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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Help with variable
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Help with variable

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


Posted by Jonnycuest   (3 posts)  [Biography] bio
Date Sat 30 Sep 2006 01:09 AM (UTC)
Message
Can someone please walk me through making a variable (i.e. kick @1) which I can use to be in battle and change when I need to in order to attack other creatures of a different name? Right now I am having to go up to aliases every time I need to change my target. *sigh* Thanks!
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 30 Sep 2006 03:48 AM (UTC)
Message
Make an alias that sets up the "target" variable like this:


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


Then in your other aliases, do things like: kick @target, with "expand variables" checked.

- Nick Gammon

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

Posted by Jonnycuest   (3 posts)  [Biography] bio
Date Reply #2 on Sat 30 Sep 2006 03:53 AM (UTC)
Message
Thanks. I have two questions, what do put as the alias name? and also how do I change the target in the prompt? Thanks.
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Sat 30 Sep 2006 05:43 AM (UTC)
Message
Alias name? You mean the "label" field when you edit it? It can stay blank if you like.

What do you mean by "target in the prompt"?

You can copy and paste that alias straight into MUSHclient, see:

http://www.gammon.com.au/forum/?id=4777

To use it, just type:

target Fred

... or whatever, and that updates the target variable.

- Nick Gammon

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

Posted by Malek   USA  (27 posts)  [Biography] bio
Date Reply #4 on Sat 30 Sep 2006 03:50 PM (UTC)
Message
I'm having similar issues.. I have a alias called (tar *)that reports my chosen target to the prompt. I am currently trying to figure out how to get it to also get a mud level trigger to hunt but I need it to pull the target from my @traget variable the trigger setup for the mud is (trigger Testname todo do hunt testname)
This is the alias I have so far...

<aliases>
<alias
match="tar *"
enabled="y"
group="pk"
send_to="12"
sequence="100"
>
<send>world.SetVariable("target", "%1")
world.Note("Target set to: %1" )
</send>
</alias>
</aliases>

Thanks

Tod ist gweiss, Lebens est nicht.
[Go to top] top

Posted by Jonnycuest   (3 posts)  [Biography] bio
Date Reply #5 on Sat 30 Sep 2006 04:39 PM (UTC)
Message
It doesn't seem to work when I type in Target Fred. The world I am playing in reacts to that command and doesn't understand it?? Sorry, I don;t know anything about coding. I used to have ZMUD before they made you pay for it. Much easier for me. *Grin* Thanks.
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Sat 30 Sep 2006 09:46 PM (UTC)
Message
Quote:

I am currently trying to figure out how to get it to also get a mud level trigger to hunt but I need it to pull the target from my @traget variable the trigger setup for the mud is (trigger Testname todo do hunt testname)


Your alias seems to work OK. Can you post the problem trigger?

If you need something like hunting the target, just put something like:

Match: @target leaves *

And check "expand variables".

Quote:

It doesn't seem to work when I type in Target Fred


Aliases are case sensitive, unless you check "Ignore case". Try typing: target Fred


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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.


3,720 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 FutureQuest]