[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]  List
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

List

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


Posted by LowKee   (6 posts)  [Biography] bio
Date Tue 21 Feb 2012 07:20 AM (UTC)  quote  ]
Message
Hey guys,

My problem is that on the mud I play, you can store locations to portal to in items. Like, if I went to my guild and used my dagger to store that guild room, at anywhere else on the mud I can use my dagger to portal back to my guild room. The problem is with so many areas you need a lot of these items, you can tag the items with nicknames like "guildroom", "bank" etc but after so many you tend to forget which ones you had.

So what I am after is something where I can have maybe an alias to add the nickname to a list, and a command that brings the list of nicknames up in a nice, easily readable fashion.

Also i'd like to just add I am very new to all this, I have no programming background but i'm persistent and don't mind doing a bit of trial and error to figure things out, so if you have any links or tutorials that could help me learn how to use mushclient to it's full potential, would be great.

Thanks.

[Go to top] top

Posted by LowKee   (6 posts)  [Biography] bio
Date Reply #1 on Tue 21 Feb 2012 10:24 AM (UTC)  quote  ]
Message
I did copy the example of how to make a mob kill counter. I was thinking if you have a table that records kills of monsters, surely it could be tweaked to record bits of text like "Guild room", "Bank".

I started trying to change bits around but got really confused.
[Go to top] top

Posted by LowKee   (6 posts)  [Biography] bio
Date Reply #2 on Tue 21 Feb 2012 02:30 PM (UTC)  quote  ]
Message
Okay, I figured out part of it by editing the mob counter script.



In an alias: addrem *

rem = rem or {}  
remn = "%1" 
rem [remn] = rem [remn] or {}


By requireing tprint and using tprint (remn) I get the list I am after. What i'm not sure on now is how to save it as a plugin as the original tutorial deals with a count and date and time, so i'm not really sure how to edit the code to make it work for me.



[Go to top] top

Posted by Nick Gammon   Australia  (19,169 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Wed 22 Feb 2012 03:36 AM (UTC)  quote  ]
Message
Here's one simple way ...

I often store MUD-specific stuff in the "Notes" tab of the world configuration (eg. where to find stuff).

Now with this alias:


<aliases>
  <alias
   match="shownotes"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>

ColourNote ("darkcyan", "", GetAlphaOption ( "notes"))

</send>
  </alias>
</aliases>


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


Just type "shownotes" (change that to whatever you want) and your world notes are echoed on the screen.

So to add a new portal location (I presume this doesn't happen every 10 minutes) you just edit the world configuration. To see the current ones (and anything else you want to put in there) type "shownotes".

- Nick Gammon

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

Posted by LowKee   (6 posts)  [Biography] bio
Date Reply #4 on Wed 22 Feb 2012 07:34 AM (UTC)  quote  ]
Message
At first it was just printing out an empty line, then after rereading I realised you said "notes" not "notepad". Whoops.

Works perfect, thank you very much.
[Go to top] top

Posted by LowKee   (6 posts)  [Biography] bio
Date Reply #5 on Wed 22 Feb 2012 11:16 AM (UTC)  quote  ]
Message
From there I managed to setup another 2 aliases;


<aliases>
  <alias
   match="add_note *"
   enabled="y"
   group="remembers"
   send_to="12"
   sequence="100"
  >
  <send>SetNotes (GetNotes ().. " %1")</send>
  </alias>
</aliases>



<aliases>
  <alias
   match="clear_note"
   enabled="y"
   group="remembers"
   send_to="12"
   sequence="100"
  >
  <send>SetNotes ("")</send>
  </alias>
</aliases>


Does exactly what I wanted now, thanks again Nick.

Out of intrest how do I get it to skip a line? The example showed \r\n, I tried that but it wasn't working for me. Also can you point me in the direction of other basic tutorials? I've watched a couple of the youtube ones.
[Go to top] top

Posted by Nick Gammon   Australia  (19,169 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Wed 22 Feb 2012 07:52 PM (UTC)  quote  ]
Message
Try doubling the backslashes because of the way that the scripts are interpreted.

Most of the "getting started" part of the forum should help.

- Nick Gammon

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

Posted by LowKee   (6 posts)  [Biography] bio
Date Reply #7 on Thu 23 Feb 2012 06:37 AM (UTC)  quote  ]
Message
Spot on :)
[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.


1,324 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]