I am setting up a shard tour using the xmlquestnpcs. So far it looks like I can do all I need with the spawners and questnpcs (thank your Arte Gordon!), but I have run into a snag.
I would like the first npc to send the player to a certain location after they agree to the tour. This works fine, and the second npc is spawning using the triggeroncarried spawner option with an object I give the player.
What does not happen is the next gump from the npc, unless the player moves. I want this to be so that no action is required of the player after he agrees to the tour, other than reading the next gump and clicking OK when they are finished.
Is there a way to get the gump presented to the player as soon as they arrive at the location?
the xmldialogs are triggered either by speech or movement. They dont passively detect nearby players.
Spawners can be configured to do this though. So you could set up a spawner nearby and have it proximity triggered. It will passively check for players on each ontick, so setting min/maxdelay to some value will determine the polling interval.
Then when that spawner is triggered, you could have it spawn an entry like
SETONTRIGMOB/SPEECH/Tell me more
and that would cause the triggering player to speak the words "Tell me more" which could be used to trigger the questnpc dialog.
The SPEECH keyword causes the target mobile to generate actual speech, not just overhead text.
Thanks Arte! That's exactly what I was looking for.
Another question though. Where would I put that SETONTRIGMOB - in the spawner props? Which property? Or in the npc dialog?
that would be the actual spawn entry.
You would just have a proximity triggered spawner with that entry.
Like this.
QUOTE |
<Spawns> <Points> <Name>TellMeMore</Name> <UniqueId>4c0146ca-2dc0-45cb-8346-707a5c08b242</UniqueId> <Map>Felucca</Map> <X>5426</X> <Y>1151</Y> <Width>10</Width> <Height>10</Height> <CentreX>5431</CentreX> <CentreY>1156</CentreY> <CentreZ>0</CentreZ> <Range>5</Range> <MaxCount>1</MaxCount> <MinDelay>0</MinDelay> <MaxDelay>0</MaxDelay> <DelayInSec>False</DelayInSec> <Duration>0</Duration> <DespawnTime>0</DespawnTime> <ProximityRange>3</ProximityRange> <ProximityTriggerSound>500</ProximityTriggerSound> <TriggerProbability>1</TriggerProbability> <InContainer>False</InContainer> <MinRefractory>2</MinRefractory> <MaxRefractory>2</MaxRefractory> <TODStart>0</TODStart> <TODEnd>0</TODEnd> <TODMode>0</TODMode> <KillReset>1</KillReset> <ExternalTriggering>False</ExternalTriggering> <SequentialSpawning>-1</SequentialSpawning> <AllowGhostTriggering>False</AllowGhostTriggering> <AllowNPCTriggering>False</AllowNPCTriggering> <SpawnOnTrigger>True</SpawnOnTrigger> <SmartSpawning>False</SmartSpawning> <Team>0</Team> <Amount>1</Amount> <IsGroup>False</IsGroup> <IsRunning>True</IsRunning> <IsHomeRangeRelative>True</IsHomeRangeRelative> <Objects2>SETONTRIGMOB/SPEECH/Tell me more:MX=1:SB=0:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:PR=-1</Objects2> </Points> </Spawns>
|
Note that I gave this spawner a refractory period of 2 minutes, so if the person just sits there, then it will trigger the speech every 2 minutes.
If you wanted to get fancier, you could have the spawner add a temporary attachment to the player when it generated the speech to tag that player as having triggered the spawner, and then have the spawner NoTriggerOnCarried set to detect that attachment.
That way you wouldnt have to set the refractory interval on the spawner, and the spawner would only trigger once for that player.
You could also set the attachment to automatically expire after some time which would effectively give you a player-specific refractory period.