things to write a narrative essay about write a persuasive essay best college entrance essay essay writing site how to write an essay in high school

An old snippet (updated)

  • Castillo
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
6 months 3 weeks ago #8489 by Castillo
An old snippet (updated) was created by Castillo
I made 20 years ago a snippet called armweap.c for Circle Mud 3.0.

That snippet create 2 specials mobiles: Armorer and Blacksmiths that allow mortal to build and buy their own armors and weapons.

I've just finished to "update" the code to compiles, and works with TBA 2020.
It's of course BETA, and some settings need to be tuned, but if anyone is interested feel free to
give it a try. (for eg: on a barebone TBA 2020)

github.com/Rescator7/armweap.tbamud

In those days, i also made a spell olc that never been released. I'm gonna see if i can convert
it to TBA 2020. I don't remember how far it was developed, but i remember it was functionnal.


Bob

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #8494 by Sapphire
Replied by Sapphire on topic An old snippet (updated)
How are you enabling the game to save these objects where they save and re-load on player log in from rent? It may or may not be in the code, but I didn't see it when I read through. I would like to understand this more so I can implement it into my mud.

Please Log in or Create an account to join the conversation.

  • Castillo
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
6 months 2 weeks ago #8496 by Castillo
Replied by Castillo on topic An old snippet (updated)
This is what it's looks like once it's installed. (There is colors, and text is aligned) :)

T B A M U D
2 0 2 0

Based on CircleMUD by Jeremy Elson and DikuMUD by Hans-Henrik Staerfeldt,
Katja Nyboe, Tom Madsen, Michael Seifert, and Sebastian Hammer

By what name do you wish to be known? castillo
Password:
(lib/text/imotd)

Welcome to tbaMUD!

This is the immortal MOTD -- the file that immortals will see when they
log in to the game. You should change it to something more interesting
when you get a chance (as well as most of the other files in lib/text.)

If you need help, find a bug, or wish to contribute please stop by
The Builder Academy at: tbamud.com 9091 or tbamud.com .


*** PRESS RETURN:

Welcome to tbaMUD!
0) Exit from tbaMUD.
1) Enter the game.
2) Enter description.
3) Read the background story.
4) Change password.
5) Delete this character.

Make your choice: 1

Welcome to tbaMUD! May your visit here be... Enlightening

The Immortal Board Room
The main hang out of the Gods, the Immortal Board Room is the place to be.
Gods exchange messages here most every day. The eastern foyer is to the south.
[ Exits: s ]
A large bulletin board is mounted on a wall here. It glows with a faint aura.

500H 100M 82V (news) (motd) > goto 0
The Void
You don't think that you are not floating in nothing. You can see
a strange portal located above you.
[ Exits: u ]
The armorer stands here. Type 'list' for help.

500H 100M 82V (news) (motd) > list
Welcome to the Armorer of Magic User.
Note: 'list help' to get a list of help.

There is your current order:
Name list : Undefined object
Short description : An unfinished object
Long description : An unfinished object is lying here.
Wear : FINGER
AC : 0

This nice armor should cost you a little : 300000 coins.

500H 100M 82V (news) (motd) > want name Rabbit
You set NAME to : Rabbit

500H 100M 82V (news) (motd) > want short Rabbit's ear
You set SHORT DESCRIPTION to : Rabbit's ear

500H 100M 82V (news) (motd) > want long put a nice description here.
You set LONG DESCRIPTION to : put a nice description here.

500H 100M 82V (news) (motd) > list wear
Welcome to the Armorer of Magic User.
What kind of body armor do you want?
(choose a kind with: want wear <name>)

Name Price Name Price.
FINGER : 300k * NECK : 500k
BODY : 300k * HEAD : 300k
LEGS : 300k * FEET : 300k
HANDS : 300k * ARMS : 300k
SHIELD : 300k * ABOUT : 300k
WAIST : 300k * WRIST : 300k
HOLD : 300k

