Couple more questions

For builders to discuss and ask building questions.
Post Reply
Enig
Sword Grand Master
Sword Grand Master
Posts: 787
Joined: Wed Dec 20, 2006 5:28 pm
Location: The Frozen North (Canada!)

Couple more questions

Post by Enig » Tue Jul 08, 2008 3:16 pm

Hi! I hope you fellows will indulge me a bit more, because I have a few more questions :)

1) When a room is set solitary, do NPCs count as occupants? Ie. can I have a PC and an NPC in a solitary room?

2) Is it possible to change the maximum speed of a mount so it never goes faster than walk/trot? Maybe by putting an intercept program triggered by 'speed' on the mount?

3) I'm not sure how to explain this and it's really a couple questions, so let me put some script down here to help clarify.

Code: Select all

{30}The small green ugli fruit is covered all around with tiny, spidery
runes that have been carved in its surface.{0f}
>intercept_prog throw~
if wear_loc($0)!=-1
  if charinroom($n)==$1
    mpechoaround $n When @N throws his ugli fruit at $1 it shatters and releases a minty cloud of smoke.
    mpechoat $n When you throw your ugli fruit at $1 it shatters and releases a minty cloud of smoke.
    mpaffect 'trollish vigor' $1 
    mpjunk $o $n
  else
    mpechoat $n You don't see anything like that here.
  endif
else
  mpechoat $n You should hold the ugli fruit before trying to throw it.
endif
Would that $1 properly use the word after the throw command in this situation?

Also, would mpaffect properly cast trollish vigor on the target? If so, would they see anything at all, or should I mpechoat them to give them an effect to go by?

4) This may sound silly, but if you'll bear with me, thanks! The string and string prefix lesson use, as an example, intercepting a cast and checking the proceding string for the spell and the target. Is there something here to stop the player from just typing 'cast friends witch', without actually being able to cast the spell, to fool the script? I only ask because I've basically copied the idea for one of my tests :P

5) Finally, last but not least! This is less of a question and more of a request. I need a couple of object vnums, if you please. Specifically..

'a dretch tooth' - This is a small blunt tooth coming from a dretch, a minor demon.
'a bebilith fang' - This dark brown fang comes from a bebilith, a demon. It is covered with a slimy greenish substance.
'a marilith scale' - This is a small glistening scale covered with a greenish slimy substance. It comes from a marilith, a major demon.
'a lump of chocolate' - Hmmm a large lump of chocolate. You could obviously eat it, or you could crush it into chocolate chips, with a rolling pin.

I'm planning on using the various demon bits in a quest to allow the player to learn the banishment spell, and the lump of chocolate vnum will be the last piece in my bakery quest line.


Anyways, I think this handles all of my questions pretty well. Things are coming together now, so this may be my last question barrage before my final draft is done. Let's hope! Thanks in advance for your time :)
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Re: Couple more questions

Post by Dalvyn » Tue Jul 08, 2008 4:33 pm

1) I'm not entirely sure. It would require some testing.

2) I don't think it's possible. Besides, if you put an intercept_prog speed on the mount, it will trigger whenever someone in the room types "speed" (which is not what you want); and I'm not even sure it would trigger when the mount is ordered to set its speed.

3) Yes, $1 is the first word after the intercepted command. For this program to work, it should be the name of the target though (an adjective might not work). Mpaffect doesn't produce echoes, so you would need to add that.

4) That would require a separate check to verify that the caster can cast "friends" and has it memorized indeed, yes.

5) [17011] ( 19) A dretch tooth
[17014] ( 12) A bebilith fang
[17020] ( 6) A marilith scale
[39040] ( 22) A lump of chocolate
The vnums are the first numbers.

You're welcome! :)
Image
Enig
Sword Grand Master
Sword Grand Master
Posts: 787
Joined: Wed Dec 20, 2006 5:28 pm
Location: The Frozen North (Canada!)

Re: Couple more questions

Post by Enig » Fri Jul 11, 2008 7:53 am

Turns out that I have a few more questions after all! I'll try and keep it straight to the point though.

