Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Thu Aug 15, 2002 6:04 pm   

learning mapper and room scripts
 
could anyone do something like the sample that comes with Zmud, ofcause just a few rooms... with room script that do a few thing (anything would do) and write why/how they are doing the stuff. because i was thinking about the stuff Zugg talked about making map for pen and paper RPG, with room scripts to roll dices and stuff like that i and i liked the idea so i want to learn how to do it.



Yugo Sangori
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Thu Aug 15, 2002 11:08 pm   
 
First because in order to implement this idea you would be working in offline mode you have to create macros for the movement, I would reccomend using the keypad for them, we will also set key 5 to reexecute the room script by teleporting to where we are.

#KEY KEY1 {#MOVE southwest}
#KEY KEY2 {#MOVE south}
#KEY KEY3 {#MOVE southeast}
#KEY KEY4 {#MOVE west}
#KEY KEY5 {#TELEPORT %roomnum}
#KEY KEY6 {#MOVE east}
#KEY KEY7 {#MOVE northwest}
#KEY KEY8 {#MOVE north}
#KEY KEY9 {#MOVE northeast}
#KEY SUB {#MOVE up}
#KEY ADD {#MOVE down}

Next lets create a few rooms, lets say we create a 9x9 room area with all rooms linked, and 9 of them are a road the rest are forest.

We would put in the room scripts for the road:
EncChance=5;EncTypes {11|3|4};#ECHO Easy traveling.;RollEncounter
I think I would put a hill in the middle:
EncChance=5;EncTypes {11|3|4};#ECHO Uphill to east.;RollEncounter
EncChance=5;EncTypes {11|3|4};#ECHO Crested hill, any player rolling on sight or sense negates encounter for 5 road rooms and 2 forest rooms.;RollEncounter
EncChance=5;EncTypes {11|3|4};#ECHO Downhill to east.;RollEncounter

The explanation of these would be to set a chance that would be used in comparison with a random, then to spit out the names, and perhaps how many nasties you want to be there. Also to provide notes on the room to your display, and finally roll the dice for you.

The main things to read in the help on are the ALIAS command (RollEncounter is my example of what for),random function (you will want it to do your dice rolls), dice function might be better for some dice rolls (depending on game system, most just add the pips on the dice). In my example, I used a list for EncTypes it is a good way to group information and has many function that let you readily retrieve information within and about the list. Though it isn't important to the example 11 represented a queen's patrol, 3 and small ill equipped band of brigands, and 4 a small well equipped competent band of brigands.

No one can really tell you how to do what you want till you know what you want, but I can say that as zScript stands it is nearly as capable as any programming language. That means you can do just about anything you can think of.
Reply with quote
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Fri Aug 16, 2002 1:13 am   
 
this look nice i will take a closer look in the morning and report back if i run into any problems

Yugo Sangori
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net