![]() |
|
#91
|
|||
|
There are plenty of people reading this that know how it works, but I don't. I think the spawn is determined from the moment the mob dies with a /random generated number, and is therefore set. This number or time is then accessible by a GM with a command, like /spawntimer #. I'm also sure extended windows screws some of this up and it is re-randomed at the end of the window. But, like I said, I don't know... these are guesses. Jeremy, Loly, etc would know (or a P99 coder if they can share).
| ||
|
Last edited by Raavak; 12-23-2013 at 03:00 PM..
|
|
||
|
#92
|
|||||
|
Quote:
Code:
int respawn_ticks(base, variance)
{
int window = random(0, variance);
if(variance-window < ONE_DAY && random(0, 100) > 75)
return respawn_ticks(base+window, ONE_DAY);
else
return base+window;
}
__________________
Raev | Loraen | Sakuragi <The A-Team> | Solo Artist Challenge | Farmer's Market
Quote:
| ||||
|
|
|||||
|
#93
|
|||||
|
Quote:
Historically the NPC ID has been a problem across zones for the functions I've tried to use. The Spawn2 info is what it is looking for, but then it fans out? Bear in mind, this could totally be an EBKAC error as well. Logically trying to derive Perl functions with no experience with the language was fun. Let me tinker and see if I can But this also wouldn't work for the Sleeper scripting, so I may not put a ton of effort in. As there is no indication that weekly repops are even being considered.
__________________
I have walked my way since the beginning of time. Sometimes I give, sometimes I take & it is mine to know which and when.
Quote:
| ||||
|
Last edited by Aeolwind; 12-23-2013 at 03:09 PM..
|
|
||||
|
#94
|
|||||
|
If you want I can get in IIRC and maybe help somewhat . . somehow
also: Quote:
__________________
Raev | Loraen | Sakuragi <The A-Team> | Solo Artist Challenge | Farmer's Market
Quote:
| ||||
|
Last edited by Splorf22; 12-23-2013 at 03:21 PM..
|
|
||||
|
#95
|
|||
|
the database will have the time the mob is supposed to spawn stored...the server doesnt perform checks every tick to see if spawns. Therefor all you need to do is create a command to update the database time of spawn. Which in this case appears to be easily done by calling SetTimer(newTime);
| ||
|
|
|||
|
#96
|
||||
|
Quote:
__________________
Doraf - 60 Cleric
| |||
|
|
||||
|
#97
|
|||||
|
Quote:
And SetTime sets the server time iirc which has no effect on spawntimes. Like, none of the times in game, server or spawn times are interconnected in the least. Oh and to answer an earlier question, spawn time info is not really viewable. And there isn't a GM command to see spawn times.
__________________
I have walked my way since the beginning of time. Sometimes I give, sometimes I take & it is mine to know which and when.
Quote:
| ||||
|
|
|||||
|
#98
|
||||
|
The way I read that function is that it is not so simple:
Each zone will have a timer for each mob (presumably a 4 byte integer that is checked every tick). Updating those timers is complicated by the fact that they may be in different processes running on different computers. Also, mobs that matter will be in the database so that their repop timers will persist through reboots and zone crashes and such. Fortunately, that code appears to do exactly what is necessary: first it updates the SQL database, then it modifies any local zone timers, and then it sends update messages over the network to tell the other zone servers to update the spawn timers if necessary. Granted, I could be wrong about all this - it's never easy to jump into a decently sized piece of code and figure out what's going on.
__________________
Raev | Loraen | Sakuragi <The A-Team> | Solo Artist Challenge | Farmer's Market
Quote:
| |||
|
|
||||
|
#99
|
|||
|
Well thanks for ruining this self congratulatory post with your brogramming chatter.
Anyways thanks to the server staff for the unexpected bit of fun yesterday. It was great to see all the different guilds knocking down targets. | ||
|
|
|||
|
#100
|
|||
|
Thanks for repop and the brogramming talk look like Chinese to me
| ||
|
|
|||
![]() |
|
|