Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 03-02-2009, 09:33 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default PVP flag

I'm racking my brain trying to figure out a way to do this. Here's the scenario: On my server, when a player possesses a certain item, he is automatically flagged pvp so that other players can track him down and kill him to get the item. The goal is to take the item to your "king" to get a kingdom blessing before someone finds you and takes it. The problem is, although the player.pl script flags the bearer of the item as pvp, I can't think of a way to make those around him pvp as well. I don't think a proximity function would work here (would it?). Any suggestions would be appreciated.
Reply With Quote
  #2  
Old 03-02-2009, 10:42 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I can't think of a way to do exactly that, but you could always make an NPC that they can speak with to toggle their PVP flag. If you really needed to, I am sure you could make a clicky item that summons an NPC (pet) that could be set to have a quest to toggle PVP flags in the default.pl or something.

Other than that, you could probably try running a client check and do some distance checks and other checks that could be used to set a PVP flag. Though, this type of script could be quite a hog and a pain to get setup in the first place. To check for clients in a zone, you can check out the custom Thanksgiving event I submitted into the custom quests section. I am sure you could probably do what you are wanting with that, but be warned, it would be rough on your server and probably hard to get working flawlessly.

At some point, I would like to add a new quest sub EVENT type for doing a client check in an entire zone. Then, it would allow you to run any checks against all clients in the zone at any given time. It would be triggered from other sub EVENTs similar to a timer. It would probably be quite a while before I could have time to implement this, but I do think it would be extremely useful. On Storm Haven, we already use my client check script for multiple events. It would just be nice to have a simpler and cleaner way of doing it so it didn't have to check all entities and just the clients in the zone. That would be alot easier on the server and alot easier to manage and write events for.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 03-03-2009 at 06:47 AM..
Reply With Quote
  #3  
Old 03-02-2009, 11:15 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

The goal to get the newly found item to the king as quickly as possible would likely work against the requirement to speak with an NPC. The item-bearer's name being in red is really the only tip-off to a passerby that he has the ring. By the time the passerby has made it to the pvp npc, the item-bearer will have already turned in the item to his king.

I like the idea of the new client check sub EVENT. That could have lots of applications. I guess I'll have to wait till that comes out to implement this feature.

On a similar note, if I knew anything about developing and adding a new sub EVENT, I'd volunteer to add one that launches an mp3 upon entering a zone. I have played with the open file command (open FILE, "filename.txt" or die $!; ), but have not been successful in getting it to work.
Reply With Quote
  #4  
Old 03-02-2009, 11:22 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

If you are trying to do a sort of capture the flag idea, I there has been a decent conversation posted somewhere on how to implement something like that. But, basically, you would want all of your players to be flagged as PVP before the game begins. Then, instead of relying on a red name as the tip off, you could set the person with the flag to be a special race like werewolf or something and then people know who to go after. To make sure people don't just change their race with an illusion clicky, you could do a race check before letting them do their turn in at the king.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 03-29-2011, 12:07 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default Make one zone pvp?

I can't find a better place to post this, and I can't find an answer.

Is there a way to make just one zone a pvp zone?

I thought there was something in the rule_values that set this, but I can't find it. I have concluded that I got the entry in the variables table confused with a rule_values entry (but the variables table entry changes the entire server). Anyone know?
Reply With Quote
  #6  
Old 03-29-2011, 02:38 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 541
Default

sub EVENT_ENTERZONE
{
quest::pvp(on);
}
Reply With Quote
  #7  
Old 03-30-2011, 05:27 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

Quote:
Originally Posted by Caryatis View Post
sub EVENT_ENTERZONE
{
quest::pvp(on);
}
Thanks Caryatis. The answer is so simple I feel kinda sheepish (I was searching in the wrong place).

How do you turn it off when they leave the zone? Or die fighting someone in the zone? I don't want players spawning at their bind point with their PvP flag activated.

Does the following code work when you die too? Or evac out of a zone?
Code:
sub EVENT_ZONE
{
quest::pvp(off);
}
Reply With Quote
  #8  
Old 03-30-2011, 06:13 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

Event zone fires when you enter a zone. I would hazard to guess that you could set player.pl in the templates folder to turn off pvp and then just turn it on in your specific zones player.pl files
Reply With Quote
  #9  
Old 03-30-2011, 08:08 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 541
Default

EVENT_ZONE is for leaving a zone however it can be unreliable, so you can just put an EVENT_ENTERZONE in the player.pl in templates folder, with an if statement(like if($client->GetPVP()) {quest::pvp(off)}), that way people aren't spammed with "You no longer follow the ways of discord" every time they zone.
Reply With Quote
  #10  
Old 03-31-2011, 01:17 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default

Why not avoid perl altogether and do it on Client::CompleteConnect? Force PVP off if not in a specific zone.

You can use SetPVP in there and that'd work just fine. No perl needed and it's more flexible besides recompiling. There's always the rule system if you need it too.
Reply With Quote
  #11  
Old 03-31-2011, 12:09 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

I tried what I had submitted above (with EVENT_ENTERZONE and EVENT_ZONE) and it worked, so that's cool.

Quote:
Originally Posted by Caryatis View Post
EVENT_ZONE is for leaving a zone however it can be unreliable, so you can just put an EVENT_ENTERZONE in the player.pl in templates folder, with an if statement(like if($client->GetPVP()) {quest::pvp(off)}), that way people aren't spammed with "You no longer follow the ways of discord" every time they zone.
This is a really good idea, especially if EVENT_ZONE is unreliable. Thanks.

Quote:
Originally Posted by Secrets View Post
Why not avoid perl altogether and do it on Client::CompleteConnect? Force PVP off if not in a specific zone.

You can use SetPVP in there and that'd work just fine. No perl needed and it's more flexible besides recompiling. There's always the rule system if you need it too.
Secrets, I am not trying to be a smart aleck or anything, but this is way over my head. But I appreciate it though because now I know I need to go study some more to find out what you are talking about. I am sure I'll learn some things that will help me solve some of the other ideas I want to implement too. (I hope that didn't come of sounding sarcastic, I am being sincere--always a challenge when e-communicating.)
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 03: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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3