From what I can tell, it looks like your quest should be working properly. At least, I don't notice anything right away that stands out. Though, I don't think I have used the 0 option for qglobals, so maybe that code has issues. I always use 5 or 7 in most scripts I have qglobals in and they work perfectly.
Here is a link to a similar working script I made that adds values and checks for defined globals and such. It is different, but same basic concept and works just fine:
http://www.eqemulator.net/forums/showthread.php?t=26123
I am curious if this task you are talking about is an actual Task on Live, or if it is a Quest. If it is a task, you could just use the Task System and I think it should be able to handle everything you are trying to do. Though, I think it would be a deliver task and I am not sure how well a deliver task with 100 turn ins would work lol. Might be worth looking into though if it is a Task on Live. Tasks take some getting used to at first, but using the Task Master tool KLS wrote makes them fairly easy to create and manage.
One thing I always do when working on quests that aren't functioning properly is to put in some debugging say messages. So, where you have:
Code:
if (!defined($qglobal{imildustep1})) {
quest::setglobal("imildustep1",0,0,'F');
$qglobal{imildustep1}=0;
}
I would change that to
Code:
if (!defined($qglobal{imildustep1})) {
quest::setglobal("imildustep1",0,0,'F');
quest::say("Global not defined, so setting it and making it 0");
}
For testing purposes only and then either comment out the say message or remove it completely once everything is working. I would add in Say messages all around the areas that you are having problems with to isolate exactly what is happening. Make sure to put the say message at the end of the if section so it ensures that the steps inside did go through. If you don't get the say message, then part of that if is failing.
Note that I also removed "$qglobal{imildustep1}=0;" from that part of your code as I am not sure what that is doing.