EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Can someone help me understand qglobal expiration (https://www.eqemulator.org/forums/showthread.php?t=42362)

lctucker2999 03-16-2019 12:45 AM

Can someone help me understand qglobal expiration
 
I understand that databuckets have replaced qglobals but since so many quests utilize qglobals still, I'm trying to understand some things that I just can't quite seem to figure out.

Basically I am trying to reduce the respawn time of the Cursed Cycle in ssra temple.

Looking at the #cursed_controller script, I see there is are spawntime and variance variables, so I adjusted those accordingly. Then at the bottom of the script, upon being signaled by Cursed death, there is a setglobal to the respawn time.

So far... all that makes sense to me. What I don't understand is why the qglobal cursed_dead is still defined in the questglobals table when it should have expired (as of the time I'm typing this) 33 minutes ago. And that qglobal definition is preventing the final trigger NPC (Rhozth_ssrakezh) from spawning

Scorpious2k 03-19-2019 02:27 AM

First, data buckets haven't replaced qglobals. As I understand it, it was added so the script kiddies who write their entire server in interpreters (perl/lua) have an easier way to do it.

As for your problem, more information would be needed.

chrsschb 03-19-2019 09:48 AM

Quote:

Originally Posted by Scorpious2k (Post 261934)
First, data buckets haven't replaced qglobals. As I understand it, it was added so the script kiddies who write their entire server in interpreters (perl/lua) have an easier way to do it.

As for your problem, more information would be needed.

Quote:

Data buckets are a replacement to the well-known qglobals, but they are far more performant, reliable and simpler to use
https://github.com/EQEmu/Server/wiki/Data-Buckets

chrsschb 03-19-2019 11:36 AM

Quote:

Originally Posted by lctucker2999 (Post 261914)
I understand that databuckets have replaced qglobals but since so many quests utilize qglobals still, I'm trying to understand some things that I just can't quite seem to figure out.

Basically I am trying to reduce the respawn time of the Cursed Cycle in ssra temple.

Looking at the #cursed_controller script, I see there is are spawntime and variance variables, so I adjusted those accordingly. Then at the bottom of the script, upon being signaled by Cursed death, there is a setglobal to the respawn time.

So far... all that makes sense to me. What I don't understand is why the qglobal cursed_dead is still defined in the questglobals table when it should have expired (as of the time I'm typing this) 33 minutes ago. And that qglobal definition is preventing the final trigger NPC (Rhozth_ssrakezh) from spawning

I've been playing with this for a bit. I've noticed when the qglobal timers expire (or are deleted) they are still showing as defined to the NPC (which means that check always fails). I had to shutdown the zone to get the timers to truly expire.

Almusious 03-19-2019 02:40 PM

/quests/ssratemple/#cursed_controller.pl
Code:

my $check;

sub EVENT_SPAWN
{
        quest::settimer("cursed",60);
}

sub EVENT_TIMER
{
        $check = 0;
        if($timer eq "cursed")
        {
                foreach my $boss_to_check (162270,162271,162272,162273,162274,162275,162276,162277,162278,162279)
                {
                        if ($entity_list->GetMobByNpcTypeID($boss_to_check))
                        {
                                $check = 1;
                                last;
                        }
                }
                if ($check == 0)
                {
                        if (quest::get_data("glyphed_dead"))
                        {
                                quest::spawn2(162253,0,0,-51,-9,-218.1,63);        ## runed
                        } else {
                                quest::spawn2(162261,0,0,-51,-9,-218.1,63);        ## glyphed
                        }
                        quest::stoptimer("cursed");
                        quest::stoptimer("one");
                        quest::settimer("one",21600);
                }
        }
        if ($timer eq "one" && (not quest::get_data("cursed_dead")))
        {
                quest::stoptimer("one");
                quest::depop(162206);
                quest::depop(162232);
                quest::depop(162214);
                quest::depop(162261);
                quest::depop(162253);
                quest::depop_withtimer();
        }
}

sub EVENT_SIGNAL
{
        if ($signal == 1)
        {
                if (quest::get_data("exiled_dead"))
                {
                        quest::spawn2(162214,0,0,-51,-9,-218.1,63);        ## Banished
                } else {
                        quest::spawn2(162232,0,0,-51,-9,-218.1,63);        ## Exiled
                }
        }
        elsif ($signal == 2 && (quest::get_data("cursed_dead")))
        {
                quest::spawn2(162206,0,0,-51,-9,-218.1,63);        ## Cursed
        }
        elsif ($signal == 3)
        { 
                quest::set_data("cursed_dead", 1, (4320 + quest::ChooseRandom(0..600)));
                quest::stoptimer("one");
                quest::depop_withtimer();
        }
}


/quests/ssratemple/#a_glyph_covered_serpent.pl
Code:

sub EVENT_DEATH_COMPLETE
{
        quest::signalwith(162255,1,0);
        quest::set_data("glyphed_dead", 1, 259200); ## 86400 seconds (in a day) x 3 days
}


/quests/ssratemple/#Vyzh-dra_the_Exiled.pl
Code:

sub EVENT_DEATH_COMPLETE
{
        quest::signalwith(162255,2,0);       
        quest::set_data("exiled_dead", 1, 259200); ## 86400 seconds (in a day) x 3 days
}


Qglobals is dated, buggy and slow(er) than data buckets, hence the reason Akka implemented them (buckets). The above is code to go from qglobals to buckets, cleaned up a little, though could likely be even more efficient, being unfamiliar with how the stock cycle went anymore, I minimized alterations.


All times are GMT -4. The time now is 12:51 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.