Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 01-22-2006, 02:20 AM
sdabbs65
Dragon
 
Join Date: Dec 2003
Location: Earth
Posts: 818
Default Adding a command

it clearly tells you you need to add 3 things in the source file...

Code:
 To add a new command 3 things must be done: 


1. At the bottom of command.h you must add a prototype for it.

2. Add the function in this file.

3. In the command_init function you must add a call to command_add

for your function. If you want an alias for your command, add

a second call to command_add with the descriptin and access args

set to NULL and 0 respectively since they aren't used when adding

an alias. The function pointers being equal is makes it an alias.

The access level you set with command_add is only a default if

the command isn't listed in the addon.ini file.
__________________
hosting Eqemu/Runuo/wow Emulators.

www.cheaterz.info
Reply With Quote
  #2  
Old 01-22-2006, 03:11 AM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

Many thanks for your submission Arex.

If I get a chance today, I'll try to compile it with my VS.NET 2003 copy. It depends on whether my sickness has passed to the point that I can think clearly
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote
  #3  
Old 01-23-2006, 09:17 PM
Arex
Hill Giant
 
Join Date: Jul 2004
Posts: 196
Default

i ll be checking for changelog, i wait that this new command can to be added soon, i am sure that many server admins will find it useful =)
Reply With Quote
  #4  
Old 01-24-2006, 12:35 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

this command will not be added to the official code. You can add it as your own extension if you like. writting it in perl would be easier to maintain.
Reply With Quote
  #5  
Old 01-25-2006, 02:04 AM
Arex
Hill Giant
 
Join Date: Jul 2004
Posts: 196
Angry

Quote:
this command will not be added to the official code.
Thank You, i ll care not add more code... =/
Reply With Quote
  #6  
Old 01-25-2006, 01:32 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

no server specific code is allowed in the official code base, your code is specific to your server and how you want to run your game world. Doodman and I have spent countless hours removing stuff like this from the code because it is too messy.
Reply With Quote
  #7  
Old 01-26-2006, 09:21 PM
Arex
Hill Giant
 
Join Date: Jul 2004
Posts: 196
Default

the other zone_player command that i posted have any error, then if anybody want use this command, i have this code that i think that should work...

Code:
void command_zone_player(Client *c, const Seperator *sep)
{
 	uint16 zoneid = 0;

	if (sep->IsNumber(1))
	{
		zoneid = atoi(sep->arg[1]);
	} 
	else if (sep->arg[1][0] == 0)
	{
		c->Message(0, "Usage: #zone [zonename]");
		return;
	} 
	else 
	{
		zoneid = database.GetZoneID(sep->arg[1]);
		if(zoneid == 0) 
		{
			c->Message(0, "Unable to locate zone '%s'", sep->arg[1]);
			return;
		}
	}

	if((atoi(sep->arg[1])==22) || (atoi(sep->arg[1])==35) || (atoi(sep->arg[1])==12) || (atoi(sep->arg[1])==54)
	 || (atoi(sep->arg[1])==38) || (atoi(sep->arg[1])==94) || (atoi(sep->arg[1])==86) || (atoi(sep->arg[1])==116)
	 || (atoi(sep->arg[1])==120) || (atoi(sep->arg[1])==152) || (atoi(sep->arg[1])==175) || (atoi(sep->arg[1])==167))
	{
		//zone to safe coords
		c->GoToSafeCoords(zoneid);
		return;
	}
	else 
	{
		c->Message(0, "You only can zone to basic locations: East commonlands,South Ro, West Karana, Gfaydark, Toxxulia Forest, Emerald Jungle, Dreadlands, Eastern Wastes, Western Wastes, Nexus, Scarlet Desert, Grimling Forest");
		return;
	}
}
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 08:15 PM.


 

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