Depop Time
Is there any way to set up a depop time?
i need to create mobs, but these mobs only spawn at night and disappear in the morning. Thanks |
Short anwser: no, not that I am aware of.
Perhaps with some fancy scripting of quests in perl some workaround might be possible... |
I might be talking out of my arse here (for lack of knowledge), but can you not look in the database for the kithicor mobs and see how they are set up to react? Dont they depop during the day?
|
we need a script language and events to do this
=) we could implement for example something like the script language for neverwinter nights monsters had a onspawnevent() script you put there a timer count and when the timer ends you call depop() it could be very usefull =) |
brief :
a. when the mob spawns, it calls EVENT_SPAWN() sub. b. in this sub, start a timer with quest::starttimer() c. in the EVENT_TIMER, called when the time is reached, call quest::depop() It should work, wont it ? |
Quote:
|
There is a quest file per mob, so just need to define a trigger for the mobs that you want depop.
Still, that makes several files, but you can symbolic link them to one using proper varaibles. This behaviour could also be shared using the default file (used when no mob-specific file is found), where you would alter the EVEN_SPAWN() to setup a timer only for some npc ids, but this make a complex routine (even using global vars), as was pointed out There is a problem, though : you can control depop time (you need to retriieve current time if possible), but not spawn time AFAIK (i.e. if the mob gets killed in the middle of the night, which happens sometimes :) ). |
So, then would EVENT_SPAWN() overwrite the respawn_timer routine? Or is that the routine that calls that table in the database?
|
First, let me state that i did not experiment any of these things, it's just the way i understand it works.
Mobs are spawned when their respawn timer ends up. When killed or depops, they are marked for respawn after respawn_time (as defined in the database). the EVENT_SPAWN is a script routine that is called when a mob is spawned, as a side effect. It may or may not have any consequence, it doesn't change the above rule. When using a script as described above, you simply force depop time at a given time (or after a given time). When you quest::depop() in the script, it just tells the server to depop. I think this starts the respawn_timer countdown. Well, if anyone has experience about this matter, or time to trace the code, it would be 10000 times more valuable than the few above forecasts. It might just be that way. |
All times are GMT -4. The time now is 08:25 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.