Syntax for no Justice system in an area

For builders to discuss and ask building questions.
Post Reply
User avatar
Kelemvor
Sword Grand Master
Sword Grand Master
Posts: 2295
Joined: Mon Apr 11, 2005 6:14 pm
Location: The Fugue Plain within the Crystal Spire

Syntax for no Justice system in an area

Post by Kelemvor » Thu Jan 24, 2008 5:19 pm

Can someone tell me what the correct syntax is for the Justice section of the area file when you do not wish for any guards/courtroom etc

Currently I have

Code: Select all

#JUSTICE
CourtRoom 100000
Dungeon 100000
Judge 100000
Guard 100000
Crime CRIME_HIGH_MURDER PUNISHMENT_DEATH
Crime CRIME_LOW_MURDER PUNISHMENT_SEVER
Crime CRIME_ASSAULT PUNISHMENT_SEVER
Crime CRIME_MUGGING PUNISHMENT_RANDOM_ITEM
$
But wish to remove the justice element completely and load the guards only where an NPC is under attack
...never send to know for whom the bell tolls,
it tolls for thee.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Thu Jan 24, 2008 7:42 pm

You can use -1 for the vnum, or simply not put any #JUSTICE section.
Image
User avatar
Kelemvor
Sword Grand Master
Sword Grand Master
Posts: 2295
Joined: Mon Apr 11, 2005 6:14 pm
Location: The Fugue Plain within the Crystal Spire

Post by Kelemvor » Thu Jan 24, 2008 8:28 pm

That's great, thank you

Now for the program which NPCs use to summon assistance if attacked...

Code: Select all

>fight_prog 33~
smo yells "Shouts for help in some fashion specific to the area"
if rand(50)
  mpmload 'guardsman'
  mpoload 'a weapon'
  mpoload 'some armour'
  mpquiet on
  mpgive 'a weapon' 'guardsman'
  mpgive 'some armour' 'guardsman'
  mpforce 'guardsman' wear all
  mpquiet off
  mpechoat $n ‘echo to player that aid has arrived’
  mpechoaround @N ‘echo to anyone else in vicinity’
  mpforce 'guardsman' mpkill $n
endif
~
Will this accomplish that? Are the random factors too high or too low?
...never send to know for whom the bell tolls,
it tolls for thee.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Thu Jan 24, 2008 9:36 pm

First, you do not need to use "smote". You can simply have the mob "yell". A line like: "yell I am being attacked! Help!" would work fine.

Second remark ... in the mpechoaround, the "target" of the around is $n, not @N. The first "$n" tells the mud who is the character around who the comment must be echoed. If you need to refer to character $n inside the echo though, you would use @N. For example:

mpechoaround $n {70}A guard comes to help the mob fight @N.

Third, you wouldn't need the mpquiet on/mpquiet off, because (a) mpgive does not produce any echo, and (b) this is only telling this mob to be quit; the echoes that the other mob is "wearing all his equipment" or "wielding a longsword in his right hand" will still be shown.

Now... about the weapons... it's a bit tricky, and there's no good solution. What you have there works if only one mob is summoned for help, but becomes broken when more mobs are summoned before the first one is dead. Consider this:

- mob summons Guard
- mob gives equipment to Guard
- mob forces Guard to wear all (all that works well)
- mob summons a second Guard
- mob gives equipment to the first Guard
- mob forces the first Guard to wear all

Thus, we have Guard 1 with a set of equipment worn plus a set of equipment in inventory and Guard 2 who is naked.

If the mob is sentinel and you know where he is, you can do this: load the (new) guard in another room, equip him there, then transfer him. That would go something like this:

Code: Select all

>fight_prog 33~
yell "Shouts for help in some fashion specific to the area"
if rand(50)
  mpat SecretRoom mpmload 'guardsman'
  mpat SecretRoom mpoload 'a weapon'
  mpat SecretRoom mpoload 'some armour'
  mpat SecretRoom give 'a weapon' 'guardsman'
  mpat SecretRoom give 'some armour' 'guardsman'
  mpat SecretRoom mpforce 'guardsman' wear all
  mpat SecretRoom mpforce 'guardsman' mpgoto RoomWithTheMob
  mpechoat $n �echo to player that aid has arrived�
  mpechoaround $n �echo to anyone else in vicinity�
  mpforce 'guardsman' mpkill $n
endif
~
Image
User avatar
Kelemvor
Sword Grand Master
Sword Grand Master
Posts: 2295
Joined: Mon Apr 11, 2005 6:14 pm
Location: The Fugue Plain within the Crystal Spire

Post by Kelemvor » Thu Jan 24, 2008 9:45 pm

Using a smote yell because I dont want a coded yell in Tethyr to be heard in Sembia - unfortunately this area is spread out all over the place.

*goes back to check all of his $n and @n lines...* thanks :)

Okay, so no need to use quite... that's good

Hmm, I've no spare rooms, but would it work if they loaded up in the pet store and were brought from there?

Thanks for the very prompt answers... I know you're only doing it because I used question delays as an excuse for not getting this finished ;)
...never send to know for whom the bell tolls,
it tolls for thee.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Thu Jan 24, 2008 10:45 pm

Ah, good thinking on the no-yell thing.

You can perhaps use the smote yell in addition with:
"mpasound You hear a guard yell for help"

That command will echo to all nearby rooms and add "from the north/east/south/..."
Image
Mask
Staff
Staff
Posts: 2649
Joined: Tue Jul 15, 2003 9:21 pm

Post by Mask » Thu Jan 24, 2008 10:54 pm

I've been thinking about this problem before and how to solve it. Some solutions I thought of were:

mpmload <mobvnum> <objvnum1....objvnumX>

Would have the mob load wearing all of that equipment.

Or possibly an extra couple of fields after the mob section in the area file like:

@equipment <objvnum1....objvnumX>

Which would have that mob always load with that eq...

What do you think?
User avatar
Kelemvor
Sword Grand Master
Sword Grand Master
Posts: 2295
Joined: Mon Apr 11, 2005 6:14 pm
Location: The Fugue Plain within the Crystal Spire

Post by Kelemvor » Fri Jan 25, 2008 12:30 am

I think associating equipment with mobs and it being pre-loaded would be a nice enhancement.

I dont know if it needs a new section, as all that info is in the reset part, but I'm definitely not the coding expert there :)
...never send to know for whom the bell tolls,
it tolls for thee.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Fri Jan 25, 2008 12:45 am

Mask wrote:I've been thinking about this problem before and how to solve it. Some solutions I thought of were:

mpmload <mobvnum> <objvnum1....objvnumX>

Would have the mob load wearing all of that equipment.

Or possibly an extra couple of fields after the mob section in the area file like:

@equipment <objvnum1....objvnumX>

Which would have that mob always load with that eq...

What do you think?
Heh... both. :)

It would be nice to be able to associate "standard equipment" with mobs, and it would also be nice to be able to load mobs (mpmload OR minvoke) with equipped/worn items in one command.

As to where to put them in the file, maybe some sort of "Q" (for Equip) section after the mob description, similar in syntax to the E/I/A sections we have for objects (extra desc, identify, apply).
Image
Post Reply