Is this possible?

Posted by Parduz on Sun 22 Jul 2012 09:04 AM — 5 posts, 26,225 views.

Italy #0
Hello.
I'm an italian VB / C++ programmer completly new to MUSH, and i'd like to underdand if what i'd need is something that can be done:
This is what i'd need (how i see it in my mind):

I run a macro (an "alias"?) called "look at the quality"
1) MUSH asks me the value of "%1" (a string)
2) Send "pick %1"
3) Send "look %1"
4) do this pseudocode by matching the example strings with the content of the received descripion of the object:

if "piece of crap" or "almost broken" or "well used" then
send "destroy %1"
else
if "good quality" or "excellent quality" then
send "put %1 on the table"
else
sent "put %1 in the bag"
end if
end if

5) "Deactivate" the trigger... i may look at my equipement and get the same quality/status descriptions, but i dont want to remove my equipement.

Thanks for any help :)
Australia Forum Administrator #1
Yes you can send wildcards to aliases.

However you need to allow for the time for the MUD to respond. So you can't immediately process the reply.
Italy #2
Thanks, Nick.
I tried a bit but i feel a bit lost. MUSH is not a "little" thing and i think i could make good use of a kick in the right direction.
Could you point me to a sample (or write it yourself)?

A simple thing... something like an alias that send the command "Look at %1" (askinf for the value of "%1") and a vbscript that then reads the description and send "Well done" if there's "it's well made" or "What a crap!" it there's "it's terribly made" in the description.
Australia Forum Administrator #3
Are you really welded to VBscript? I prefer to code in Lua these days.

Have you seen this video about making aliases?

http://www.gammon.com.au/forum/?id=9616
Italy #4
Well, i was a VB6 / VBA programmer (i work with C++Builder from years, now) so i think i'd be more efficient with VBScript.
I don't have never seen LUA, so i can't say how it will be working with it.
What are the reasons i should use it instead of VB?

About the video, it's really helpful.
Following his sample, what about triggering something when you "mutilate" the target, but only if you're killing it?