EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::General Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=586)
-   -   Where to find PvP source code? (https://www.eqemulator.org/forums/showthread.php?t=41759)

caravellex 02-11-2018 06:58 PM

Where to find PvP source code?
 
Hello, I was looking if there was publicly available server packs for enabling PvP on a server. As of now, the only thing I found was the old vztz source code dump in 2009, of anyone had other resources I'd appreciate it!

Shin Noir 02-12-2018 01:27 PM

There hasn't been PVP source codes since VZTZ I believe? There's ways to enable PvP via rules and variables with latest settings.

caravellex 02-13-2018 02:05 PM

I've tried every ruleset listed in WorldPVPsettings with a full reboot each time and freshly made characters. the only one that does something is the tallon/vallon, which changes the color of the characters name, they can not attack each other though

image 02-13-2018 02:46 PM

eqemu base does not support pvp you would have to implement the 'pvp' flag solution on your own (short of priest of discord flipping everyone), look into Mob::IsAttackAllowed


if // if both are pvp they can fight
(
c1->GetPVP() &&
c2->GetPVP()
)
return true;

Use either perl or lua to $client->SetPVP(1); on entering the zone.

caravellex 02-13-2018 03:26 PM

Where am I supposed to look to edit the function of isattackallowed. In the PEQ server pack, I've checked almost every .cpp file in zone, they reference Mob::Isattackallowed, but I cant find the definition for it

image 02-14-2018 08:57 AM

I just pointed out where in the code would allow a client to attack another client, either they both need the PVP flag enabled or you need to be dueling each other. In the case of the PVP flag, as I said you need to make a perl / lua file, like the templates/player.pl and in the sub for EVENT_ENTERZONE you can just $client->SetPVP(1); to force their pvp flag on.

Each zone that has player.pl will have to be updated with this change so each zone someone starts in happens to flip the pvp flag.

caravellex 02-14-2018 10:30 AM

AHH I see!
do you think it's possible within that player.pl file to designate who you can an cannot attack? or is that a source code thing?

image 02-14-2018 08:03 PM

Quote:

Originally Posted by caravellex (Post 257606)
AHH I see!
do you think it's possible within that player.pl file to designate who you can an cannot attack? or is that a source code thing?

That would need to be source code. Level restrictions and things of that nature need to be defined in the code also, there are none. This would all be within the Mob::IsAttackAllowed I mentioned in aggro.cpp

Shin Noir 02-27-2018 12:16 PM

I reached out to caravellex, but if anyone else reads this:
I'm creating PRs that adds functionality similar to what image noted via rules, so source edits aren't required to enable pvp.

it'll be rough initially, but in due time I hope to create rules you can tweak to emulate any of the old zek types.

Didymus 02-28-2018 12:15 PM

Quote:

Originally Posted by Shin Noir (Post 257764)
I reached out to caravellex, but if anyone else reads this:
I'm creating PRs that adds functionality similar to what image noted via rules, so source edits aren't required to enable pvp.

it'll be rough initially, but in due time I hope to create rules you can tweak to emulate any of the old zek types.

This shit right here!!!!
Really looking forward to it Shin. :D

caravellex 03-03-2018 12:51 PM

Really appreciate your work!
Even with a limited understanding of code, it's very difficult to write the necessary fixes because instances of Mob::isattackallowed and Mob::isbeneficialallowed don't really exist much in in the current build - Thus it's hard to make changes for the unexperienced.
Looking forward to your work!

Lane 03-03-2018 04:55 PM

Thank you! Looking forward to it. I found tons of ways to enable PvP but getting level restrictions and drops to work properly was what I was having difficulty with. It always was FFA and if one loot would include no trade as well

Shin Noir 03-04-2018 12:40 AM

There's a pending PR here: https://github.com/EQEmu/Server/pull/720
I need to do more testing.

I'm starting with Sullon Zek rules (and allowing you to customize beyond generic PVPSettings).
If you guys want to help, find me sources for Rallos Zek rules
Tallon/Vallon zek rules
verify my Sullon Zek rules (based it on https://www.project1999.com/forums/a...p/t-39541.html)
And discord rules.

I have a todo list here: https://github.com/EQEmu/Server/issues/722

I'm making it where you can set PVPSettings to generically support the original servers, but if you cahnge some new rules I'm adding, you can more granularly tweak rules to make it more custom.. (Assuming the other devs OK the granular customization).

I'm documenting my progress on tweakable values here, roughly: https://github.com/EQEmu/Server/wiki/PvP

Didymus 03-04-2018 10:32 AM

Quote:

Originally Posted by Shin Noir (Post 257790)
There's a pending PR here: https://github.com/EQEmu/Server/pull/720
I need to do more testing.

I'm starting with Sullon Zek rules (and allowing you to customize beyond generic PVPSettings).
If you guys want to help, find me sources for Rallos Zek rules
Tallon/Vallon zek rules
verify my Sullon Zek rules (based it on https://www.project1999.com/forums/a...p/t-39541.html)
And discord rules.

I have a todo list here: https://github.com/EQEmu/Server/issues/722

I'm making it where you can set PVPSettings to generically support the original servers, but if you cahnge some new rules I'm adding, you can more granularly tweak rules to make it more custom.. (Assuming the other devs OK the granular customization).

I'm documenting my progress on tweakable values here, roughly: https://github.com/EQEmu/Server/wiki/PvP

Massive Claps

Shin Noir 03-04-2018 02:23 PM

Since I'm changing so much I created a new branch. This means it's going to be more difficult to use and test my stuff, but let me know if you're interested in helping out with this branch.

You can see a changelog here: https://github.com/EQEmu/Server/commits/pvp


All times are GMT -4. The time now is 08:45 AM.

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