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

Gammon Software Solutions 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 converting a simple (I think?) MM2K6 script

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Help converting a simple (I think?) MM2K6 script

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Smashingzwan   (2 posts)  [Biography] bio
Date Sat 12 May 2012 07:58 PM (UTC)  quote  ]
Message
Hi guys!

New to these forums, though not necessarily new to MUSHclient (I have a very basic understanding of the basics =P), and certainly not new to MUDing in general.

My MUD of choice is pretty much dominated by MM2K6 users, and as such, all of the popular scripts and whatnot are written for MM2K6.

I've been trying to convert a relatively simple script (I think it would be considered a script, correct me if I'm using the wrong terminology) to MUSH but to be honest I have no clue where to even start.

The script is pretty simple. It just sets a variable ("src" in this case I believe), and each time you kill a mob it adds 1 to this numeric variable. Once you've finished killing all the mobs in a room, typing "gg" will search the appropriate number of corpses, loot any hidden items found based on a couple simple triggers ("/action"s) and then reset the variable.

Here's the script/whatever in question:

(If you're not familiar with MM2K6, the first {} is the alias/trigger/whatever, the second {} are the actions to be performed by the alias/trigger/whatever and the third {} is the "group" that that alias/trigger/whatever belongs to (I believe the grouping is just used for organization))
(The "sr" alias is simply a manual override that allows you to specify a number of corpses to search instead of using whatever value the variable is currently set to)

Anyway, MM2K6 stuffs below!:

/alias {gg} {/loop {1,$src} {search $LoopCount.corpse};get gold all.cor;get map all.cor;/var {src} {0}}} {amsearch}

/alias {ggres} {/var {src} {0}}

/var {src} {0} {amsearch}

/action {Your blood freezes as you hear %0} {/math {src} {$src + 1}} {amsearch}

/alias {sr %0} {/var {src} {$0};gg} {amsearch}

/gag {There doesn't seem to be a gold in the corpse of %0} {amsearch}
/gag {There doesn't seem to be a %0} {amsearch}

/action {You find a blue orb hidden in the corpse} {Get orb all.cor} {amsearch}
/action {You find an ancient relic of unknown origin hidden in the corpse} {get relic all.cor} {amsearch}
/action {You find a gem of true seeing hidden in the corpse} {Get true all.cor} {amsearch}
/action {You find a depiction of} {Get depiction all.cor} {amsearch}
/action {You find a Mana Stone hidden in the corpse} {get mana all.cor} {amsearch}

I would greatly appreciate being pointed in the right direction. I'm not at all against working it all out on my own, but like I said previously, I don't even know where to start and I'm a pretty big MUSH rookie.

Thanks in advance for your time!
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 12 May 2012 10:53 PM (UTC)  quote  ]
Message
Take a look at some of the "getting started" stuff, like:

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

Or this one about "counting mobs killed":

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

And this one about making aliases:

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

Basically the "action" will be a trigger, and "alias" will be an alias.

The maths can be done inside a script in the trigger/alias like some of the above examples show.

- Nick Gammon

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

Posted by Smashingzwan   (2 posts)  [Biography] bio
Date Reply #2 on Sun 13 May 2012 01:15 AM (UTC)  quote  ]
Message
Thanks for the quick response.

I'll do some reading and hopefully won't have any more questions! I really appreciate the information and your taking the time to point me in the right direction!
[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.


586 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]