Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Bugs

Archive::Bugs Archive area for Bugs's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-02-2004, 07:52 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default Force Repop ?

Anybody have a command to force a zone to repop?

#repop
Only repops mobs who have their timer up. But if a named was killed it wont repop until its normal timer is up.

I would like a *full* repop to occur on reboot of server, and a seperate command to *fully* repop a zone.

Also, i'm quite unsatified with the #spawn command.

Does anybody have any more advanced spawn commands?
As it is right now #spawn'ed creatures have run and walkspeed of 0 and thus are perma rooted.

I would like to either A) specify run and walk in the command. or B) have it hardcoded to give them some runspeed and walkspeed.

Honestly a full revamp of the #spawn command would be great, to include AC hp regen mana regen. pretty much most of the npcedit commands.

I use #spawn for gm events, but i don't want to save these creations in the database since they are just for that one event, so #npcedit is out of the question.

Also i have an idea for a command that would make gm events much more interesting. It could tie into this spawn command. make an argument "direct_id" or something. You set this value to an identifying integer.

Imagine an invisible gm. spawning an army or small group of mobs. Then the gm walks around the zone in front of these mobs and has a macro for his command #directnpcs 1 1, the npcs then walk to his current location.

There could be some more arguements to this.

Example: Team 1 of orces has direct_id 1, team of dervs has direct_id of 2

So to summon both teams to walk to you. #directnpcs 1 1, then #directnpcs 2 1

The second arguement would be 1=walk 2=run

#directnpcs [direct_id] [1=walk 2=run 3=attack]

The 3 would send the specified team to attack the gms current target. (or a third arguement could be a player or npcs name)

Some system like this would be awesome for making detailed gm events!

Thanks )
Reply With Quote
  #2  
Old 08-02-2004, 08:26 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default Re: Force Repop ?

Quote:
Originally Posted by sotonin
I would like a *full* repop to occur on reboot of server,
Adding this to the batch file you run to boot your server (before starting world or zones):

Code:
echo  update spawn2 set timeleft=0 | mysql -u root <your db name>
should force all mobs to repop I think.
Reply With Quote
  #3  
Old 08-02-2004, 08:35 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

hmm but is there a way to tie that to the #repop command though?
Reply With Quote
  #4  
Old 08-02-2004, 10:34 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

change command.cpp, line 287 ish:
Code:
		command_add("repop","[force] [delay] - Repop the zone with optional force (reset spawn timers) and delay",100,command_repop) ||
replace the body of command_repop() (line 3526ish) with:

Code:
//Hacked by Father Nitwit to support a 'force' argument, which resets respawn times
	int timearg = 1;
	if (sep->arg[1] && strcasecmp(sep->arg[1], "force") == 0) {
		timearg++;
		
		char errbuf[MYSQL_ERRMSG_SIZE];
		char *query = 0;
		if (database.RunQuery(query, MakeAnyLenString(&query, "UPDATE spawn2 SET timeleft=0 WHERE zone='%s'",zone->GetShortName()), errbuf))
			safe_delete_array(query);
		
		c->Message(0, "Zone depop: Force resetting spawn timers.");
	}
	if (sep->IsNumber(timearg)) {
		c->Message(0, "Zone depoped. Repop in %i seconds", atoi(sep->arg[timearg]));
		zone->Repop(atoi(sep->arg[timearg])*1000);
	}
	else {
		c->Message(0, "Zone depoped. Repoping now.");
		zone->Repop();
	}

This is untested, but it compiles, and makes perfect sense to me
assuming that that is in fact the correct table to update.
let me know if it helps, or dosent work...
Reply With Quote
  #5  
Old 08-02-2004, 11:49 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

I incorporated this code. it compiled. ill let you know after i reboot )
Reply With Quote
  #6  
Old 08-02-2004, 02:04 PM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

Eeek!

i type in game

#repop 1 1

it says repoping zone in 1 sec.

then my client completely locks up and i have to ctrl alt delete to close it.

after a few more tests. it doesnt crash if i only do this.

#repop 1

and i tested a little more. #repop 10 results in the message repopping zone in 10 seconds.

so i am guessing its only reading the first argument still as the timer and crashing if i specify a second
Reply With Quote
  #7  
Old 08-02-2004, 03:05 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

You could also implement a command to reset the timeleft field to 0 and use that prior to using #repop.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #8  
Old 08-02-2004, 04:01 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

Sorry, I guess my doc wasnt clear.

the actual command would be:
repop force
or
repop force n
to delay it n seconds

Im not sure why it would have crash your client if you give it wrong args like that though, as it wouldent even run my new code unless you put the word "force" in there..
Reply With Quote
  #9  
Old 08-09-2004, 05:33 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

Anybody out there know if my idea for a #directnpcs command would be feasible? (As explained in original post)
Reply With Quote
  #10  
Old 08-09-2004, 05:47 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

Did you get my code working?
I have tested it on my server with up-to-live client, and it works fine for me, so i would like to know if you are still experiencing problems.

I havent touched the spawn system, so im not going to be any use on your other stuff.
Reply With Quote
  #11  
Old 08-09-2004, 05:50 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

i havent tried it again yet. i probably will after we upgrade to next cvs )
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:05 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3