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 08-30-2004, 06:19 PM
Branks
Sarnak
 
Join Date: May 2004
Posts: 58
Default enabling pvp within zones.

so ive got my little server up and decided to enable pvp in a few zones just to give people more options of things to do. the problem is everything works perfectly except for combat abilities such as kick, slam and archery and others like that. AA skills work just fine as well as spells but i simply cannot find any way to make combat skills work, they simply do nothing at all when the button is pushed. ive tried various things from completely commenting out all of the pvp checks and other methods of making sure pvp is enabled and it seems as though the client doesnt even send a pakcet unless the the other players name is red, however i know this to be incorrect since useing /duel doesnt make your name red and these skills work in zones like the arena.

so my questions is to the other servers who have enabled pvp within zones how exactly did you do it or what am i missing? yes ive searched and yes ive read through most/all of the guildwars code but im apparently still missing something. also what does pvp2 in the player profile do exactly? i havent noticed it effecting anything at all. thanks in advance
Reply With Quote
  #2  
Old 08-31-2004, 02:39 AM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Zoning into the arena makes your name red doesn't it? Used to on eqemu at least.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #3  
Old 08-31-2004, 03:15 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Quote:
Originally Posted by killspree
Zoning into the arena makes your name red doesn't it? Used to on eqemu at least.
Not on live. Your name is only red when you go to a Priest of Discord.

-edit-
OR if you are on an all-PvP server.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #4  
Old 08-31-2004, 04:41 AM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Yeah I meant on the emu.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #5  
Old 09-04-2004, 04:44 PM
Branks
Sarnak
 
Join Date: May 2004
Posts: 58
Default

yeah seems names have to be red =( if i find a way to do this without the red names ill post but currently heres the code for it

zone\client_process.cpp do a search for
"else if ((app->opcode == OP_ClientUpdate)" and alter the exsisting to this.

Code:
			else if ((app->opcode == OP_ClientUpdate) || (app->opcode == OP_ClientReady)) {
				CompleteConnect();
				//Dook- PVP zones
				if((zone->GetZoneID()==22)||(zone->GetZoneID()==106)
					||(zone->GetZoneID()==151))
				{
					m_pp.pvp = 1;
					m_pp.pvp2 = 1;
					SendAppearancePacket(AT_PVP, GetPVP());
					Message(0, "This zone is PVP enabled! you have been warned!");
				}
				else
				{
					m_pp.pvp = 0;
					m_pp.pvp2 = 0;
					SendAppearancePacket(AT_PVP, GetPVP());
				}
				//end pvp zones code
			}
			else if (app->opcode == OP_SpawnAppearance) {
of course changing or adding the zones you want in place of mine.
Reply With Quote
  #6  
Old 09-05-2004, 06:58 PM
monalin crusader
Hill Giant
 
Join Date: May 2004
Posts: 238
Default

Ok now if u dont want red titles do this, Forget about branks code (no offence i just dont use it since mine is a complete different way of doing it)

goto mob.cpp
search for // if they're dueling they can go at it

*EDIT** This is the one around line 2129 there are 2 places in this code where its got it make sure to get the right one or it will not work.

go a couple lines down and after

Code:
				else if	// if they're dueling they can go at it
				(
					c1->IsDueling() &amp;&amp;
					c2->IsDueling() &amp;&amp;
					c1->GetDuelTarget() == c2->GetID() &amp;&amp;
					c2->GetDuelTarget() == c1->GetID()
				)
					return true;
insert in this

Code:
		// Monalin: PvP in certian zones only replace zone ID's with zones you want
				else if ((zone->GetZoneID() == 21) || (zone->GetZoneID() == 6))
				{
					int c1_level = c1->GetLevel(); // Level of client 1
					int c2_level = c2->GetLevel(); // Level of client 2

					// If they are within 4 levels of each other fight.
					if(((c1_level + 4) >= c2_level) &amp;&amp; ((c2_level + 4) >= c1_level))
						return true;
					else 
						return false;
				}
Insert in whatever zoneid's ou like u can have as many as you like also, if u want to change the level ranges u can attack in.

Alternate code
if u would like to use it instead it hasent been tested but its a little easier to change the level range u can attack in i dont care what you use.

Code:
					// Monalin: PvP in certian zones only replace zone ID's with zones you want
				else if ((zone->GetZoneID() == 21) || (zone->GetZoneID() == 6))
				{
					int c1_level = c1->GetLevel(); // Level of client 1
					int c2_level = c2->GetLevel(); // Level of client 2
					unsigned int level_diff;

					level_diff = c1_level - c2_level;

					// If they are within 4 levels of each other fight.
					if(level_diff > 4)
						return true;
					else 
						return false;
				}
__________________
Ascending Dawn Server Op
Coder/Quester/Mysql
Reply With Quote
  #7  
Old 09-06-2004, 02:45 AM
Branks
Sarnak
 
Join Date: May 2004
Posts: 58
Default

you mean mob.cpp, and yes i had tried this also, i found several dozen ways to enable pvp, my problem is that the client seems to block attack requests from innate skills if the targets name is not a certain color. my code has proven to have issues also as every 15th of so person to zone in somehow skips the code and is not pvp enabled for whatever reason, or at random people will not see other people in the zone to have a red name and thus they are prevented from useing archery and other innate attacks.

i put my code where i did due to previous attempts of attaching to to zone change requests which yielded no results as the name change color packet or whatever is sent to the client to make it change colors was recieved during zoneing so pvp was enabled however the name change is not. im still trying to work out a better way of doing this but currently have none. but im 99% sure the client has some "IsAttackAllowed" function of its own to check the color of the targets name, so there are more options than red as we know from pvp servers on live however im still working out a way to reliably send the color change request and prevent random clients from being skipped or not seeing it, then ill work on determining the name colors which are allowed to attack for the client unless the devs maybe have a list somewhere already, or if i find it in the guildwars code.
Reply With Quote
  #8  
Old 09-06-2004, 03:22 AM
monalin crusader
Hill Giant
 
Join Date: May 2004
Posts: 238
Default

Most of the guildwar source is built into the cvs isnt it?
__________________
Ascending Dawn Server Op
Coder/Quester/Mysql
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:28 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3