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

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

Reply
 
Thread Tools Display Modes
  #16  
Old 06-09-2006, 09:47 AM
aza77
Hill Giant
 
Join Date: Dec 2004
Posts: 126
Default

if ($zavious == 0)
{
$zavious = undef;
if ($text=~/Hail/i)
{
quest::say("Hello $name. I have been expecting you. Ambassador Dumont told
me you would be arriving shortly. Do you have the four books that the
Ambassador told you to retrieve from Crushbone? If so, hand them to me.
#summonitem 51510");
quest::setglobal("zavious",1,0,"M2");
$zavious = undef;
}
}

i don't know why u have $zavious == 0 in there ... the way u write it is a little bit confusing.
__________________
- http://www.eqemu-paradigma.de -
Reply With Quote
  #17  
Old 06-09-2006, 04:37 PM
Adrianne
Fire Beetle
 
Join Date: Oct 2004
Posts: 20
Default

wouldnt that be correct? I only want it to say:

Hello $name. I have been expecting you. Ambassador Dumont told
me you would be arriving shortly. Do you have the four books that the
Ambassador told you to retrieve from Crushbone? If so, hand them to me.
#summonitem 51510

one time, so when its 0 it doesnt have a variable there, but after you say it it doesnt say that anymore because it changes the variable to 1 so that it will now say:

Have you retrieved the four books that the Ambassador requested
from Crushbone?


Is this not the proper way to do this?

I kinda want this quest to progress step by step, and basically each player have to turn in the four books before they can turn in the battleplans to get the final reward, and get the item to give to the next npc to continue the main quest of our server.

Last edited by Adrianne; 06-10-2006 at 12:39 AM..
Reply With Quote
  #18  
Old 06-21-2006, 01:23 AM
Adrianne
Fire Beetle
 
Join Date: Oct 2004
Posts: 20
Default

Any clue? Im still totally boggled with this, and this is the main thing holding me back atm. Any help would be appreciated.
Reply With Quote
  #19  
Old 06-21-2006, 05:06 AM
Cripp's Avatar
Cripp
Discordant
 
Join Date: Oct 2003
Location: The Shire
Posts: 474
Default

can you repost what you have currently and ill take a look. too lazy to read all the other posts
__________________
Nug Blazers - ServerOP / founder
^^comming... later!

www.nugblazers.com
Reply With Quote
  #20  
Old 06-21-2006, 10:11 AM
Belfedia
Demi-God
 
Join Date: Jan 2005
Posts: 1,109
Default

Quote:
Originally Posted by Cripp
can you repost what you have currently and ill take a look. too lazy to read all the other posts
O...M...G... lol
__________________
__________________________________________________ _____________________________________
I speak english like a spanish cow..., I speak spanish like a english pudding...
But I try to speak good french !!! (Non au langage SMS sur forum)
http://eqfroggy.new.fr : Froggy French Server Website.
Reply With Quote
  #21  
Old 06-22-2006, 08:05 AM
Adrianne
Fire Beetle
 
Join Date: Oct 2004
Posts: 20
Default

Code:
      sub EVENT_SAY
  {
  if ($text=~/hail/i && $zavious == 1)
  {
    $zavious = undef;
    quest::say("Have you retrieved the four books that the Ambassador requested
    from Crushbone?");
  }
  if ($text=~/hail/i && $zavious == 2)
  {
    $zavious = undef;
    quest::say("Are you [willing] to perform another task for the council?");
  }
  if ($text=~/hail/i && $zavious == 3)
  {
    $zavious = undef;
    quest::say("Have you discovered what else the orcs are doing in Crushbone?");
  }
  if ($text=~/hail/i && $zavious == 4)
  {
    $zavious = undef;
    quest::say("Good luck on your journey $name. May the Five light your path.");
  }
  if ($text=~/willing/i && $zavious == 2)
  {
     $zavious = undef;
    quest::say("Good, then you shall set off immediately to Crushbone. Some of
    the adventurers that returned reported seeing a log cabin holding someone of
    importance. We wish you to seek this person out and discover what else the
    Orcs are doing. #summonitem 69977");
    quest::setglobal("zavious",3,0,"M2");
    $zavious = undef;
  }
  if ($zavious == 0)
  {
  $zavious = undef;
  if ($text=~/Hail/i)
  {
    quest::say("Hello $name. I have been expecting you. Ambassador Dumont told
    me you would be arriving shortly. Do you have the four books that the
    Ambassador told you to retrieve from Crushbone? If so, hand them to me.
    #summonitem 51510");
    quest::setglobal("zavious",1,0,"M2");
    $zavious = undef;
  }
  }
}


  sub EVENT_ITEM
  {
  if (plugin::check_handin(\%itemcount, 51510 => 4) && $zavious == 1)
  {
   $zavious = undef;
   quest::say("Ahhh you have returned with the books. You say the humanoids call
   themselves Orcs?  Hmmm.. Interesting.. The council will study these books to
   decipher what is written within them. Ambassador Dumont thanks you as do I,
   brave $race. If your still [willing] they have another task for you.");
   quest::setglobal("zavious",2,0,"M2");
   $zavious = undef;
  }
  elsif (plugin::check_handin(\%itemcount, 69977 => 1) && $zavious == 3)
  {
    $zavious = undef;
   quest::say("What is this $name? It appears to be some kind of battleplan. Is
   that Felwithe?! This truly is an amazing discovery my friend. Take this to
   Councillor Elandilira. I think she may like to hear of this discovery. It is
   a quick translation of the battleplans.");
   quest::summonitem(1004);
   quest::setglobal("zavious",4,0,"M2");
   $zavious = undef;
  }
  else
  {
   (plugin::return_items(\%itemcount));
   quest::say("This isn't what I'm looking for.");
  }
}
}
Code:
if ($zavious == 0)
  {
  $zavious = undef;
  if ($text=~/Hail/i)
  {
    quest::say("Hello $name. I have been expecting you. Ambassador Dumont told
    me you would be arriving shortly. Do you have the four books that the
    Ambassador told you to retrieve from Crushbone? If so, hand them to me.
    #summonitem 51510");
    quest::setglobal("zavious",1,0,"M2");
    $zavious = undef;
basically $zavious doesnt exist before this. #summonitem 51510 is just temperary so the tester knows what items to summon to test it. The "if ($zavious == 0)" is the first variable. Then global sets this to 1, so now, it no longer gives this message when you hail. it gives:
Code:
{
  if ($text=~/hail/i && $zavious == 1)
  {
    $zavious = undef;
    quest::say("Have you retrieved the four books that the Ambassador requested
    from Crushbone?");
Up to this point, the script works correctly as far as I know, now.. Heres the part that seems broken. I try to update the variable $zavious in the database to 2.. and it doesnt want to update.. Ive tried everything known to me:P heres the part:

Code:
{
  if (plugin::check_handin(\%itemcount, 51510 => 4) && $zavious == 1)
  {
   $zavious = undef;
   quest::say("Ahhh you have returned with the books. You say the humanoids call
   themselves Orcs?  Hmmm.. Interesting.. The council will study these books to
   decipher what is written within them. Ambassador Dumont thanks you as do I,
   brave $race. If your still [willing] they have another task for you.");
   quest::setglobal("zavious",2,0,"M2");
   $zavious = undef;
after the turn in of the 4 items with the item number of 51510, and $zavious == 1.. which it does, it works, because variable is 1. you now have the option to say [willing] since $zavious == 2.
Code:
if ($text=~/hail/i && $zavious == 2)
  {
    $zavious = undef;
    quest::say("Are you [willing] to perform another task for the council?");
  }
well your supposed to... but for the life of me, zavious, in mysql.. I use navicat to check, will not update... it will go from 0 to 1, where 0 is when the variable doesnt exist.. so basically it will create a 1 in the variable for zavious. quest::setglobal("zavious",2,0,"M2"); doesnt seem to update at all, and $zavious = undef; doesnt work. The variable just is stuck at 1...

If theres a better way of doing this, please tell me. I just need my quest to progress so that people cant do it over and over again, or even repeat previous steps, to prevent wasted time by the player. I would appreciate any examples, or ideas with some kinda examples or fix. Thanks alot guys. I know you guys work hard, but if I can just figure this out, Id be willing to post my finished scripts, because this will help alot of newer people, Im positive:P
Reply With Quote
  #22  
Old 06-25-2006, 08:41 PM
Adrianne
Fire Beetle
 
Join Date: Oct 2004
Posts: 20
Default

sigh.. dont kno what to do.. think Im gonna rewrite everything.
Reply With Quote
  #23  
Old 06-25-2006, 11:21 PM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

2 little suggestions.

Add parenthesis to your tests :

Code:
if (plugin::check_handin(\%itemcount, 51510 => 4) && ($zavious == 1))

Second one. This structure :
Code:
if (plugin::check_handin(\%itemcount, 51510 => 4) && $zavious == 1) {

} elsif (plugin::check_handin(\%itemcount, 69977 => 1) && $zavious == 3) {

} else {
  plugin::return_items(\%itemcount);
}
Will lead to some issues with item turn in and items returned.
The tests with check_handin remove items from the list of handed items if it succeded. In that case, lets say for your first test, if the player gives 4x51510 but $zavious is not set to 1, the test will fail and he WONT get his items back (because check_handin succeded).

2 possibilities :
Code:
if (($zavious==1) && plugin::check_handin(\%itemcount, 51510 => 4)) {
or

Code:
if ($zavious==1) {
  if (plugin::check_handin(\%itemcount, 51510 => 4)) {

  }
} elsif ($zavious==3) {
  if (plugin::check_handin(\%itemcount, 59977=>1)) {

  }
}
plugin::return_items(\%itemcount);
If the tests $zavious==2 stil don't work, you could try with ($zavious eq "2")...
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote
  #24  
Old 08-12-2006, 03:19 PM
Aramid
Discordant
 
Join Date: May 2006
Posts: 356
Default

Quote:
Originally Posted by Adrianne
sigh.. dont kno what to do.. think Im gonna rewrite everything.
Was wondering if you ever got this working?

I picked up a Gambling Script that used Quest::setglobal and it wouldn't reset them either. I ended up having to delete the global variable and reset them each time along with using ($variable=undef);

Even if you set the Global Variable to last only 3 seconds, I could never change it without deleting it.

It's probably ugly by script writers standards, but it works...

I'm learning, but what a pain it is when your in the dark. Having to stop the server and restart it in order to change the quest (you DO have to do this, right) takes so much time. Oh well, once I get it under my belt, It won't take so long.
Reply With Quote
  #25  
Old 08-13-2006, 08:02 AM
ylosh
Sarnak
 
Join Date: Jan 2006
Posts: 39
Default

don't need to restart the server, #reloadpl in the zone after you've made changes to the .pl file.
Reply With Quote
  #26  
Old 08-13-2006, 08:22 AM
Aramid
Discordant
 
Join Date: May 2006
Posts: 356
Default

Thanks ylosh.. I'm printing out the # commands now so I don't make this mistake again.. What a time saver this would have been... lol
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 05:43 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