Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Builders and Areas
Click here to Register

Reply
 
Thread Tools
Old 11-15-2004, 08:47 PM   #1
tehScarecrow
Member
 
Join Date: Jun 2004
Posts: 66
tehScarecrow is on a distinguished road
tehScarecrow is offline   Reply With Quote
Old 11-16-2004, 01:36 AM   #2
Ogma
Member
 
Ogma's Avatar
 
Join Date: Apr 2002
Home MUD: DartMUD
Posts: 86
Ogma is on a distinguished road
Yeah, my OLC for LPC is called emacs and scp, but you could probably use vi, or kate or even notepad.

And 'snippets' are a DIKUivative thing, not lpmud.
Ogma is offline   Reply With Quote
Old 11-16-2004, 09:24 PM   #3
tehScarecrow
Member
 
Join Date: Jun 2004
Posts: 66
tehScarecrow is on a distinguished road
Well, I meant online room creation, so that I don't have to use notepad, pico etc. to make rooms.
tehScarecrow is offline   Reply With Quote
Old 11-17-2004, 01:18 AM   #4
kaylus1
 
Posts: n/a
While there aren't any that I know of, of the top of my head at least, it is not anything hard to do. If there were any out there, though, they would be suited to the mudlib they were created for an would require a small amount of LPC to change them to work with your mudlib.

That being said, the small amount that you would need to know would probably be only slightly less than the amount needed to create your own online building tools. Again, it is all very dependent on what mudlib you are running.

Althought the word 'snippet' may be a DIKUivative thing, as Ogma put it, there are many pieces of code about the net, areas, lockers and pawnshops, guild objects. Quite a few are written for older 2.4.5 code though and would require substantial knowledge of your own mudlib to convert them.

I constantly convert ideas from DGD, Amylaar and MudOS mudlibs between each other and even over to Pike language just for fun and it also helps hone my skills in dealing with more complex issues in my own code.

I am going to assume you are using a fairly new mudlib and decent driver and that your mudlib supports 'bin'-type commands (i.e. /cmds/player, /cmds/ghost, etc). So what you will need to do is start looking at these and start by making a simple hello world command.

After you complete that successfully start looking at other code and learn how to use the input_to efun, which allows you to redirect input to a function, then you can make an interactive command, i.e. to ask a user input.

After that it's all downhill, and the rest is how you want to make it. Do you want the command to create the object and save it as pure data so that it can be loaded with a load_object type of efun? Or do you want the command to write out the code into a .c file so that it appears as any hand-written room would?

If you choose the first just clone your object type you are creating, have the users input define the properties and use a save_object, voila. If you choose the latter, then have the program collect all the data (name, short, long, etc) and at the end of the input have it write_file it to the appropriate file (in LPC).. i.e.

[code]
string short_desc, long_desc;
int armor;
....
code to get input here
....
void write_out() {
  string buf;

  buf = "/* Auto Room */\ninherit ARMOR;\nvoid create() {\n";
  buf = sprintf(buf, "%s    set_short(\"%s\");\n", buf, short_desc);
  buf = sprintf(buf, "%s    set_long(\"%s\");\n", buf, long_desc);
  buf = sprtinf(buf, "%s    set_armor(\"%s\");\n}", buf, armor);

  write_file("/domain/fooland/fooarmor.c", buf);
  write("Armor done!\n");
}
[/quote]

That is just an example and will vary depending on mud/driver combinations, and there are many different things you will have to decide. Do you want the command to build all things, or are you going to make seperate commands for different object types. How are you going to make sure that someone doesn't use the command at the same time and overwrite variables? How about giving the command permissions to write in certain directory? What if...? What if...?

All of them are easy problems to overcome, I have such code on my mud, different commands for building different things with a menuing system built. It takes time, but in the end you will come out better for having even attempted it.

Best of Luck,
Kaylus
  Reply With Quote
Old 11-18-2004, 01:44 PM   #5
rotm_adm
Member
 
Join Date: Nov 2004
Location: Waycross, GA USA
Posts: 45
rotm_adm is on a distinguished road
Smile

rotm_adm is offline   Reply With Quote
Old 11-18-2004, 06:59 PM   #6
Ogma
Member
 
Ogma's Avatar
 
Join Date: Apr 2002
Home MUD: DartMUD
Posts: 86
Ogma is on a distinguished road
Oh...you want Online. In that case I use ed.
Ogma is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 07:18 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022