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 06-08-2006, 10:04 PM
Adrianne
Fire Beetle
 
Join Date: Oct 2004
Posts: 20
Default

Yea... that sucks.. Ive tried every possibility I could with $zavious = undef;.. nothing would update... tried quest::setglobal ($zavious = undef); Ive tried undef zavious, undef $zavious, quest::delglobal ("zavious"); wiht no sucess.. It was originally at 0, I used a coommannd to make it to 1 and it was sat at 1, and wont update to two.. with the commands specified by the program. I didnt knotice the part about $variable = undef; but Id like to see some sorta example here. Once I learn this, since there is very vague descriptions in all of this.. and no examples or documentation... well documentation that id like.. so I can learn this stuff.. but Ive spent 8+ hrs a day on this with no luc.. it wont go from 1 to 2.. Id be more tan willing to post both of my examples in order to help future people that come along that dont understand the stull that I didnt... I think it would be very helpful. So far heres what Im tryin to do. Its my last real step before I finally figure out the jist of qglobal. anyway, heres what i got. id like for someone to point out what Im doin wrong here, and ILl post alot more that you guys have helped with as well that I think a lot of newer scripters like me that catch on fast. I feel like a noob for not readin those few lines about $variable = undef; however Im catchin on pretty fast. for only learning this for about 2-3 weeks, Ive come prett yfar.At any rate, Im working on a smaller one first. Its pretty filled up with qglobals:P But like I said, I have some complex scripts, that I will utilate qglobal in once I get it sorted, that Im willing to share with the community... once I figure this one darn command out properly... Ive searched websites.. even non emu ones.. and have come up with stuff that doesnt work.. Ive read every script in peq quest database.. with little success.. they dont use $variable = undef; they use quest::delglobal("Zavious"), however.. delglobal wont delete it! very strange to me..at any rate Id like to thank everyone helping me fix this I need it to go from 0 to 1 to 2 to 3 to 4 in one script... I know thats extensive, but i need to make this part to where a player can only do this quest once.. well any player only do this quest once.. IM gonna go ahead and post my code here in hopes of some soultion someone can give me, because I am at a lose here.. Ive spend 8ish hours tryin to figure this out.. it seems like most of the peq quests dont use this function.. I saw 2 that used globals.. are they for advanced scripters? or is it new? Problem is our old coder is mia.. he said he would play, but wasnt gonna touch coding etc etc... so I decided to learn. IM a quick learner when it comes to this.. I think Ive got everything down pat now when it comes to quest npc's. But when my servers done, your more than welcome to come in and test any that wants to. Ill let come in and look. But anyway, I really hope Im not buggin you guys, and actually consider me as a new programmer keeping eqemu alive. So let me know what you think here

Code:
sub EVENT_SAY
  {
  if ($text=~/hail/i && $zavious == 1)
  {
    quest::say("Have you retrieved the four books that the Ambassador requested
    from Crushbone?");
  }
  if ($text=~/hail/i && $zavious == 2)
  {
    quest::say("Are you [willing] to perform another task for the council?");
  }
  if ($text=~/hail/i && $zavious == 3)
  {
    quest::say("Have you discovered what else the orcs are doing in Crushbone?");
  }
  if ($text=~/hail/i && $zavious == 4)
  {
    quest::say("Good luck on your journey $name. May the Five light your path.");
  }
  if ($text=~/willing/i && $zavious == 2)
  {
    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");
  }
  if ($zavious == 0)
  {
  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");
  }
  }
}


  sub EVENT_ITEM
  {
  if (plugin::check_handin(\%itemcount, 51510 => 4) && $zavious == 1)
  {
   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");
  }
  elsif (plugin::check_handin(\%itemcount, 69977 => 1) && $zavious == 3)
  {
   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");
  }
  else
  {
   (plugin::return_items(\%itemcount));
   quest::say("This isn't what I'm looking for.");
  }
}
}
Once again, any help would be appreciated, I know Im probably bugging you guys at this point, but if theres anything I can do to help anyone, let me know and I will. Just being able to update the variable from 0 to 1 to 2 to 3 to 4 would be good, and I heard its through use of $variable = undef; if someone could help here.. Id worship them:P Thanks in advance.
Reply With Quote
  #2  
Old 06-09-2006, 12:11 AM
aza77
Hill Giant
 
Join Date: Dec 2004
Posts: 126
Post

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.");
  }
}
}
__________________
- http://www.eqemu-paradigma.de -
Reply With Quote
  #3  
Old 06-09-2006, 08:16 AM
Adrianne
Fire Beetle
 
Join Date: Oct 2004
Posts: 20
Default

now when var is at first 0 like it starts with, you can hail fine, you hail a second time it says

Have you retrieved the four books that the Ambassador requested
from Crushbone?
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

at the same time.. you turn in the 4 items and it says the normal message, but doesnt update the global_type from 1 to 2.. when you hail it says the same thing:

Have you retrieved the four books that the Ambassador requested
from Crushbone?
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

sigh..
Reply With Quote
  #4  
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
  #5  
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
  #6  
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
  #7  
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
  #8  
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
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 08:15 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3