## ------------------ Bug Report Template ------------------###### Summary:
The conditions _QuestHuntCompleted_ and _QuestTimeOverdue_ conditions are returning divergent values with what is presented in the game
###### Affected configuration(s)/ file(s):
EventMacro AI Conditions
EventMacros.txt
automacro Quest1{
exclusive 1
QuestActive 62938
QuestInactive 62938
QuestOnTime 62938
QuestTimeOverdue 62938
QuestHuntCompleted 62938 1092
QuestHuntOngoing 62938 1092
call {
do move alberta 50 140
}
}
automacro Quest2{
exclusive 1
QuestActive 62937
QuestInactive 62937
QuestOnTime 62937
QuestTimeOverdue 62937
QuestHuntCompleted 62937 1089
QuestHuntOngoing 62937 1089
call {
do move alberta 50 140
}
}
###### Impact:
The automacro with this conditions may not trigger properly
###### Expected Behavior:
Correct return values
###### Actual Behavior:
QuestHuntCompleted return "true" after quest mob complete
QuestTimeOverdue return "false" to quest without time requirements
###### Steps to Reproduce:
Server:iRO Restart
At this moment i started 2 quests in the NPC

So here we start to show wrong values:
console:
eventMacro auto Quest1

2 After the quest conclusion:

console:
eventMacro auto Quest1

Im also tested with de automacro Quest2 releatd to the Toad quest and got the same results even not concluding it
Can you help me ? @Henrybk
This fixes QuestHuntOngoing, the fix is similar for the other conditions
https://gist.github.com/lututui/2937a0c10819669b3390c5fbd68d30b4
Quest condition is bugged for iRO server afaik.
you can try https://github.com/c4c1n6kr3m1/openkore/blob/f6dde4ea860a708457d7d580633b608cb9a0ec6f/src/Network/Receive/iRO/Restart.pm
and test the old style macro, haven't try with eventmacro bcoz i don't use it
@Nipodemos GOD OF EVENTMARCO
the fix that @lututui posted, will solve your problem bro
i've saw that happen with other people, and she wrote that solution
so try it 馃槃
@Nipodemos Addding this to QuestHuntCompleted too? 馃樁
my $quest_hunt_ID;
foreach (keys %{$questList->{$quest_ID}->{missions}}) {
if ($questList->{$quest_ID}->{missions}->{$_}->{mobID} == $mob_ID) {
$quest_hunt_ID = $_;
last;
}
}
@fadreus the error that we noticed, is that the $_ is not equal to the mobID on restart, i don't know why
instead is a sequence of numbers, that is not related with mobID (that's why the condition wasn't working)
so i think this will code you've showed will not work either (unless you tested and worked)
@c4c1n6kr3m1
is the old style like this?
automacro QuestCheck{
hook packet/quest_update_mission_hunt
call {
$temp1 = @eval($::questList->{62645}->{missions}->{1013}->{count})
}
}
its working :+1:
Hey guys, I noticed that this error doesn't occur in all quests in iRO RE
1) Before quest conclusion:

2) After quest conclusion:

Only the condition QuestTimeOverdue is returning wrong values for this quest.
Hello again !!!
I did another test with first quest that i posted ( Vagabond Wolf )
I used the console comand quest set 62938 off right after quest set 62938 on
and then began to show correct values of conditions, except _QuestTimeOverdue_
You might wanna take a look at #1442 for QuestHuntComplete and QuestHuntOngoing
Might wanna use with #1276 too
Should be fixed now, and also, restart was closed.
Most helpful comment
@Nipodemos GOD OF EVENTMARCO