Quote:
Originally Posted by cavedude
We want that to happen, so the script reloads the values from the database. I too don't understand what the trouble is.
|
I'm basically doing the Imildu's Tasks from the Abysmal Sea. It's a tradeskill task and part of the task is to basically make things and then give the results back to the the quest giver. For each step you have to hand in 100 items. I track the number of items handed in via a quest global. As I'm testing and modifying the script I have to #reloadqst from time to time as I change it. When I do this, the value in the database is correct for the last item I handed in. So when I do a #reloadqst my quest global becomes undefined and starts over, resetting it in the database. I expected it just to re-read it from the database and start from where that was, but it doesn't. It starts over. Since I'm checking like this:
Code:
if (!defined($qglobals{imildustep1})) {
quest::setglobal("imildustep1",0,0,F);
}
Then when I update the value...
Code:
if(plugin::check_handin(\%itemcount, #### => 1)) {
$val = $qglobal{imildustep1} + 1;
$qglobal{imildustep1} += 1;
quest::setglobal("imildustep1",$val,0,F);
}
I'm watching the value in the database increase as it should...
This works fine until I hit #reloadqst, then instead of getting the current value in the database, I get it starting over and the value in the database get sets set to 0.