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 12-17-2008, 07:41 PM
Joetuul
Sarnak
 
Join Date: Oct 2008
Location: AZ
Posts: 58
Default Quest Globals check... Am I doing it right???

What I am trying to do is have one mob set a quest global... then have 3 other mobs check for that global upon death. once all 3 die, the mob who created the global will despawn the untargetable, then respawn a targetable one..


here is the quest global creator...
Code:
#Emoush_the_Destroyer
sub EVENT_SPAWN
{
	quest::setglobal("emoush",1,0,"F");
	quest::shout("Who has AWAKENED ME!?!?!, You shall die for interupting my slumber!");
}

sub EVENT_SIGNAL
{
	if($emoush == 4)
        {
        quest::spawn2(1230,0,0,-136.6,1993,-3.9);
        quest::delglobal("emoush");
        quest::shout("depoped, respawned");
        quest::depop();
        }
}

sub EVENT_DEATH
{
	quest::delglobal("emoush");
        quest::shout("global deleted");
}
Here is the mobs that die and make the targetable one spawn.
Code:
sub EVENT_DEATH
{
	if (!defined($qglobals{emoush})){

                if ($qglobals{emoush} == 1)
                	{
                        quest::delglobal("emoush");
                        quest::shout("deleted");
                        quest::setglobal("emoush",2,0,"F");
                        quest::shout("1");
                        }
                else ($qglobals{emoush} == 2)
                        {
                        quest::delglobal("emoush");
                        quest::setglobal("emoush",3,0,"F");
                        quest::shout("2");
                        }
                else ($qglobals{emoush} == 3)
                        {
                        quest::delglobal("emoush");
                        quest::setglobal("emoush",4,0,"F");
                        quest::shout("3");
                        quest::signal("342052,10");
                        }
                }
}

I can get emoush to work right, but not the 3 other mobs...

Any ideas what I am doing wrong? I put shouts in so I know where the quest is not working, so I know that the quest doesnt work when I kill one of the three mobs, it doesnt even check for the global or change it.
__________________
~Tuul
Mithaniel Marr
http://mithmarr.power-rpg.com/
Reply With Quote
  #2  
Old 12-17-2008, 07:58 PM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Default

Under your sub EVENT_DEATH . . .

Try changing your else statements to elsif

Also . . .

Did you change the qglobal flag for all the mobs included in the global script (using the npc_types table)?
Reply With Quote
  #3  
Old 12-18-2008, 04:53 AM
Joetuul
Sarnak
 
Join Date: Oct 2008
Location: AZ
Posts: 58
Default

I changed all the flags in the NPC types table before this... so I guess I will try the elsif... hopefully that works. thanks for pointing that out to me.
__________________
~Tuul
Mithaniel Marr
http://mithmarr.power-rpg.com/
Reply With Quote
  #4  
Old 12-18-2008, 05:53 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

One thing I notice right off is that when the mob dies, the first check you do is to check if the global is not defined, then you are checking under that what the global is set to. If it isn't defined, it won't be set to anything :P

Try changing this:

Code:
	if (!defined($qglobals{emoush})){
to this:

Code:
	if (defined($qglobals{emoush})){
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 12-18-2008, 10:14 AM
Joetuul
Sarnak
 
Join Date: Oct 2008
Location: AZ
Posts: 58
Default Doh!

well that helps, but I still can't get it to work... I must be missing some stupid monday detail...

new code...
Code:
sub EVENT_DEATH
{
        if (defined($qglobals{emoush})){

                if ($qglobals{emoush} == 1)
                        {
                        quest::delglobal("emoush");
                        quest::shout("deleted");
                        quest::setglobal("emoush", 2, 5, "F");
                        quest::shout("1");
                        }
                elsif ($qglobals{emoush} == 2)
                        {
                        quest::delglobal("emoush");
                        quest::shout("deleted");
                        quest::setglobal("emoush", 3, 5, "F");
                        quest::shout("2");
                        }
                elsif ($qglobals{emoush} == 3)
                        {
                        quest::delglobal("emoush");
                        quest::setglobal("emoush", 4, 5, "F");
                        quest::shout("3");
                        quest::signal("342052");
                        }
               }
}
I woke up and thought I had the code that would work... guess not... any thoughts???

TIA... now back to bed.
__________________
~Tuul
Mithaniel Marr
http://mithmarr.power-rpg.com/
Reply With Quote
  #6  
Old 12-18-2008, 10:33 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You have the wrong option set in your global for what you are wanting to do. Option 0 can only be seen by the exact NPC that created the global. You probably want option 3 or so.

Change this
Code:
quest::setglobal("emoush",2,0,"F");
to this:
Code:
quest::setglobal("emoush",2,3,"F");

Here is the list of options from the wiki quest page:
http://www.eqemulator.net/wiki/wikka...=QuestTutorial

Code:
-----------------------------------------
|  value |  npcid  |  player |   zone   |
-----------------------------------------
|   0    |  this   |   this  |   this   |
|   1    |  all    |   this  |   this   |
|   2    |  this   |   all   |   this   |
|   3    |  all    |   all   |   this   |
|   4    |  this   |   this  |   all    |
|   5    |  all    |   this  |   all    | 
|   6    |  this   |   all   |   all    |
|   7    |  all    |   all   |   all    |
-----------------------------------------
I also think you might need to add a heading to your spawn2:

Code:
quest::spawn2(1230, 0, 0, -136, 1993, -3);
Code:
quest::spawn2(1230, 0, 0, -136, 1993, -3, 0);
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 12-18-2008 at 06:43 PM..
Reply With Quote
  #7  
Old 12-18-2008, 10:36 AM
Joetuul
Sarnak
 
Join Date: Oct 2008
Location: AZ
Posts: 58
Default

Well, I have narrowed it down to the line in red... whats wrong with that?


Code:
sub EVENT_DEATH
{
        if(defined($qglobals{emoush})){

                if ($qglobals{emoush} == 1)
                        {
                        quest::delglobal("emoush");
                        quest::shout("deleted");
                        quest::setglobal("emoush", 2, 5, "F");
                        quest::shout("1");
                        }
                elsif ($qglobals{emoush} == 2)
                        {
                        quest::delglobal("emoush");
                        quest::shout("deleted");
                        quest::setglobal("emoush", 3, 5, "F");
                        quest::shout("2");
                        }
                elsif ($qglobals{emoush} == 3)
                        {
                        quest::delglobal("emoush");
                        quest::setglobal("emoush", 4, 5, "F");
                        quest::shout("3");
                        quest::signal(342052, 1, 0);
                        }
               }
}
could it be something with this code for the other mob???

Code:
#Emoush_the_Destroyer
sub EVENT_SPAWN
{
	quest::setglobal("emoush", 1, 5, "F");
	quest::shout("Who has AWAKENED ME!?!?!, You shall die for interupting my slumber!");
}

sub EVENT_SIGNAL
{
        if (defined($qglobals{emoush})){

        if ($qglobals{emoush} == 4)
        {
        quest::spawn2(1230, 0, 0, -136, 1993, -3);
        quest::delglobal("emoush");
        quest::shout("depoped, respawned");
        quest::depop();
        }
        }
}

sub EVENT_DEATH
{
	quest::delglobal("emoush");
        quest::shout("global deleted");
}
__________________
~Tuul
Mithaniel Marr
http://mithmarr.power-rpg.com/
Reply With Quote
  #8  
Old 12-18-2008, 10:38 AM
Joetuul
Sarnak
 
Join Date: Oct 2008
Location: AZ
Posts: 58
Default

guess im inpatient, not meaning to be, brain is fried from lack of sleep... which is what I should be doing..

let me try what you just posted... ignore my post after yours.
__________________
~Tuul
Mithaniel Marr
http://mithmarr.power-rpg.com/
Reply With Quote
  #9  
Old 12-18-2008, 10:42 AM
Joetuul
Sarnak
 
Join Date: Oct 2008
Location: AZ
Posts: 58
Default

sweet... that worked...

quest::setglobal("emoush",2,3,"F");

thanks man, your the best!
__________________
~Tuul
Mithaniel Marr
http://mithmarr.power-rpg.com/
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 06:21 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