Posted by
| David Haley
USA (3,881 posts) bio
|
Message
| Part of my plan is to not do just what SMAUG mudprogs do. Part of the whole problem is that mudprog is very limited, and so, as a result, what you can do with them is very limited.
I'd like mudprogs that can do things as complicated as you could do in C(++).
Consider something like the following, written in skrypt, the home-brew language I wrote several years ago (so take it with the appropriate grain(s) of salt). It is a script attached to a room. The functions are events, trigger hooks if you will.
initRoom ()
{
// Create a repeating timer of 5000 ms.
eventTimerCreate(me, "timerHeal", 5000, -1);
}
enter(mobile ch)
{
/*echoToRoom(me, "Hey, " + name(ch) + "! The people already in this room are:");
forEach (mobile person, getRoomPeopleList(me) )
{
if ( person != ch )
echoToRoom(me, name(person));
}*/
echoToRoom(me, "Enjoy your stay.");
}
timerHeal ()
{
forEach ( mobile person, getRoomPeopleList(me) )
{
if ( getPosition(person) == "sleeping" )
{
affectHP(person, 4);
//echoToRoom(me, "Healing " + name(person) + " for 4 HP.");
}
else if ( getPosition(person) == "resting" )
{
affectHP(person, 1);
//echoToRoom(me, "Healing " + name(person) + " for 1 HP.");
}
//echoToRoom(me, name(person) + " is in this room, and is " + getPosition(person) + ".");
}
}
timerKickOut()
{
// Kick everybody out of the room
forEach ( mobile person, getRoomPeopleList(me) )
{
transfer( person, "" );
}
}
It should be pretty obvious what the syntax means.
This is impossible in mudprog. But this is just the very beginning of what I'd like to do.
Would your system be able to handle this? I'm not saying it can't, just that I would only be satisfied if it did. :-P
About the quest system:
What stumps me on the quest system is not that I don't know how to code it, but that I'm unsure what exactly I want to code. I think there's a little more work to do with designing the quest system. I mentioned some of those in a recent email; I'm still thinking about a hybrid system of some kind.
I'm starting to think of it in two concepts: quests vs. tasks. A quest is one that has steps and all that stuff, in which players move through steps via script events. A task is one in which the kinds of tasks are pre-defined, and would be things like "kill so-many monsters", "bring this so-many of this item to that npc", etc.
But anyhow -- one thing at a time. :-) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|