|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Archive::Database/World Building Archive area for General Discussion's posts that were moved here after an inactivity period of 90 days. |
02-08-2004, 10:05 AM
|
Fire Beetle
|
|
Join Date: Jan 2004
Posts: 10
|
|
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
|
02-08-2004, 05:16 PM
|
Demi-God
|
|
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
|
|
Short anwser: no, not that I am aware of.
Perhaps with some fancy scripting of quests in perl some workaround might be possible...
__________________
Please read the forum rules and look at reacent messages before posting.
|
02-08-2004, 10:42 PM
|
|
Demi-God
|
|
Join Date: Aug 2003
Posts: 1,056
|
|
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?
__________________
Quote:
Analysis paralysis will keep you from failing, but it will also keep you from succeeding.
|
|
02-09-2004, 04:56 AM
|
Hill Giant
|
|
Join Date: Oct 2002
Posts: 212
|
|
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 =)
__________________
Sandy
|
02-09-2004, 05:30 AM
|
Discordant
|
|
Join Date: Jan 2004
Location: 47
Posts: 339
|
|
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 ?
|
02-09-2004, 06:12 AM
|
|
Demi-God
|
|
Join Date: Aug 2003
Posts: 1,056
|
|
Quote:
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()
|
Again, probably not glowing at 100 watts, but at only 75, but since there is already code for the ids of the mobs in kith, why couldnt you just add the mobs in question to that routine? As opposed to haveing to add anything new and tell that sub WHICH mobs id's will be triggered? Let's just say he doesnt want the WHOLE zone to depop, for instance... Wouldnt that make taht routine actually harder? (not totally sure that is why Im asking).
__________________
Quote:
Analysis paralysis will keep you from failing, but it will also keep you from succeeding.
|
|
02-09-2004, 06:34 AM
|
Discordant
|
|
Join Date: Jan 2004
Location: 47
Posts: 339
|
|
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 ).
|
02-09-2004, 06:52 AM
|
|
Demi-God
|
|
Join Date: Aug 2003
Posts: 1,056
|
|
So, then would EVENT_SPAWN() overwrite the respawn_timer routine? Or is that the routine that calls that table in the database?
__________________
Quote:
Analysis paralysis will keep you from failing, but it will also keep you from succeeding.
|
|
02-09-2004, 11:18 AM
|
Discordant
|
|
Join Date: Jan 2004
Location: 47
Posts: 339
|
|
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.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 12:25 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|