1) If I wrote a reset as such..
M 0 QQ00 2 QQ17

My understanding is that it'll load 2 of mob QQ00 into room QQ17. Now this might sound silly, but if mob QQ00 isn't set sentinel and can wander out of that room, will the reset potentially produce an endless amount of them?

2) If I have a mob with 'Class_Ilmater' set is it a good idea to also give it the 'spec_cast_cleric' special?

Thanks in advance for all of your help, as always! :)
User avatar
Kregor
Sword Grand Master
Sword Grand Master
Posts: 1474
Joined: Sun Jul 11, 2004 6:14 am
Location: Baldur's Gate

Re: Couple more questions

Post by Kregor » Fri Jul 11, 2008 3:31 pm

Enig wrote:Turns out that I have a few more questions after all! I'll try and keep it straight to the point though.

1) If I wrote a reset as such..
M 0 QQ00 2 QQ17

My understanding is that it'll load 2 of mob QQ00 into room QQ17. Now this might sound silly, but if mob QQ00 isn't set sentinel and can wander out of that room, will the reset potentially produce an endless amount of them?
There's two ways to do this, depending on what your intent is.
The above example tells the code: pop two of these mobiles, one at a time at each repop, into this room. The game code keeps track of these mobiles, and once there are 2, it will not repop anymore unless one or more of them is killed, even if they wander from the room.
The above code is handy for mobiles which you want to start with less at the first repop, and increase with each repop to the maximum. If you want both mobiles to load at the same time with each repop, you will want to make two reset entries instead, like this:

M 0 QQ00 1 QQ17
M 0 QQ00 1 QQ17

And of course, any equipment and inventory resets have to be put beneath each one.
2) If I have a mob with 'Class_Ilmater' set is it a good idea to also give it the 'spec_cast_cleric' special?
Cleric mobiles have their own special functions which are determined by their class settings. Leave them at this. Only justice system and pet spec funs should really be set in the area file.
"There is no safety for honest men except by believing all possible evil of evil men."

Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
Enig
Sword Grand Master
Sword Grand Master
Posts: 787
Joined: Wed Dec 20, 2006 5:28 pm
Location: The Frozen North (Canada!)

Re: Couple more questions

Post by Enig » Thu Jul 31, 2008 4:46 pm

Just a quick few questions, if you fellows will indulge me!

Firstly, is it possible to alter the cost which shopkeeper charge for particular items? I've been trying to make magical items to approximate some old favourites, like alchemist's fire and tanglefoot bags, but since the scripts aren't taken into account in the value, they're being sold at bargain basement prices :P

Also, I've been having some trouble with pets wandering away from their masters, with and without the special pet function checked on them.

Finally, I'm looking for a large race type that would be appropriate for a mountable turtle. The closest thing I found is a purple worm, but that's a little too big :P Any ideas?

Thanks again, in advance!
User avatar
Kregor
Sword Grand Master
Sword Grand Master
Posts: 1474
Joined: Sun Jul 11, 2004 6:14 am
Location: Baldur's Gate

Re: Couple more questions

Post by Kregor » Thu Jul 31, 2008 6:28 pm

Enig wrote:Just a quick few questions, if you fellows will indulge me!

Firstly, is it possible to alter the cost which shopkeeper charge for particular items? I've been trying to make magical items to approximate some old favourites, like alchemist's fire and tanglefoot bags, but since the scripts aren't taken into account in the value, they're being sold at bargain basement prices :P
For this, you need to add an APPLY_VALUE to the object, "A APPLY_VALUE XX" the XX is the amount in copper you want added to the value of the item.
Also, I've been having some trouble with pets wandering away from their masters, with and without the special pet function checked on them.
Make sure you have them flagged ACT_SENTINEL, or they will wander just like any other non-sentinel mobile.
Finally, I'm looking for a large race type that would be appropriate for a mountable turtle. The closest thing I found is a purple worm, but that's a little too big :P Any ideas?
Honestly? I got nothing on this one. Creature sizes are built into the race file, and if there's no giant turtle, then I wouldn't know where to steer you. Though I can tell you NOT to use something like the purple worm! Also built into the race entry for a creature are things like special attacks, damage, etc. And you can end up giving someone a mount or pet that is far too powerful for a pet, that ends up being a tank instead.
"There is no safety for honest men except by believing all possible evil of evil men."

Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
Enig
Sword Grand Master
Sword Grand Master
Posts: 787
Joined: Wed Dec 20, 2006 5:28 pm
Location: The Frozen North (Canada!)

