openkore icon indicating copy to clipboard operation
openkore copied to clipboard

[eventMacro] Conditions releat with Quests not working properly on iRO:Restart

Open CaioVictor21 opened this issue 9 years ago • 15 comments

## ------------------ 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

print1

So here we start to show wrong values:

console:

eventMacro auto Quest1

print2

2 After the quest conclusion:

print3

console:

eventMacro auto Quest1

print4

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

CaioVictor21 avatar Nov 20 '17 02:11 CaioVictor21

This fixes QuestHuntOngoing, the fix is similar for the other conditions https://gist.github.com/lututui/2937a0c10819669b3390c5fbd68d30b4

lututui avatar Nov 20 '17 03:11 lututui

Quest condition is bugged for iRO server afaik.

Fadreus avatar Nov 20 '17 04:11 Fadreus

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

c4c1n6kr3m1 avatar Nov 20 '17 07:11 c4c1n6kr3m1

@Nipodemos GOD OF EVENTMARCO

sctnightcore avatar Nov 20 '17 11:11 sctnightcore

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 avatar Nov 20 '17 13:11 Nipodemos

@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 avatar Nov 20 '17 13:11 Fadreus

@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)

Nipodemos avatar Nov 20 '17 13:11 Nipodemos

@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:

vespercore02 avatar Nov 20 '17 16:11 vespercore02

Hey guys, I noticed that this error doesn't occur in all quests in iRO RE

Evidences:

  1. Before quest conclusion:

print1

  1. After quest conclusion:

print2

Only the condition QuestTimeOverdue is returning wrong values for this quest.

CaioVictor21 avatar Nov 21 '17 12:11 CaioVictor21

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

CaioVictor21 avatar Nov 21 '17 12:11 CaioVictor21

You might wanna take a look at #1442 for QuestHuntComplete and QuestHuntOngoing

lututui avatar Nov 25 '17 15:11 lututui

Might wanna use with #1276 too

Fadreus avatar Nov 27 '17 06:11 Fadreus

#1442

alisonrag avatar Nov 27 '17 14:11 alisonrag

#1442 doesn't fix every problem listed here

lututui avatar Nov 27 '17 16:11 lututui

Should be fixed now, and also, restart was closed.

Henrybk avatar Sep 09 '19 17:09 Henrybk