can i make a npc to say the time at every hour with xmpspawner?
yes.
Just add these entries to the spawner and set their subgroup to 1
banker
SETONSPAWN,1/SAY/The time is {GETONTHIS,tod}
then set the min/maxdelay to 5 mins (which is 1 hour gametime)
and set the TODMode property to GameTime
It will report the time every hour starting at the time that you respawn the spawner.
SETONSPAWN,1/SAY/Saat {GETONTHIS,tod}
can i use my own sentence in here right?
sure, have it say whatever you want. This
{GETONTHIS,tod}
just substitutes the value of the TOD property on the spawner into that spot in the SAY string. You can put it anywhere.
ok i make it but i gived the wrong hour it said Time is 01:47:00
and its not a hour now i want it to say the time in hours
like
Time is 12:00
Time is:13:00
Time is:14:00
Time is:21:00
do you understand?
as I said. It will start reporting every hour starting at the time that you start it.
Just respawn it exactly on the hour if you want it to report exactly on the hour.
i respawned it at the 19:00
and it says in game
time is 05:01:00
i realy didnt understand.
and it says every 5 minitues i think not every one hors :/
and now it said 06:47:00
i think its not working the way that i want.
it says in every 5 minutes and add one hour to do hour
:/
i think i didnt tell what i want clearly
think about its 15:00 in real time
the npc will say Time is 15:00
than one hour later it will say Time is 16:00
its like that.
if you want it to report every hour in Real time instead of Game time, just change the TODMode property on the spawner to RealTime, and change the Min/MaxDelay to 1 hour.
Also, if you just want it to just report the hour and not the minutes, you can use something like
SETONSPAWN,1/SAY/The time is {GETONTHIS,tod.hours}:00
where
{GETONTHIS,tod.hours}
will return the hour, like 5 instead of 05:00:00
and then you can add the :00 string at the end, or whatever format you would like.
here is a slightly more sophisticated version that actually checks the minutes before reporting, so that it will always report exactly on the hour, regardless of when you start it up.
QUOTE |
<Spawns> <Points> <Name>HourlyReport</Name> <UniqueId>4cad1349-2b25-4036-b9b6-f1425d67ca82</UniqueId> <Map>Felucca</Map> <X>5445</X> <Y>1157</Y> <Width>0</Width> <Height>0</Height> <CentreX>5445</CentreX> <CentreY>1157</CentreY> <CentreZ>0</CentreZ> <Range>0</Range> <MaxCount>4</MaxCount> <MinDelay>1</MinDelay> <MaxDelay>1</MaxDelay> <DelayInSec>False</DelayInSec> <Duration>0</Duration> <DespawnTime>0</DespawnTime> <ProximityRange>-1</ProximityRange> <ProximityTriggerSound>500</ProximityTriggerSound> <TriggerProbability>1</TriggerProbability> <InContainer>False</InContainer> <MinRefractory>0</MinRefractory> <MaxRefractory>0</MaxRefractory> <TODStart>0</TODStart> <TODEnd>0</TODEnd> <TODMode>0</TODMode> <KillReset>1</KillReset> <ExternalTriggering>False</ExternalTriggering> <SequentialSpawning>1</SequentialSpawning> <AllowGhostTriggering>False</AllowGhostTriggering> <SpawnOnTrigger>False</SpawnOnTrigger> <SmartSpawning>False</SmartSpawning> <Team>0</Team> <Amount>1</Amount> <IsGroup>False</IsGroup> <IsRunning>True</IsRunning> <IsHomeRangeRelative>True</IsHomeRangeRelative> <Objects2>banker:MX=1:SB=1:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=IF/tod.minutes=0/33:MX=1:SB=1:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=GOTO/1:MX=1:SB=1:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1:OBJ=SETONSPAWN,1/SAY/The time is {GETONTHIS,tod.hours}:00:MX=1:SB=33:RT=0:TO=0:KL=0:RK=0:CA=0:DN=-1:DX=-1:SP=1:PR=-1</Objects2> </Points> </Spawns>
|