EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   pvp based on faction (https://www.eqemulator.org/forums/showthread.php?t=28563)

caylah023 06-13-2009 09:16 PM

pvp based on faction
 
i remember a while back that soe had a teams based pvp server and that seemed close to the idea im using for mine the only difference is that on mine its three different factions. your faction standing can only be set to positive for one at a time but heres the problem. not sure how to allow pvp based on a players faction.....for example

player a=faction a

player b=faction b

player c=faction a


player a should not be able to attack player c but should be able to attack player be while player b can attack both players a and c.

planning to use three core factions for players and to control player relations with certain zones and so on. but since ive not seen any rules for this im wondering how hard it would be to do. also need to be able to set a players initial faction based upon the choice of starting zone. any help here would be greatly appreciated. thank you in advance for your time viewing this.

caylah023 06-16-2009 05:34 PM

well im sure hoping theres no replies cus i bored the hell outa yall :p

if anyone knows how to do this please dont be shy.

VallonTallonZek 06-16-2009 06:42 PM

There is a function in the source (I think its called canAttack or isAttackable...something like that) that returns true or false depending on if the attacking mob can attack the defending mob. Somewhere in the middle of it there is a special check for client (and client pet) on client (or client pet) conditions. You would probably want to modify that block so that its checking vs. some factions instead of what it currently does. You could then expose a function to perl that you could call which would max the faction you want them to be, while simulataniously bottoming out the others. You would probably want to create a #command that would call the same function that Perl would use, so that you could change peoples factions in game for whatever reason.

Is this what you were looking for or did I completely miss the mark?

Randymarsh9 06-17-2009 03:32 AM

Maybe you could just do guilds and make them all at war

caylah023 06-18-2009 05:35 AM

good idea. sadly a bit beyond my skills for now
gonna start reading my books :)
thank you for the reply i knew there would be a way to do it.

cybernine186 09-09-2009 05:07 PM

If you look in the zone folder the file named aggro.cpp is where you need to make this happen. The function is called IsAttackAllowed and this is where you need to set your rules at.

It shouldn't be that hard just take a look at the function and study the source for a bit. By studying the source you should be able to copy/cut and add your way into what you want.


All times are GMT -4. The time now is 07:56 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.