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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-20-2003, 10:20 AM
used_pawn
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default Added code for faction hits in quests

Guess Im on a roll today

usage : faction(x)
where x is the 'id' value from the database table 'npc_faction'
thus, it acts like a faction hit, I thought this would be a handy way to do this (only have to remember one value to use multiple times) and still fully customizeable

../zone/parser.cpp :line 941 or thereabouts REPLACE this:

Code:
			//else if (strstr(strlwr(arglist[0]),"faction")) {
			//    if (mob && mob->IsClient()) {
			//	int32 faction_id = atoi(   )
			//	cout<<"Faction("<<faction_id<<","<<faction_value<<")"<<endl;
			//	//mob->CastToClient()->SetFactionLevel2(mob->GetID(), ), mob->GetClass(), mob->GetRace(), mob->GetDeity(), atoi(arglist[2]));
			//    }
			//}
with this:

Code:
			else if (strstr(strlwr(arglist[0]),"faction")) {
				mob->CastToClient()->SetFactionLevel(mob->CastToClient()->CharacterID(),atoi(arglist[1]), mob->CastToClient()->GetClass(), mob->CastToClient()->GetRace(), mob->CastToClient()->GetDeity());
			}
hope Im making someone happy
Now, time to update some content!!
Reply With Quote
  #2  
Old 06-20-2003, 11:46 AM
Bigpull
Discordant
 
Join Date: Feb 2003
Posts: 305
Default

Hey i recognise that!! Totaly my fault left over from the " , wind32/linux wars =)

Should read thusly
Code:
			else if (strstr(strlwr(arglist[0]),"faction")) {
			    if (mob && mob->IsClient()) {
				sint32 faction_id = atoi(arglist[1]);
				sint32 faction_value = atoi(arglist[2]);
				mob->CastToClient()->SetFactionLevel2(mob->GetID(), faction_id, mob->GetClass(), mob->GetRace(), mob->GetDeity(), faction_value);
			    }
			}
Btw if you use SetFactionLevel() instead of SetFactionLevel2() it's not quite the same thing, The first one handles all faction hits for a given npc, the later adds the specified value to the given faction id.
Reply With Quote
  #3  
Old 06-20-2003, 01:32 PM
used_pawn
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default

aye, that is true... perhaps both should be used. Its much easier to define a faction 'hit' in the npc_faction database and be able to reuse that 'hit' with one number, rather than a whole set of commands... for me anyway

perhaps change my version to command 'factionhit' ??
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 02:44 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