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
Prev Previous Post   Next Post Next
  #4  
Old 01-21-2018, 03:54 AM
caravellex
Sarnak
 
Join Date: Sep 2010
Posts: 63
Default

Quote:
Originally Posted by Lane View Post
I would put something like this in the NPC's .pl file.

For killer_Id, it would change based on your database. For me, my GM is 82,289 so anything 82,290 and higher is a regular player. I'm sure there's a better way to code this, but I'm a novice.

The GM Say will also broadcast the name of who's taken over the orcs. I think the code below is in red. Could easily change it to yellow or whatever.

For faction... it couldn’t be a part of the code below. I’m not sure how to do a quest::faction to $killer... if you add quest::faction to below it won’t work because below is triggered on death, so the killer wouldn’t get the faction hit. maybe have to edit the player.pl to somehow register killing = faction.

Code:
sub EVENT_DEATH_COMPLETE
{
$entity_list -->GetClientByID($killer_id) ;
	if($killer_id > 82,290) {
	quest::gmsay("$entity_list->GetClientByID($killer_id)->GetName() . " has taken over the orcs in the Commonlands! ", 335, 1, 0, 250);
        quest::spawn(npc_type_id, grid, guildwarset, x, y, z) # Spawn 'npc_type_id' on 'grid' with 'guildwarset' (use 0) at 'x', 'y', and 'z);
}
}
Another idea I had would to be to use the code above, edit the database to make all players KOS to the NPC faction, also change the DB value to give maximum faction on kill. Then you could add a sub EVENT_ENTER_ZONE to the player.pl that calls for quest::faction to go completely negative. This way when the player dies or zones and re-enters the zone, they would be KOS again.

This would require the player to kill the NPC to get a maximum faction hit and it would be the player who is allied to try and stop you from killing it.

The only downside I see to the above approach is what if players sit in the zone or hide after killing NPC, then all players kill NPC and are max faction? Shrug just some thoughts. Good luck and let me know if you figure out how to give faction on kill with quest::faction. I’m designing a custom PvP server as well and I just gave in and do a ground spawn on player kill for a turn in for faction.
Ohhhh yeah great point - not replacing the mobs at all but instead changing the faction for the team losing control of the npc would be the best way to do it.
Orrrr - if it was a race/diety pvp system. You make the quest change the database value for the faction entry -2000 for losing team classes and races, +2000 for winning team. That's way easier ty!
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 04:59 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