One NPC spawning another
Hello,
I'm attempting to make a quest where once the PC talks to an NPC, another NPC spawns outside the room and then walks in and the two NPCs have a chat. Is this done with the quest:settimer option or is there another way to do this that I'm missing. |
You could include it as part of the sub EVENT_SAY
Code:
if($text=~/What other NPC?/i) |
After I posted this, it occurred to me that you may have meant how to do the chat part. This would likely be done by quest::signal() or quest::signalwith() and then a sub EVENT_SIGNAL, not by a timer.
|
And if you want him to "walk" in, you could create waypoints. The NPC could spawn (not on the grid) somewhere outside the room, upon spawn, do a start(grid#) and set timer, once he reaches a certain x,y spot, have him stop() and stop the timer, and signal the NPC to talk with. Make sure the grid is a full pause and have him pause longer than the timer at the last waypoint which is inside the room.
|
This script doesn't spawn an npc. Spawning is mentioned above though. And do remember you need to take into account players hailing quest npc when the npc is moving back and forth, so adding a $busy variable or something could be helpful too. Here is a basic script with a captain and a guard. Player hails captain and asks for help back to the camp. Captain calls guard. Guard walks into room and then takes player back.
Captain.pl Code:
my $npcvariable = 0; Code:
my $npcwaypoint = 0; |
All times are GMT -4. The time now is 01:17 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.