Quest-resurrection

For builders to discuss and ask building questions.
Post Reply
Amalia
Sword Grand Master
Sword Grand Master
Posts: 331
Joined: Wed Feb 01, 2006 6:51 pm
Location: Ardeep Forest
Contact:

Quest-resurrection

Post by Amalia » Tue Jun 26, 2007 12:12 am

Areet... here's the deal.

I'm trying to have a quest-giving NPC cast resurrection on the non-party-leader PC that experienced a certain event earlier in the quest. Is there any way to get the mob to mpaffect the PC with a certain quest bit with resurrection, when the PC is (obviously) not there? Could this maybe be done with a quick transfer of said mob to the realm of the dead to target the PC?
Dear Enemy: May the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment.
User avatar
Japcil
Sword Grand Master
Sword Grand Master
Posts: 1143
Joined: Fri Jun 17, 2005 5:32 pm
Location: Golden Oaks
Contact:

Post by Japcil » Tue Jun 26, 2007 1:47 am

have it mpgoto (whatever the realms of the dead vnum is... cnat remember off the top of my head) and check if the pc is in the room with the if qbit check and mpcast the ressurrection spell.
Image
User avatar
Japcil
Sword Grand Master
Sword Grand Master
Posts: 1143
Joined: Fri Jun 17, 2005 5:32 pm
Location: Golden Oaks
Contact:

Post by Japcil » Tue Jun 26, 2007 3:05 am

Should look something like this:

Code: Select all

if quest(0,1,$n) == 0(*Replace with your quest bits of course)
mpgoto 6
entry_prog 100~ (need to check if these work)
  if questr("Your Vnum",0,1,$n) == 0 (*Replace with your quest bits of course)
  mpcast resurrection $n
  mpregoto
  else
  mpregoto
  endif
endif
Image
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 » Tue Jun 26, 2007 11:46 am

I am not sure I see what you mean...

Resurrection can be cast from afar; that is, a mob can "cast resurrection amalia" anywhere, as long as Amalia is dead.

The tricky part is to get the name in the command I think.

A possible solution would be this: have a pc type the name of the dead character. For example:

(mob) say One of you died? What was his or her name?
(mob) mpecho OOC: to answer, make sure that the dead character is online
(mob) mpecho OOC: and type "givename <name of dead PC>"

Then have a program on the mob that would go like:

Code: Select all

>intercept_prog givenname~
if questbit ok (to make sure that they don't get infinite free ress)
  cast resurrection $1
endif
~
An intercept_prog "intercepts" a command of the form <keyword> <word1> <word2> ... <wordN>. Inside the intercept_prog, you can use
  • $0 to refer to <word1> <word2> ... <wordN>
  • $1 to refer to <word1>
  • $2 to refer to <word2>
  • ...
So, in the program above, if someone types "givename Amalia", the mob will run the command "cast resurrection Amalia".

Reacting to the effect of the spell is a bit more tricky though. I would suggest perhaps trying to use an act_prog (though I'm not sure if they work on spell echoes). If I remember correctly, the echo when someone has been resurrected is "<name> has been resurrected." An act_prog triggers when the mob "sees" a specific echo. In this case, it would be something like

Code: Select all

>act_prog has been resurrected~
(do something here, with $n being the character who has just been ress'ed)
Hope that helps.
Image
Post Reply