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 05-11-2010, 05:41 AM
Darkheat
Fire Beetle
 
Join Date: Apr 2010
Posts: 23
Default pvp quest help

I wrote this pvp quest script loosely based off the priest of discord This is how it works:

You start with the "shackles of light" in your inventory and you hail the npc and and go through some conversation. Once you turn in your shackles he takes it sets you to PVP and then gives you a stone of darkness. when you don't want to be a PVP anymore you turn in the dark stone and he taunts you and gives you back the shackles and makes you non PVP anymore. This is where my problem lies, the code works wonderfully he will give items and respond. The problem is that he will turn you to PVP status but when you turn in the stone and get the shackles back, he does the script but you are still PVP enabled. He should turn your PVP status back to normal once you turn in the stone but for some reason he wont do it. Is this not the right command to turn pvp off again? quest::pvp("off"); I have posted the whole code below for reference.

Code:
##################
##say link Variables######

my $shackles = quest::saylink("shackles", 0, "shackles");
my $Darkside = quest::saylink("Darkside", 0, "Darkside");
my $artifact = quest::varlink(1118);

##################

sub EVENT_SAY {
if($text=~/Hail/i){
quest::emote("turns his icy stare on you and his thoughts invade your mind!");
plugin::Whisper("Greetings $name. I can tell by the $shackles in your inventory that you are bound by the light.");}
if($text=~/shackles/i){
plugin::Whisper("Being bound to the light is like being enslaved in shackles. Yes you are protected but you are not free to live dangerously and experience everything that goes bump in the night! but alas, I can sense that you might want to join the $Darkside");}
 if($text=~/Darkside/i)
 {
 quest::emote("Nods his head");
plugin::Whisper("Yes, If you wish to join the dark side and be free, just hand me those shackles in your inventory and I will free you from your bondage");
 
}
}
sub EVENT_ITEM
{
if  ($itemcount{1096} == 1)
  {
quest::emote("Takes the shackles from your inventory and uses his power to drain all the light from them leaving you with a.... $artifact in your hands");  
plugin::Whisper("I welcome you to the Darkside $name! Remember, there are strange things that go bump in the night and now that you walk in Darkness, you no longer have the light watching over you. Becareful, other people also walk in the dark and they aren't afraid to mug you and steal all your money. Yes, they can steal your money but NOT your items that you wear so beware!");
  quest::pvp("On");
  quest::summonitem(1118);
plugin::Whisper("Keep this stone of Darkness in your bank $name because if you ever become AFRAID of the dark and wish to see the light again just hand the stone back to me and I will once again enslave you in the bodage of light.");
}
if  ($itemcount{1118} == 1)
{
quest::emote("Takes the $artifact from your hands and once again uses his mighty force to break open the stone and reforms the shackles of light and slips them over your wrists");  
plugin::Whisper("Hah, I knew you couldn't handle it $name, You make me sick! Leave my sight at once and don't come back unless you want to join the darkside again");
quest::emote("Points to the exit");
quest::say("Begone $name follower of light, come back when you grow a pair and want to try the darkside again!");
quest::summonitem(1096);
quest::pvp("off");
  }
}

Thanks in advance for any help you can offer
Reply With Quote
  #2  
Old 05-11-2010, 06:22 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

This looks to me to be a bug in the source code in QuestManager:pvp

The code is indented like this
Code:
        if (!strcasecmp(mode,"on"))
                if (initiator)
                        initiator->SetPVP(true);
        else
                if (initiator)
                        initiator->SetPVP(false);
But I believe it is being inteprereted like this
Code:
        if (!strcasecmp(mode,"on"))
        {
                if (initiator)
                        initiator->SetPVP(true);
                else
                        if (initiator)
                              initiator->SetPVP(false);
        }
In the meantime, rather than using quest::pvp, you could use $client->SetPVP(toggle), so $client->SetPVP(1) to turn it on and $client->SetPVP(0) to turn the flag off.
Reply With Quote
  #3  
Old 05-11-2010, 06:31 AM
Darkheat
Fire Beetle
 
Join Date: Apr 2010
Posts: 23
Default

Thanks for the quick reply it was driving me nuts
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 10:50 AM.


 

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