500H 100M 82V (news) (motd) > want wear head
You set WEAR_ITEM to : HEAD

500H 100M 82V (news) (motd) > list stat
Welcome to the Armorer of Magic User.
There is the list of availables stats:
(choose one or more with: want <name> <value>)

Name Price Limits Name Price Limits.
STR : 80k [ -4, 4] * DEX : 100k [ -4, 4]
INT : 100k [ -4, 4] * WIS : 100k [ -4, 4]
CON : 100k [ -4, 4] * CHA : 100k [ -4, 4]
AGE : 50k [-10, 10] * CHAR_WEIGHT : 20k [-99, 99]
CHAR_HEIGHT : 20k [-99, 99] * MAXMANA : 50k [ 0, 100]
MAXHIT : 50k [ 0, 100] * MAXMOVE : 50k [ 0, 100]
ARMOR : 70k [-30, 30] * HITROLL : 150k [ -4, 4]
DAMROLL : 150k [ -4, 4] * SAVING_PARA : 20k [-10, 10]
SAVING_ROD : 20k [-10, 10] * SAVING_PETRI : 20k [-10, 10]
SAVING_BREATH : 20k [-10, 10] * SAVING_SPELL : 20k [-10, 10]

500H 100M 82V (news) (motd) > want int 2
You set INT to : 2.

500H 100M 82V (news) (motd) > list
Welcome to the Armorer of Magic User.
Note: 'list help' to get a list of help.

There is your current order:
Name list : Rabbit
Short description : Rabbit's ear
Long description : put a nice description here.
Wear : HEAD
AC : 0
Modifier : INT by 2

This nice armor should cost you a little : 500000 coins.

500H 100M 82V (news) (motd) > want ac 10
You set AC to : 10

500H 100M 82V (news) (motd) > list
Welcome to the Armorer of Magic User.
Note: 'list help' to get a list of help.

There is your current order:
Name list : Rabbit
Short description : Rabbit's ear
Long description : put a nice description here.
Wear : HEAD
AC : 10
Modifier : INT by 2

This nice armor should cost you a little : 1200000 coins.

500H 100M 82V (news) (motd) > buy
Sorry, you don't have enough coins!

500H 100M 82V (news) (motd) > set castillo gold 2000000
Castillo's gold set to 2000000.

500H 100M 82V (news) (motd) > buy
You bought Rabbit's ear for 1200000 coins!

500H 100M 82V (news) (motd) > inv
You are carrying:
[Client] xterm-256color | [Colors] 256 | [MXP] No | [MSDP] No | [ATCP] No

T B A M U D
2 0 2 0

Based on CircleMUD by Jeremy Elson and DikuMUD by Hans-Henrik Staerfeldt,
Katja Nyboe, Tom Madsen, Michael Seifert, and Sebastian Hammer

By what name do you wish to be known? castillo
Password:
(lib/text/imotd)

Welcome to tbaMUD!

This is the immortal MOTD -- the file that immortals will see when they
log in to the game. You should change it to something more interesting
when you get a chance (as well as most of the other files in lib/text.)

If you need help, find a bug, or wish to contribute please stop by
The Builder Academy at: tbamud.com 9091 or tbamud.com .


*** PRESS RETURN:

Welcome to tbaMUD!
0) Exit from tbaMUD.
1) Enter the game.
2) Enter description.
3) Read the background story.
4) Change password.
5) Delete this character.

Make your choice: 1

Welcome to tbaMUD! May your visit here be... Enlightening

The Immortal Board Room
The main hang out of the Gods, the Immortal Board Room is the place to be.
Gods exchange messages here most every day. The eastern foyer is to the south.
[ Exits: s ]
A large bulletin board is mounted on a wall here. It glows with a faint aura.

500H 100M 82V (news) (motd) > eq
You are using:
<worn on head> Rabbit's ear

