EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   qglobals didn't work normally (https://www.eqemulator.org/forums/showthread.php?t=31613)

sithouse 07-07-2010 10:26 AM

qglobals didn't work normally
 
I compiled the Bot version by myself.

(Build: 5 succeeded, 0 failed, 0 up-to-date, 0 skipped)

I download the source code by SVN, the version is Rev1586
And I use the Rev1549 database.

PHP Code:

sub EVENT_DEATH{
    
  
quest::spawn2(189026,0,0,$x,$y,$z,$h);
  
quest::emote("'s corpse stops moving");
  
  if (!
defined $qglobals{rufu}){
      
quest::delglobal("rufu");
      
quest::setglobal("rufu",1,3,"F");
  }else {
      
my $killtime $qglobals{rufu} + 1;
      
quest::delglobal("rufu");
      
quest::setglobal("rufu",$killtime,3,"F");
  }
      


When I set the setglobal option variables "0".
It can work normally.
But when it set to 1 or 2 or 3 or .....
The $qglobals was not work.

I am sure the MOB's qglobal=1 in npc_types.
I don't know how to fix it.

joligario 07-07-2010 11:06 AM

Not sure why yours isn't working, but this works for me:

Code:

my $killtime = 0;

sub EVENT_DEATH {
  quest::spawn2(189026,0,0,$x,$y,$z,$h);
  quest::emote("'s corpse stops moving");
  if (!defined($qglobals{rufu})) {
    $killtime = 1;
  }
  else {
    $killtime = $qglobals{rufu} + 1;
  }
  quest::setglobal("rufu",$killtime,3,"F");
  quest::say("I have been killed $killtime times.");
}


sithouse 07-07-2010 01:42 PM

yes, it's work now when i copy your code to my formula .
And I know why it's not work

If the formula quest::setglobal("myglobal") before
Add the row " quest::delglobal("myglobal")
the qglobals can not work

And when I comment that quest::delglobal("myglobal") by #
the qglobals is normally work now

thank you to reslove my question.

But I saw many pl files which related the Quest "Hollowshade War" in Hollowshade Moor
Write the formula by
Code:

quest::delglobal("defder1");
quest::setglobal("defder1",1,3,"F");

So the quest was not work normally
And I also commented the delgloobal
The quest work normally.


All times are GMT -4. The time now is 02:41 AM.

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