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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04-22-2004, 04:59 AM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

In case you wanted some more things to play with, here is something being tested on our server and destined for cvs when testing is complete...

modification to the signal() command to signal all npcs of the same id

in parser.cpp Parser::ExCommands change this

Code:
			else if (!strcmp(strlwr(command),"signal")) 
			{	// signal(npcid) - generates EVENT_SIGNAL on specified npc
				int snpc=atoi(arglist[0]);
				if (snpc<1)
				{
					printf("signal() bad npcid=%i\n",snpc);
				}
				else
				{
					Mob* signalnpc;
					signalnpc=entity_list.GetMobByNpcTypeID(snpc);
					if (signalnpc==0)
					{
						printf("signal() npcid not found=%i\n",snpc);
					}
					else
					{
						signalnpc->signaled=true;
					}
				}
			}
to this:

Code:
			else if (!strcmp(strlwr(command),"signal")) 
			{	// signal(npcid) - generates EVENT_SIGNAL on specified npc
				int snpc=atoi(arglist[0]);
				if (snpc<1)
				{
					printf("signal() bad npcid=%i\n",snpc);
				}
				else
				{
					Mob* signalnpc=0;

					entity_list.SignalMobsByNPCID(snpc);

				}
			}
in entity.cpp after EntityList::ClearFeignAggro add this

Code:
void EntityList::SignalMobsByNPCID(int32 snpc)
{
	LinkedListIterator<Mob*> iterator(mob_list);

	iterator.Reset();
	while(iterator.MoreElements())
	{
		if (iterator.GetData()->GetNPCTypeID() == snpc)
		{
			iterator.GetData()->signaled=true;
		}
		iterator.Advance();
	}
}
and in entity.h before this

Code:
	void	CountNPC(int32* NPCCount, int32* NPCLootCount, int32* gmspawntype_count);
	void	DoZoneDump(ZSDump_Spawn2* spawn2dump, ZSDump_NPC* npcdump, ZSDump_NPC_Loot* npclootdump, NPCType* gmspawntype_dump);
	void    RemoveEntity(int16 id);
	void	SendPetitionToAdmins(Petition* pet);
	void	SendPetitionToAdmins();
add this

Code:
	void	SignalMobsByNPCID(int32 snpc);
__________________
Maybe I should try making one of these servers...
Reply With Quote
 

Thread Tools
Display Modes

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 07:36 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3