ID:170457
 
I'm working on a text MUD and I'm trying to include NPCs in rooms. I tried using this code:

world
new/mob/NPC/Elf(/area/sacredtemple)

Ofcourse it doesn't work(or else I woudln't be posting here).

Any suggestions on why it won't work and how I might fix it? Or if this can't work, a way to do it that would work?
1) You could call it on world/New()
2) You could create a map.
I believe that's what you mean. :)
In response to Hell Ramen
Why would I create a map in a text only game?

I'm trying to get the mob to start in a room, not on a map that does not exist.
In response to DaemonWind
DaemonWind wrote:
Why would I create a map in a text only game?

I'm trying to get the mob to start in a room, not on a map that does not exist.

Are you using text mode?
Otherwise, if not, I believe you should put it under world/New().
In response to Hell Ramen
What do you mean by "text mode"?
In response to DaemonWind
DaemonWind wrote:
What do you mean by "text mode"?

While in a graphical game, hold Control and press T.
Or, you can play "Your Money or Your Life" for an example...I can't really explain it. :p
In response to Hell Ramen
The whole game is nothing but text, there are no graphics at all.
In response to DaemonWind
Since when can't text be graphics? That's the whole point of text mode. Try a Roguelike game sometime :-).
In response to Artekia
When graphics are icons, and there are none.
In response to DaemonWind
He is talking about a text mud, you know where it doesnt even have a map screen. Instead just a bunch of stuff like this.
/*
Grassy Knoll

You find yourself upon a grassy knoll outside town.
To the east you can just make out the smoke from the
cooking fires of the village.

A scragly looking sheep munches grass at your feet.
*/

With the name of the room

and its description

plus any npc's around.

Now his problem seems to be that his npc's wont activate, I cant help that but I can describe his plight for you. Please help this coder.
In response to Madcrackfiend
Yes that is my problem.
In response to DaemonWind
Wow I did a search on 'text mud' and came up with squat. This might be a good area to look into you who make tutorials and demos. That or I'm blind. Im off to try and see if I can figure out a way to help you. I wish you luck.
Hell Ramen was right.

this
world
new/mob/NPC/Elf(/area/sacredtemple)

shoud be
world
New()
new/mob/NPC/Elf(/area/sacredtemple)
..()
In response to Madcrackfiend
If he's looking for help on a text-mud, why not just send him to Zilal's tutorial on making one? It should clear some things up for him.

Regardless, you've probably read it already, but creating mobs in rooms for a text mud is similar to creating objects in rooms as Zilal describes in the tutorial there.
In response to Slipknight
Because as you've said I have already read it and nice though it is, it is a little outdated. Ive had to prety much rewrite half of testmud to make it halfway playable. Which I find sadining. Because zilail is great, I learned how to code from her zbt. And it only shows you how to create an obj in the players inventory, not in an area/room.
Also slipknight is right you create obj's in rooms the same way.