Re: Couple more questions

Post by Enig » Thu Jul 31, 2008 11:14 pm

Sorry, I don't mean to be a pest, but there's something else that's giving me some trouble.

Is it possible to use mposet and etc. on a buried item? At the moment I'm being told that the object isn't in the room, which I'm assuming means that the omnipresent invisible helper mob isn't able to interact with buried objects. Is there any way around this?

Also, would it be possible to make a mob that's permanently affected by an enlarge spell?

As always, thanks for your help before and in advance! :P
User avatar
Kregor
Sword Grand Master
Sword Grand Master
Posts: 1474
Joined: Sun Jul 11, 2004 6:14 am
Location: Baldur's Gate

Re: Couple more questions

Post by Kregor » Fri Aug 01, 2008 5:02 pm

The enlarge flag is in the AFFTWO list of flags, which doesn't have a field in the mobile entry of an area file, so you cannot set it permanent, as you could things like invis and infra.

buried objects are nothing more than objects which have the _BURIED flag set on them, thus invisible to the naked eye, but they are in fact in the room. So yes, you can mposet onto them. If it's through an object or room program, this is handled by Supermob, which can see anything and everything. If it's an mprog, and you want to be sure that a mobile can see the item to do it, just set AFF_DETECT_BURIED on the mobile.
"There is no safety for honest men except by believing all possible evil of evil men."

Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
Enig
Sword Grand Master
Sword Grand Master
Posts: 787
Joined: Wed Dec 20, 2006 5:28 pm
Location: The Frozen North (Canada!)

Re: Couple more questions

Post by Enig » Fri Aug 01, 2008 6:54 pm

Haha, wow. Ah, thanks for your help, Kregor. I did a lot of scrounging around in my scripts before and after you posted up your answer and I finally figured out what the problem was; user error! Naturally. I guess I wasn't paying close enough attention the first time I read the restringing help file because when I tried to alter my buried object's descriptions I started with the keywords and didn't include the vnum. :P
User avatar
Kregor
Sword Grand Master
Sword Grand Master
Posts: 1474
Joined: Sun Jul 11, 2004 6:14 am
Location: Baldur's Gate

Re: Couple more questions

Post by Kregor » Fri Aug 01, 2008 11:33 pm

You're putting a lot of thought into this and apparently trying some pretty complex ideas in your progs. I am quite eager to review the area when it's done to see the results :)
"There is no safety for honest men except by believing all possible evil of evil men."

Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
Enig
Sword Grand Master
Sword Grand Master
Posts: 787
Joined: Wed Dec 20, 2006 5:28 pm
Location: The Frozen North (Canada!)

Re: Couple more questions

Post by Enig » Sun Aug 03, 2008 3:02 am

Just another quick question!

I've been trying to use the isaffected conditional but I haven't had much success. It seems to work fine with the flying aff flag, but the others that I've tried (hide, sneak, invis) don't seem to work. Specifically...

if isaffected($r) == invis

... is giving me the error message 'BUG: Unknown affect being checked' - Of course the obvious interpretation is that I'm messing up the syntax somehow. Any ideas on how this should be written?

Thanks again, in advance! I'm rather hoping the area should be done soon, but considering how many times I've said that before and been wrong I'm not going to take any guesses just yet :P
User avatar
Japcil
Sword Grand Master
Sword Grand Master
Posts: 1143
Joined: Fri Jun 17, 2005 5:32 pm
Location: Golden Oaks
Contact:

Re: Couple more questions

Post by Japcil » Sun Aug 03, 2008 8:22 pm

I believe the affected flags are named invisible, sneaking, hidden vs their skills/spell name of invis, hide and sneak.
Image
Post Reply