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
➜ Tips and tricks
➜ About triggers and aliases
About triggers and aliases
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Rjak
Romania (42 posts) Bio
|
Date
| Sat 22 Mar 2003 02:35 PM (UTC) |
Message
| Right of the bat, i'm a total newbie in programming, and also my english is still bad. So bear with me if you really want to give me a bit of help. Thanks.
1. Let's say I have the attack named "bash" and I want to make an alias to bash a mob, so I make alias bh *, for bash %1. But in combat, I don't have to type the name of the mob, and I don't want to do that, because another mob can enter in the room while i fight with the first one. So, I need another alias for bash in combat, right? bh - for simple bash. I have now 2 aliases with the same function. Can that be avoided?
2. Triggers now. I can hypnotise mobs to follow me. I want to order them to give me money when they follow, but... The mobs can be 'a black mule', 'a ugly whore', 'a small asian woman'. Also can be more than one mob in the same room, so i have to order to 2.asian or 3.mule, etc. If I order to the wrong person, I get the message '(mob) have an indiferrent look'. I made about 100 triggers with mobs, using the right keyword: asian for 'a small asian woman', mule for 'a black mule', horse for 'a work horse'. But must be a way to avoid making so many triggers. Also, I need a sollution for ordering to the right person.
Any help will me much apreciated.
Thanks. | Top |
|
Posted by
| Vaejor
(120 posts) Bio
|
Date
| Reply #1 on Sat 22 Mar 2003 04:37 PM (UTC) |
Message
| 1)
easy answer)
Make a second alias that is just 'bh' and send 'bash' when you use it. Then it won't expect any names after it. I use the same for 'z'(search) and 'z *'(exa %1 / search %1).
harder answer)
Use this regular expression as your alias:
^bh(?: (.*))?
And use 'bash %1' for your command to send.
For further information on Regular Expressions, there is a file located under the MushClient install directory in docs/RegularExpressions.txt
2)
Is there any way to list the identities('a black mule') of everything following you? or does it change something in their short description when you 'look' on the mud? If one of these were possible, then making something work would be a lot easier. If not, it would be possible, but quite a bit more to program and for you to keep working with.
| Top |
|
Posted by
| Rjak
Romania (42 posts) Bio
|
Date
| Reply #2 on Sat 22 Mar 2003 06:52 PM (UTC) |
Message
| Because of the huge amount of aggro mobs, frequency of crashes and course of the game, the followers are changing all the time. But, let me give you a rough ideea about: I can have a mule to carry my leveling gear (+int, +wis +health gear), i have a horse to carry what i loot from mobs, a camel to carry quest items, some prostitutes to keep my char happy. Whores have to be hired and after a certain amount of time they stop following you. Also, names of the whores are diff: asian woman, high-priced girl, ugly whore, hooker, expensive woman. The animal status is also changed after a while: a work horse become a tired-looking horse, a black mule can become a stubborn one or tired looking, and so on. Also are diseases, and diseases can change the look of the mobs: they can be pale, coughing, sneezing, scratching...
Animals can be tamed, human types can be hired, evangelised, mindlinked or hypnotised to follow you, assuming you are higher level than they.
I am not afraid of "more work". Is a great satisfaction to see something you made is working fine, and that satisfaction make the work to be fully paid. :) | Top |
|
Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
Date
| Reply #3 on Sat 22 Mar 2003 10:10 PM (UTC) |
Message
| With your triggers, you can make a trigger that matches on a variable, like this:
@target gives you money
(or whatever it is). Then you need to set up the variable "target" to point to the right mob. You can now do that simply (in version 3.34) with an alias that sets up a variable, like this:
<aliases>
<alias
match="target *"
enabled="y"
set_variable="y"
variable="target"
>
<send>%1</send>
</alias>
</aliases>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Rjak
Romania (42 posts) Bio
|
Date
| Reply #4 on Wed 26 Mar 2003 10:18 PM (UTC) |
Message
| It looks i have a lot of things to learn.
I don't even know how to make a variable. I'm sorry.
Maybe you can help me with this:
I want to type eat @food, and i don't know how to define
@food.
Food should be: MRE. combat ration, sandwich, nachos, apple, etc. Just tell me how to do that, and i will expand that on the other variables i need.
Thank you for your time.
Rjak | Top |
|
Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
Date
| Reply #5 on Thu 27 Mar 2003 07:27 AM (UTC) |
Message
| The example I gave above creates an alias that will make a variable "target". Just copy it from this page and paste into the aliases configuration window.
Change it to change "target" to "food" (2 places) and it will let you set up the variable "food".
Once installed, just type, for example:
food mre |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Rjak
Romania (42 posts) Bio
|
Date
| Reply #6 on Sat 29 Mar 2003 02:56 PM (UTC) |
Message
| It seems my english is SO bad than I can't even speak clear what i want. What you told me to do, i done, and it works... but is not what I wanted to do.
Let me say again, and I hope I will make myself understand:
are some various types of food in the mud i play: combat ration, mre, cooked meat, sandwich, nachos, etc. All I want to do is to "store" those types of food in some data base or whatewer is called, and when I'm hungry to type "get food backpack" / "eat food" and to get from backpack and eat any type of food I can find inside, without typing the exact type of food. The program you give me, stores the last food I typed, not all of them.
So, let's say my backpack had inside (5)combat rations, a strange hat, gleaming silver sleeves, a sinister assault rifle, a combat canteen, some nachos, (2) sandwich. Let's say I'm hungry. I have to type "l in back" to see what food i have with me, then i have to type "get nachos back", "eat nachos". All I want to do is to type "get food back", "eat food" and to get from backpack fist type of food i can get and eat it. In my case "get food back" -> i will get a ration, "eat food" -> eat ration.
I don't know if i was clear enough...
I suppose I have to store all that types of food somehow, in a database or something... and to name that database "food".
I will wait for your response.
Your newbie,
Rjak :) | Top |
|
Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
Date
| Reply #7 on Sun 30 Mar 2003 12:17 AM (UTC) |
Message
| I would guess the food in your backpack would change (eg. you might eat the last one) so you probably need something like this:
- You type: get food back
- This is an alias, the alias sends "look in back" and enables a trigger.
- The trigger waits for the listing of things in the backpack (rejecting things that don't look like food). The first piece of food that it seems (say, from an internal list of what food is), it then sends (eg.) "get nachos back / eat nachos"
- Once it has found food, the trigger disables itself (so it doesn't eat more than one piece of food). Now you are ready for the next time.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Rjak
Romania (42 posts) Bio
|
Date
| Reply #8 on Wed 02 Apr 2003 02:18 PM (UTC) |
Message
| YES!
That's it!
Thanks, man!!!
Rjak | 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.
27,253 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top