Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-31-2004, 07:21 PM
Gonkers
Sarnak
 
Join Date: Mar 2004
Posts: 65
Default Problem removing pvp flags!

Code:
 if($1-=~"interested"){say("First i'll add you to the Pvp guild. Then 

i'll turn on your pvp flag. If at any point, you wish to return to 

non-pvp, you come back here and tell me that you [wish to return]. Now, 

lets get started... Do you [want to become pvp]?"); }
if($1-=~"want to become pvp") {say("I'll set your guild"); 

setguild(3,0);
}{say ("Now i'll set your pvp flag"); pvp(on); 
}
{say ("there you go, have fun!"); }
 if($1-=~"want to return") {say("so be it, first i'll remove you from 

the guild"); setguild(0,0); }
{say ("then i'll remove your precious pvp flag, you may need to zone 

once I do, it may say you follow the ways of discord, but just zone and 

you'll be fine"); pvp(off); }

}
everything works, but after he says "but just zone and you'll be fine" it does not show nothing about not becomming non pvp. Even when I zone, i'm still pvp. Please help .
Reply With Quote
  #2  
Old 04-01-2004, 09:57 AM
Monrezz's Avatar
Monrezz
Dragon
 
Join Date: Mar 2003
Location: #loc
Posts: 745
Default

pvp(off) is broken I think, at least it was a while ago and by the looks of this it still is :P

Ask a Dev.
__________________

kRPG Profile
Reply With Quote
  #3  
Old 04-01-2004, 10:41 AM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

You're closing and reopening braces in what should be the middle of what it executes, and this might be causing it to evaluate the if() part wrong. Below is your code with my comments to show how I predict the system is gonna execute the code (I've broken up the lines differently than what you submitted so you can see my comments more easily):


Quote:
if($1-=~"want to become pvp")
{ say("I'll set your guild");
setguild(3,0);
} # This closing bracket ends what it will execute for the player saying "want to become pvp". Why did you end it here? Shouldn't the other 3 statements below also be a part of this condition?
{ say ("Now i'll set your pvp flag");
pvp(on);
} # Again, why end it here? Shouldn't the next statement below also be a part of this condition?
{say ("there you go, have fun!");
}

elsif($1-=~"want to return")
# Since you ended the if() statement way back up there, and executed more statements
# after the if(){} block, Perl's probly wondering what this elsif goes to.
# THIS is probly the root of your problem.
{say("so be it, first i'll remove you from the guild");
setguild(0,0);
} # Shouldn't be closing the bracket here
{say ("then i'll remove your precious pvp flag, you may need to zone once I do, it may say you follow the ways of discord, but just zone and you'll be fine");
pvp(off);
} # This is the right spot to close the bracket

So here's what I propose your code look like:
Quote:
if($1-=~"want to become pvp")
{ say("I'll set your guild");
setguild(3,0); # Notice there's no closing brace here
say ("Now i'll set your pvp flag");
pvp(on);
say ("there you go, have fun!");
} # <--- The if() condition doesn't end till here.

elsif($1-=~"want to return") # NOW Perl should properly evaulate this elsif()
{say("so be it, first i'll remove you from the guild");
setguild(0,0); # No closing brace here.
say ("then i'll remove your precious pvp flag, you may need to zone once I do, it may say you follow the ways of discord, but just zone and you'll be fine");
pvp(off);
} # End the elsif() part
Reply With Quote
  #4  
Old 04-01-2004, 11:13 AM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

elseif works for sure? haven't played around with pearl questing much but I don't remember it working in the old system.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #5  
Old 04-01-2004, 03:16 PM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

Quote:
elseif works for sure?
Fer sure. As long as the perl interpreter is running with no errors, it should work fine.
Reply With Quote
  #6  
Old 04-01-2004, 07:28 PM
Gonkers
Sarnak
 
Join Date: Mar 2004
Posts: 65
Default

im not running the pearl quest.......I'm running a regular quest. the .qst extention..

Thank you for your input though, i'll mess with this in the morning, I'll apply your feedback and see the results I get and post them here in the morning!

Thank you also for running down a example, This will help me learn the quest system better. I am visual learner so over time i'll be good............hopefully hah.
Reply With Quote
  #7  
Old 04-02-2004, 03:51 AM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

Ah, I assumed you were using Perl. Not sure if that works with the .qst system but let me know how it goes.
Reply With Quote
  #8  
Old 04-02-2004, 06:54 AM
Gonkers
Sarnak
 
Join Date: Mar 2004
Posts: 65
Default

only thing that does not work is pvp(off), i confirmed that sadly,
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 09:20 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