500H 100M 82V (news) (motd) > oedit 17700
-- Item number : [17700]
1) Keywords : Rabbit
2) S-Desc : Rabbit's ear
3) L-Desc :-
Put a nice description here.
4) A-Desc :-
Not Set.
5) Type : ARMOR
6) Extra flags : NOBITS
7) Wear flags : TAKE HEAD
8) Weight : 0
9) Cost : 0
A) Cost/Day : 0
B) Timer : 0
C) Values : 10 0 0 0
D) Applies menu
E) Extra descriptions menu: Not Set.
M) Min Level : 0
P) Perm Affects: NOBITS
S) Script : Not Set.
W) Copy object
X) Delete object
Q) Quit
Enter choice : q
500H 100M 82V (news) (motd) >

Please Log in or Create an account to join the conversation.

  • Castillo
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
6 months 2 weeks ago #8497 by Castillo
Replied by Castillo on topic An old snippet (updated)
Sorry, in my previous post my cut and paste went wrong.

when you buy, the object goes into your inventory, you can after that wear it.

Ok, how the system works? well, actually. it's use low level OLC functions that doesn't require IMMORTAL levels.

all object are created in zone defined in const int zones_system [] = {177, 178, 179, NOWHERE};

You needs to created those zones. You can add more zones in zones_system[], as long as the list end with NOWHERE, and you recompile, reboot.

When someone buy an armor, weapon the system looks for free VNUM starting
from 17000, 17001, 17002 until it's found an used VNUM, and use it to create the objects. If it reach the end of that zone 17799, it will try the next zone 178 with object VNUM 17800, 17801, etc.. until the end of the zone, etc.. if it's reach the end of all zones, and it's all full. it will refuse, and give an error message.

Bob

Please Log in or Create an account to join the conversation.

  • Castillo
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
6 months 2 weeks ago #8498 by Castillo
Replied by Castillo on topic An old snippet (updated)
Opps: until it's found an unused VNUM

Let me know, if you have more questions.

Please Log in or Create an account to join the conversation.

More
6 months 4 days ago #8545 by Sapphire
Replied by Sapphire on topic An old snippet (updated)
I wonder if there is a way to modify this code to create the objects into a folder created for players such as playerfiles, playervariables, etc as to eliminate the need for additional shell zones to be added just for objects. To clarify: Rather than using vnums in shell zones, can the code be modified where is creates lines of text in a new file in the mud/lib/ folder. Maybe a global file in there so there are no issues if the item is picked up by another player.

Please Log in or Create an account to join the conversation.

  • Castillo
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
6 months 3 days ago - 6 months 3 days ago #8547 by Castillo
Replied by Castillo on topic An old snippet (updated)
Actually, you can add all the zones you are already using in your mud in the snippet code, and it will use all unused vnum objects numbers.

The idea to use exclusive zones (177, 178, etc). Is to make it easier to spot objects created by armorer, and blacksmith.

I wonder if there is a way to modify this code to create the objects into a folder created for players such as playerfiles, playervariables, etc as to eliminate the need for additional shell zones to be added just for objects. To clarify: Rather than using vnums in shell zones, can the code be modified where is creates lines of text in a new file in the mud/lib/ folder. Maybe a global file in there so there are no issues if the item is picked up by another player.


The problem with this idea is that the the TBA mud code handle objects by "object VNUM", that would require to modify mostly the entire server code which would be a lot more complicated.

Bob
Last edit: 6 months 3 days ago by Castillo.

Please Log in or Create an account to join the conversation.

More
6 months 3 days ago #8548 by thomas
Replied by thomas on topic An old snippet (updated)
One option, which I've seen earlier, is to use a "template object", typically in zone 0 combined with a UNIQUE flag. Then, when saving, all properties that are different from the template object (which would be all of them, more or less) would save as separate lines in the plrobjs file.

I seem to recall this pattern being used in Cruel World MUD.

Please Log in or Create an account to join the conversation.

Time to create page: 0.166 seconds