Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Thread Tools Display Modes
Old 02-03-2018, 09:57 PM
Join Date: Sep 2010
Posts: 63
Default Mobs buffing PCs

Hello, I've been trying to make NPCs buff players.

When I change this line of code from NPC_LIST to CLIENT_LIST the npcs buff players, but no longer buff other NPCS, how would I change it so they would buff both players and NPCS.

//Only iterate through NPCs
	for (auto it = client_list.begin(); it != client_list.end(); ++it) {
		Mob* mob = it->second;
		if (mob->GetReverseFactionCon(caster) >= FACTION_KINDLY) {

		if (DistanceSquared(caster->GetPosition(), mob->GetPosition()) > iRange2) {

		if ((iSpellTypes & SpellType_Buff) && !RuleB(NPC, BuffFriends)) {
			if (mob != caster)
				iSpellTypes = SpellType_Heal;

		if (caster->AICastSpell(mob, 100, iSpellTypes))
			return true;
	return false;
Reply With Quote
Old 02-03-2018, 10:23 PM
Kingly_Krab's Avatar
Join Date: May 2013
Location: United States
Posts: 1,515

Use mob_list instead of npc_list or client_list. Not sure why you're wanting them to do this from the source though, you can just script this.
Reply With Quote
Old 02-03-2018, 10:26 PM
Join Date: Sep 2010
Posts: 63
Default Fixed

What would a script look like to do this?

Do you mean making a quest file for the npc?
Reply With Quote
Old 02-03-2018, 10:38 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
Join Date: Apr 2002
Location: Seattle, WA
Posts: 493


~Shin Noir
Rebuild EQ.com
Reply With Quote
Old 02-03-2018, 11:57 PM
Join Date: Sep 2010
Posts: 63

ahh I see!
the difference would be that I wanted any NPC globally to buff the player if they get high enough faction. So editing the source code works well
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 05:25 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 - 2019, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3