Gammon Forum
Entire forum
MUSHclient
General
a trigger, and an alias
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Pages: 1
2
Posted by
| Ignis
(26 posts) bio
|
Date
| Reply #15 on Sun 24 Apr 2005 10:52 AM (UTC) |
Message
| i'm not matching 16 lines, it's just that it's 16 lines back to find the word forest, to get the trigger to send "shredded bark" to anywhere, and i thought i was sending it to the function, not just the script | top |
|
Posted by
| Flannel
USA (1,230 posts) bio
|
Date
| Reply #16 on Sun 24 Apr 2005 10:58 AM (UTC) |
Message
| No, send to script sends to the script.
And you don't check 16 lines back. It will match when that line gets there. It checks each line, one at a time.
Stick to one problem at a time, the alias was a good once, once you figure that out (including script syntax errors, if youre using VBScript or JavaScript download their help file and reference that to figure out the syntax, as well as the forums) then you can worry about setting and using a variable regarding your preferred item. Mushclient will only do what you tell it to, and if you don't tell it to do the right thing, nothing will work. So take the time and figure it out one step at a time. Simple triggers/aliases to simple scripts inside of triggers/aliases (and how they interface with triggers/aliases) to more complicated triggers/aliases (ones that interact with and depend on other things).
So go back and reread the guide again, you'll probably pick up on things you missed the first time around, and don't try to do things that are too complicated, since then all you get is confused. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | top |
|
Posted by
| Flannel
USA (1,230 posts) bio
|
Date
| Reply #17 on Sun 24 Apr 2005 11:01 AM (UTC) |
Message
| And also, that script that I posted was for your alias (to be able to do @ [item] or @ [grass] or @ [bark] and have it send accordingly. It had nothing to do with the trigger to figure out which to use. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | top |
|
Posted by
| Ignis
(26 posts) bio
|
Date
| Reply #18 on Sun 24 Apr 2005 11:10 AM (UTC) |
Message
| ok, i was hoping for a two in one alias, but perhaps just doing this for now is best then
<aliases>
<alias
script="temp"
match="@bark"
enabled="y"
sequence="100"
>
<send>get shredded bark
drop bark
remove quartz
take blade from bag
light bark
</send>
</alias>
</aliases>
<aliases>
<alias
script="temp"
match="@grass"
enabled="y"
sequence="100"
>
<send>get dried grass
drop grass
remove quartz
take blade from bag
light grass
</send>
</alias>
</aliases>
| top |
|
Posted by
| Ignis
(26 posts) bio
|
Date
| Reply #19 on Sun 24 Apr 2005 11:11 AM (UTC) |
Message
| also i figured out a solution for the ends i wanted with the other alias, but diff means
<triggers>
<trigger
custom_colour="15"
enabled="y"
match="*|||||||||| > *"
omit_from_output="y"
send_to="2"
sequence="91"
>
<send>10 > %1!</send>
</trigger>
</triggers>
| top |
|
Posted by
| Ignis
(26 posts) bio
|
Date
| Reply #20 on Sun 24 Apr 2005 11:27 AM (UTC) |
Message
| i know i should keep it simple, but i don't suppose there's a way to make the ansi maps in my game get translated into a bmp so that as i walk around, i'm making one large bmp map of the game world? | top |
|
Posted by
| Flannel
USA (1,230 posts) bio
|
Date
| Reply #21 on Sun 24 Apr 2005 09:55 PM (UTC) Amended on Sun 24 Apr 2005 09:59 PM (UTC) by Flannel
|
Message
| You CAN do it in one alias that's what the script that I gave you was for. I went ahead and put it into an alias (notice no script routine? since you seem to have it in everything regardless)
<aliases>
<alias
match="@*"
enabled="y"
send_to="12"
sequence="100"
>
<send>temp = "%1"
if (temp = "grass") then
temp = "dried grass"
end if
if (temp = "bark") then
temp = "shredded bark"
end if
send "get " & temp
send "drop " & temp
send "remove quartz"
send "take blade from bag"
send "light " & temp</send>
</alias>
</aliases>
will send shredded bark if its bark, dried grass if its grass, and anything else if its whatever else (if you wanted to make it JUST work for grass/bark, we can do that too).
As for your other alias, like I was saying, regular expression. Try matching on this:
^(.*)\|{8} > (.*)$
Which is a regexp. You CANT use a regexp quantifier ({8})with just normal *s for wildcards. It just doesn't work that way, you can't have half be a regexp, and the other half not.
The map thing is going to be way too complicated for you right now. Especially with the overlapping. Although If you have coordinates, that will simplify it some. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | top |
|
Posted by
| Ignis
(26 posts) bio
|
Date
| Reply #22 on Mon 01 Aug 2005 05:32 AM (UTC) |
Message
| is there a way to have an alias call for another smaller alias from within itself? | top |
|
Posted by
| Flannel
USA (1,230 posts) bio
|
Date
| Reply #23 on Mon 01 Aug 2005 05:34 AM (UTC) |
Message
| Instead of world.send, use world.execute. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | top |
|
Posted by
| Ignis
(26 posts) bio
|
Date
| Reply #24 on Mon 01 Aug 2005 05:56 AM (UTC) |
Message
| sweet, i have the alias completely solved (thanks to you ofcourse) and the trigger has sort of resolved itself which is also a big perk | top |
|
Posted by
| Ignis
(26 posts) bio
|
Date
| Reply #25 on Mon 01 Aug 2005 06:04 AM (UTC) |
Message
| btw, end result on alias to get and light kindling
<aliases>
<alias
match="1*"
enabled="y"
send_to="10"
sequence="100"
>
<send>%1
drop %1
remove quartz
take blade from bag
light %1</send>
</alias>
</aliases>
plus one to light an object from the kindling
<aliases>
<alias
match="2* *"
enabled="y"
sequence="100"
>
<send>wear quartz
put blade in bag
take %1
light %1 from %2</send>
</alias>
</aliases>
| 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.
54,224 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
  Refresh page
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.