|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
|
|
|
12-17-2008, 07:41 PM
|
Sarnak
|
|
Join Date: Oct 2008
Location: AZ
Posts: 58
|
|
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.
|
|
|
|
12-17-2008, 07:58 PM
|
Hill Giant
|
|
Join Date: May 2008
Location: Colorado
Posts: 238
|
|
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)?
|
12-18-2008, 04:53 AM
|
Sarnak
|
|
Join Date: Oct 2008
Location: AZ
Posts: 58
|
|
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.
|
12-18-2008, 05:53 AM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
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})){
|
12-18-2008, 10:14 AM
|
Sarnak
|
|
Join Date: Oct 2008
Location: AZ
Posts: 58
|
|
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.
|
|
|
|
12-18-2008, 10:33 AM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
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);
Last edited by trevius; 12-18-2008 at 06:43 PM..
|
|
|
|
|
|
|
12-18-2008, 10:36 AM
|
Sarnak
|
|
Join Date: Oct 2008
Location: AZ
Posts: 58
|
|
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");
}
|
|
|
|
12-18-2008, 10:38 AM
|
Sarnak
|
|
Join Date: Oct 2008
Location: AZ
Posts: 58
|
|
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.
|
12-18-2008, 10:42 AM
|
Sarnak
|
|
Join Date: Oct 2008
Location: AZ
Posts: 58
|
|
sweet... that worked...
quest::setglobal("emoush",2,3,"F");
thanks man, your the best!
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 09:12 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|