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-10-2008, 05:52 PM
xxarthurxx
Hill Giant
 
Join Date: Jun 2006
Location: San Jo, Cali
Posts: 180
Default Zone port quest issues

currently I am using a turn in quest to port a player into a zone and returning the item to them. My server is classic so losing items is in... my problem is that when a player dies inside hes unable to get back in cause he doesnt have the port item.

My question is, is there a way to have an item stay on the player permanently regardless of death ect.

or is there a way to have an npc via a quest check a zone they are not in for a player corpse and if it is there allow the player to port in

trying to figure a way to make this work basically im trying to keep the player out of phases he has already completed. anyone know a way i can accomplish this an easier way?
Reply With Quote
  #2  
Old 06-10-2008, 06:02 PM
xxarthurxx
Hill Giant
 
Join Date: Jun 2006
Location: San Jo, Cali
Posts: 180
Default

thinking more on this... is there a way to give a player a character flag that allows him into said zones... and then when they complete all zones and do a turn in it removes that flag and gives them another flag to different zones? if so, wondering how this is done
Reply With Quote
  #3  
Old 06-10-2008, 06:33 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

The best and easiest way to do this is via quest globals. First, you will need to set the NPC porter to have the qglobal setting by changing it in the NPC_Types table from 0 to 1 in the qglobal column. You can also use GeorgeS latest NPC Loot Editor tool to make this change. You will need to restart the zone for the changes to take effect.

Once that is set, all you need to do is put the qglobals in your quest. They work by adding a "flag" to the qglobal table for that character. There are a few options to setting these, but it is actually pretty simple once you get the hang of it.

Basically, you would want to do this:


Code:
sub EVENT_ITEM {
  if (plugin::check_handin(\%itemcount, 1212=>1)) {
    quest::say("Oh the heat! I am feeling better already!");
$client->Message(6, "Rizon Char stores the scroll away within his armor." );
    quest::exp(9999999);
    $client->Message(15, "You have received a flag to access Solusek Ro's Tower!");
    quest::setglobal("solroaccess", 1, 5, "F");
  }
  
else {
 	    plugin::return_items(\%itemcount);
 	    quest::say ("I have no use for this item, $name.");
	}
	
    {
    $solroaccess=undef;
    }
    	
}
Then, you can do the same thing as they progress by changing just the item turn in and the flag received and only need to adjust the 1 number in bold here:

Code:
quest::setglobal("solroaccess", 2, 5, "F");
This will overwrite the previous entry by setting the flag to 2. If you look at your qglobals table, you can figure out how this works pretty easily once you start using it. Basically, you can make up any name you want and it will put that name in the qglobals table. The next number is the value of the qglobal and is the most important part to change if you want to up flags. After that the number (which I have set to 5) is an option to tell the server who will recognize this global. Using 5 is the most common, because that sets it so all NPCs in all zones can see this flag for this one character. You can also set it so just the one NPC recognizes it, or many other options by changing that number. More info on that can be found in the quest wiki page. The last setting there (set to "F") describes how long the global lasts for. Setting it to F makes it last forever. You can also specify M, H, D, Y for minute, hour, day, or year and then set a number like this; "M10" would make it last for 10 minutes and then remove the flag. Most of the time, you would want to just set that to F.

To check for the flag for porting, you would want to use something similar to the following:

Code:
sub EVENT_SAY
{
if ($text =~/Hail/i && $solroaccess == undef) {
quest::say ("The Proving Grounds are a place to test your skill limits.  If you are interested, I can tell you [more] about it."); }

if ($text =~/Hail/i && $solroaccess == 1) {
quest::say ("You have access to the [first] boss.  I will send you and your group there whenever you like.");
$solroaccess=undef; }

if ($text =~/First/i && $solroaccess >= 1) {
quest::say ("For the first few, you will likely find little difficulty, but beware of the tougher ones!");
$client->Message(6, "Kez Sollar stomps on the ground and the tremors rumble you to the core sending your body out of phase and to another place.");
quest::movegrp(304, 0,0,0);
quest::movepc(304, 0,0,0);
$solroaccess=undef; } 

if ($text =~/Hail/i && $solroaccess == 2) {
quest::say ("You have access to the [first] and [second] bosses.  I will send you and your group there whenever you like.");
$solroaccess=undef; }

if ($text =~/second/i && $solroaccess >= 2) {
quest::say ("For the first few, you will likely find little difficulty, but beware of the tougher ones!");
$client->Message(6, "Kez Sollar stomps on the ground and the tremors rumble you to the core sending your body out of phase and to another place.");
quest::movegrp(305, 0,0,0);
quest::movepc(305, 0,0,0);
$solroaccess=undef; } 

if ($text =~/Hail/i && $solroaccess == 3) {
quest::say ("You have access to the [first], [second] and [third] bosses.  I will send you and your group there whenever you like.");
$solroaccess=undef; }

}
That should give you a pretty good idea on how to use qglobals. These are all just examples from a quest I have on my server. I edited the quest slightly for posting here (some from solrotower and some from MPG), but they should have all of the important information you need to understand qglobals. You don't need to use the movegrp option. I just added that to move the player and the group at the same time so only 1 person needs the flag in the group to get in.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:35 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