Full Version : NPC Teleporting during quest
xmlspawner >>Q&A >>NPC Teleporting during quest
<< Prev | Next >>
afonso- 09-27-2006
Here's my problem:
I'm scripting a rescue quest for my shard, but I have a problem. The cell where the prisioner is supposed to be is static, including doors.
So, to avoid unfreezing it, I was thinking that it might be possible to make the npc teleport out of the cell when the quest is accepted. All I need him is to move to a specified location.
Another way to go at it is to make 2 spawns. Upon accepting the quest, the one inside despawns, and the one outside spawns.
I just have a litte problem. I have no idea of how to make either of the solutions a reality..... Any help?
afonso
afonso- 09-27-2006
Ok I just learned of the OFFSET command (I saw a JPEG on the Indiana Jones topic) and I think I can get it to work now
Still I'd like to know what would the 2nd solution be solved....
Vladimir- 09-27-2006
In the action field of the NPC, at the point where player accepts the quest you could do something like SETONTHIS/x/4444/y/3333/z/44
Or for the spawner one: SET,spawnername,xmlspawner/doreset/true ; SET,secondspawnername,xmlspawner/running/true
afonso- 09-28-2006
Thanks for the tip! I'll try it right away!
afonso- 09-28-2006
Ok I got the quest working up to 95%
Now I have a problem with Z.....
Part of the quest envolves players searching for a key, wich I placed on a separate spawn. The problem is the spawn is on the 1st floor of the house (cell is underground), and everytime I pass under it it spawns. How do I get it to spawn only when I'm on the correct floor?
Vladimir- 09-28-2006
On the spawner just before the entry that you want to spawn, have this before the entry:
#CONDTITION,GETONTRIGMOB,z={z of the player when he is on the right floor} ; key <-- the normal entry goes after the ;
So if i wanted to make an Orc spawn only if the player is on the top floor I could do this
#CONDITION,GETONTRIGMOB,z=20 ; Orc
ArteGordon- 09-28-2006
you can also set the PlayerTrigProp on the spawner to something like
"z=20"
Using the #CONDITION keyword is more flexible because it lets you apply different spawn conditions to individual spawns on the same spawner. So for example if you wanted to spawn a key when triggered on the 1st floor, and an orc when triggered on the second floor.
afonso- 09-28-2006
*bows*
You guys are the greatest. Quest is working fine now