New Quest Command quest::clearspawntimers()
Discussion: http://eqemulator.net/forums/showthread.php?t=26295
This command should work similar to the "#repop force" command which will reset the spawn timers for the zone and repop everything including anything that was down due to having a timer left on it. I haven't tested this code yet, but I am going to test it tonight and verify it works. I basically just looked at the code for quest::repopzone() and for the command #repop and combined the 2, so I think it should work. I will report back later after I get the chance to test it. questmgr.cpp Code:
void QuestManager::clearspawntimers() { Code:
void clearspawntimers(); perlparser.cpp Code:
XS(XS__clearspawntimers); Code:
newXS(strcpy(buf, "clearspawntimers"), XS__clearspawntimers, file); |
Compiled so far without a problem. Now to test if after the reboot tonight on my server :P
|
Why post before testing?
|
So others may see it and review his work. I prefer to have someone one over my cod before it goes live onto a server. Other people may be able to see things you never even thought of.
|
Quote:
Normally I would just post new code ideas in the development section if I am not too sure that they will work. But in this case, just setting up a quest command by using code from a normal command should be pretty straight forward. I got the new traindiscs and new version of scribespells quest commands working that way easy enough. Plus, being a mod, I can always go back and edit my post at any time to make any corrections to the code if needed or even move the post to another section if it never gets finished :P I don't have a clue of how to write code from scratch, but I work pretty well from example :) |
Ok, I changed how this command works slightly after testing the code. I renamed the command to quest::clearspawntimers(), and now it is just used to clear the spawn timers. So, you have the option to do a quest::repopzone() after it, or just let it wait until the zone goes down and comes back up, or whatever.
The code I submitted above has been tested and is working fine on my server. If people think it would be better just to add in the actual repop to the command, I could do that instead, but I always like having open options :) |
This is a great command! There are plenty of times on PEQ when I'm fiddling with spawns, and when I am done and am about to go to do a /repop force I see people hunting in the zone. In order to not disturb them, I just set timeleft to 0 in the DB at a prompt and leave. This guy just made my life easier!
|
Well, this is a quest command, but I could certainly make a normal # command for it as well if you like. They are pretty simple with examples hehe.
|
It's no real difference to me. I have a custom NPC in PEQ's template folder that I spawn whenever I need to test something or the like.
|
All times are GMT -4. The time now is 09:08 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.