rand checks against mobs

For builders to discuss and ask building questions.
Post Reply
User avatar
Kregor
Sword Grand Master
Sword Grand Master
Posts: 1474
Joined: Sun Jul 11, 2004 6:14 am
Location: Baldur's Gate

rand checks against mobs

Post by Kregor » Sat Jun 18, 2005 6:01 pm

Does the rand check for a questbit check against mobs in a room as well, or just PCs?

There is a passage in one of my quests where I want two different mobs to have a dialog, complete with pauses, using the simulated lag as detailed in the builders guides with rand checks.

Now, to save on char qbits, I had the idea of setting the qbits on the mobs as they speak to each other, rather than the PC. Thus mob1 speaks to mob2, sets a qbit on himself, mob2 answers to a rand check on that qbit, then sets a qbit on himself, mob1 then does his next line. The result is a dialog between the two with lag just as if it were two PCs talking.

Of course, my bright idea will only work if rand checks for qbits can include the mobs.

They will be two different mobs, of course, with two different vnums, if that makes a diff. Can an if check for a qbit be targeted this way?

Otherwise, I suppose I can just add a bit to the quest and double the PCs steps. :)

EDIT: I think I see a way it COULD work... IF the target for a questbit check can be a done on the mob itself [ie, if quest(1,2,$i) == x], then I can have the mobs set qbits on each other, rather than themselves [mpmset quest QQ33 1 2 1]. Will that work?
"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
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 » Sun Jun 19, 2005 7:45 am

Actually, you don't need to set the bits on both mobs; you can have one mob control the two of them. One is enough. For example:

Code: Select all

>rand_prog 30~
if quest(0,2,self) == 1
  sayto m1001 Greetings.
  sayto m1001 What do you want to drink today?
  mpforce m1001 ponder
  mpmset self quest 0 2 2
else
  if quest(0,2,self) == 2
    mpforce m1001 sayto m1000 Just a glass of milk.
    blink m1001
    sayto m1001 Milk ? What's your problem today?
    sayto m1001 Bad case of stomach ache?
    mpforce m1001 shake
    mpforce m1001 sayto m1000 Let me tell you the whole story.
    mpmset self quest 0 2 3
  else
    if quest(0,2,self) == 3
      ...
    endif
  endif
endif
Note: you can add if mobinroom(1001) > 0 checks to make sure that there is at least one m1001 in the room if you want to be sure.
Image
User avatar
Kregor
Sword Grand Master
Sword Grand Master
Posts: 1474
Joined: Sun Jul 11, 2004 6:14 am
Location: Baldur's Gate

Post by Kregor » Sun Jun 19, 2005 3:41 pm

And the higher the rand, the shorter the delay, right?

Any thoughts on a good starting value for a normal conversation lag with one PC bystander? I am pretty much figuring I will have to tweak it once I start testing the area, but a good starting point.
"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
User avatar
Kregor
Sword Grand Master
Sword Grand Master
Posts: 1474
Joined: Sun Jul 11, 2004 6:14 am
Location: Baldur's Gate

Post by Kregor » Sun Jun 19, 2005 4:59 pm

In this case, yes, they are loaded in a room greet_prog, and then once their dialog is done, they mpgoto room 3 to purge out.

Now that I recall, it is kind of like the two gravediggers that sometimes show up in the City of the Dead making some random conversation. In this case, the conversation gives crucial information to continuing the quest.

So now I think I got it... I'll finish putting into code.
"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
Post Reply