(WIP Again) Argent Tournament quest chaining

Hi I have been working on this for quiet a while, did have it working on an older version of Trinitycore, I have written the below SQL to fix quest chaining/conditions for dailies, yes when Ive posted before I got some of the conditions screwed up but have since yesterday got my own test server up and can confirm this time everything works except I am having problems with NegativeConditions for Valiant of Stormwind, Valiant of Ironforge, Valiant of Gnomeregan, Valiant of the Exodar, Valiant of Darnassus, Valiant of Ogrimmar, Valiant of Sen’jin, Valiant of Thunderbluff, Valiant of Silvermoon and Valiant of Undercity so that if a player has a version of this for another city in quest log they cant take another, once player turns this quest in have conditions for eligibility marker which work with rest of chain disallowing another to be taken until they become champion of the faction they picked.

– Conditions to ensure player cannot take another valiant of … quest while has one in log, conditions for tournament eligibility marker take care of rest of chain once these are turned in but player does not get flag until quest is turned in
DELETE FROM conditions WHERE SourceTypeOrReferenceId=19 AND ConditionTypeOrReference=9 AND SourceEntry IN (13593,13703,13704,13705,13706,13707,13708,13709,13710,13711);

DELETE FROM conditions WHERE SourceTypeOrReferenceId=20 AND ConditionTypeOrReference=9 AND SourceEntry IN (13593,13703,13704,13705,13706,13707,13708,13709,13710,13711);

INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,SourceId,ElseGroup,ConditionTypeOrReference,ConditionTarget,ConditionValue1,ConditionValue2,ConditionValue3,NegativeCondition,ErrorTextId,ScriptName,Comment) VALUES

(19,0,13593,0,0,9,0,13706,0,0,1,0,‘’,‘Show valiant of stormwind only if player does not have any valliant of … quest in quest log’),

(20,0,13593,0,0,9,0,13706,0,0,1,0,‘’,‘Show valiant of stormwind only if player does not have any valliant of … quest in quest log’),

(19,0,13593,0,0,9,0,13704,0,0,1,0,‘’,‘Show valiant of stormwind only if player does not have any valliant of … quest in quest log’),

(20,0,13593,0,0,9,0,13704,0,0,1,0,‘’,‘Show valiant of stormwind only if player does not have any valliant of … quest in quest log’),

(19,0,13593,0,0,9,0,13703,0,0,1,0,‘’,‘Show valiant of stormwind only if player does not have any valliant of … quest in quest log’),

(20,0,13593,0,0,9,0,13703,0,0,1,0,‘’,‘Show valiant of stormwind only if player does not have any valliant of … quest in quest log’),

(19,0,13593,0,0,9,0,13705,0,0,1,0,‘’,‘Show valiant of stormwind only if player does not have any valliant of … quest in quest log’),

(20,0,13593,0,0,9,0,13705,0,0,1,0,‘’,‘Show valiant of stormwind only if player does not have any valliant of … quest in quest log’),

(19,0,13706,0,0,9,0,13593,0,0,1,0,‘’,‘Show valiant of Darnassus only if player does not have any valliant of … quest in quest log’),

(20,0,13706,0,0,9,0,13593,0,0,1,0,‘’,‘Show valiant of Darnassus only if player does not have any valliant of … quest in quest log’),

(19,0,13706,0,0,9,0,13704,0,0,1,0,‘’,‘Show valiant of Darnassus only if player does not have any valliant of … quest in quest log’),

(20,0,13706,0,0,9,0,13704,0,0,1,0,‘’,‘Show valiant of Darnassus only if player does not have any valliant of … quest in quest log’),

(19,0,13706,0,0,9,0,13703,0,0,1,0,‘’,‘Show valiant of Darnassus only if player does not have any valliant of … quest in quest log’),

(20,0,13706,0,0,9,0,13703,0,0,1,0,‘’,‘Show valiant of Darnassus only if player does not have any valliant of … quest in quest log’),

(19,0,13706,0,0,9,0,13705,0,0,1,0,‘’,‘Show valiant of Darnassus only if player does not have any valliant of … quest in quest log’),

(20,0,13706,0,0,9,0,13705,0,0,1,0,‘’,‘Show valiant of Darnassus only if player does not have any valliant of … quest in quest log’),

(19,0,13704,0,0,9,0,13593,0,0,1,0,‘’,‘Show valiant of Gnomeregan only if player does not have any valliant of … quest in quest log’),

(20,0,13704,0,0,9,0,13593,0,0,1,0,‘’,‘Show valiant of Gnomeregan only if player does not have any valliant of … quest in quest log’),

(19,0,13704,0,0,9,0,13706,0,0,1,0,‘’,‘Show valiant of Gnomeregan only if player does not have any valliant of … quest in quest log’),

(20,0,13704,0,0,9,0,13706,0,0,1,0,‘’,‘Show valiant of Gnomeregan only if player does not have any valliant of … quest in quest log’),

(19,0,13704,0,0,9,0,13703,0,0,1,0,‘’,‘Show valiant of Gnomeregan only if player does not have any valliant of … quest in quest log’),

(20,0,13704,0,0,9,0,13703,0,0,1,0,‘’,‘Show valiant of Gnomeregan only if player does not have any valliant of … quest in quest log’),

(19,0,13704,0,0,9,0,13705,0,0,1,0,‘’,‘Show valiant of Gnomeregan only if player does not have any valliant of … quest in quest log’),

(20,0,13704,0,0,9,0,13705,0,0,1,0,‘’,‘Show valiant of Gnomeregan only if player does not have any valliant of … quest in quest log’),

(19,0,13703,0,0,9,0,13593,0,0,1,0,‘’,‘Show valiant of Ironforge only if player does not have any valliant of … quest in quest log’),

(20,0,13703,0,0,9,0,13593,0,0,1,0,‘’,‘Show valiant of Ironforge only if player does not have any valliant of … quest in quest log’),

(19,0,13703,0,0,9,0,13706,0,0,1,0,‘’,‘Show valiant of Ironforge only if player does not have any valliant of … quest in quest log’),

(20,0,13703,0,0,9,0,13706,0,0,1,0,‘’,‘Show valiant of Ironforge only if player does not have any valliant of … quest in quest log’),

(19,0,13703,0,0,9,0,13704,0,0,1,0,‘’,‘Show valiant of Ironforge only if player does not have any valliant of … quest in quest log’),

(20,0,13703,0,0,9,0,13704,0,0,1,0,‘’,‘Show valiant of Ironforge only if player does not have any valliant of … quest in quest log’),

(19,0,13703,0,0,9,0,13705,0,0,1,0,‘’,‘Show valiant of Ironforge only if player does not have any valliant of … quest in quest log’),

(20,0,13703,0,0,9,0,13705,0,0,1,0,‘’,‘Show valiant of Ironforge only if player does not have any valliant of … quest in quest log’),

(19,0,13705,0,0,9,0,13593,0,0,1,0,‘’,‘Show valiant of the exodar only if player does not have any valliant of … quest in quest log’),

(20,0,13705,0,0,9,0,13593,0,0,1,0,‘’,‘Show valiant of the exodar only if player does not have any valliant of … quest in quest log’),

(19,0,13705,0,0,9,0,13706,0,0,1,0,‘’,‘Show valiant of the exodar only if player does not have any valliant of … quest in quest log’),

(20,0,13705,0,0,9,0,13706,0,0,1,0,‘’,‘Show valiant of the exodar only if player does not have any valliant of … quest in quest log’),

(19,0,13705,0,0,9,0,13704,0,0,1,0,‘’,‘Show valiant of the exodar only if player does not have any valliant of … quest in quest log’),

(20,0,13705,0,0,9,0,13704,0,0,1,0,‘’,‘Show valiant of the exodar only if player does not have any valliant of … quest in quest log’),

(19,0,13705,0,0,9,0,13703,0,0,1,0,‘’,‘Show valiant of the exodar only if player does not have any valliant of … quest in quest log’),

(20,0,13705,0,0,9,0,13703,0,0,1,0,‘’,‘Show valiant of the exodar only if player does not have any valliant of … quest in quest log’),

(19,0,13707,0,0,9,0,13708,0,0,1,0,‘’,‘Show valiant of orgrimmar only if player does not have any valliant of … quest in quest log’),

(20,0,13707,0,0,9,0,13708,0,0,1,0,‘’,‘Show valiant of orgrimmar only if player does not have any valliant of … quest in quest log’),

(19,0,13707,0,0,9,0,13711,0,0,1,0,‘’,‘Show valiant of orgrimmar only if player does not have any valliant of … quest in quest log’),

(20,0,13707,0,0,9,0,13711,0,0,1,0,‘’,‘Show valiant of orgrimmar only if player does not have any valliant of … quest in quest log’),

(19,0,13707,0,0,9,0,13709,0,0,1,0,‘’,‘Show valiant of orgrimmar only if player does not have any valliant of … quest in quest log’),

(20,0,13707,0,0,9,0,13709,0,0,1,0,‘’,‘Show valiant of orgrimmar only if player does not have any valliant of … quest in quest log’),

(19,0,13707,0,0,9,0,13710,0,0,1,0,‘’,‘Show valiant of orgrimmar only if player does not have any valliant of … quest in quest log’),

(20,0,13707,0,0,9,0,13710,0,0,1,0,‘’,‘Show valiant of orgrimmar only if player does not have any valliant of … quest in quest log’),

(19,0,13708,0,0,9,0,13707,0,0,1,0,‘’,‘Show valiant of senjin only if player does not have any valliant of … quest in quest log’),

(20,0,13708,0,0,9,0,13707,0,0,1,0,‘’,‘Show valiant of senjin only if player does not have any valliant of … quest in quest log’),

(19,0,13708,0,0,9,0,13711,0,0,1,0,‘’,‘Show valiant of senjin only if player does not have any valliant of … quest in quest log’),

(20,0,13708,0,0,9,0,13711,0,0,1,0,‘’,‘Show valiant of senjin only if player does not have any valliant of … quest in quest log’),

(19,0,13708,0,0,9,0,13709,0,0,1,0,‘’,‘Show valiant of senjin only if player does not have any valliant of … quest in quest log’),

(20,0,13708,0,0,9,0,13709,0,0,1,0,‘’,‘Show valiant of senjin only if player does not have any valliant of … quest in quest log’),

(19,0,13708,0,0,9,0,13710,0,0,1,0,‘’,‘Show valiant of senjin only if player does not have any valliant of … quest in quest log’),

(20,0,13708,0,0,9,0,13710,0,0,1,0,‘’,‘Show valiant of senjin only if player does not have any valliant of … quest in quest log’),

(19,0,13711,0,0,9,0,13707,0,0,1,0,‘’,‘Show valiant of silvermoon only if player does not have any valliant of … quest in quest log’),

(20,0,13711,0,0,9,0,13707,0,0,1,0,‘’,‘Show valiant of silvermoon only if player does not have any valliant of … quest in quest log’),

(19,0,13711,0,0,9,0,13708,0,0,1,0,‘’,‘Show valiant of silvermoon only if player does not have any valliant of … quest in quest log’),

(20,0,13711,0,0,9,0,13708,0,0,1,0,‘’,‘Show valiant of silvermoon only if player does not have any valliant of … quest in quest log’),

(19,0,13711,0,0,9,0,13709,0,0,1,0,‘’,‘Show valiant of silvermoon only if player does not have any valliant of … quest in quest log’),

(20,0,13711,0,0,9,0,13709,0,0,1,0,‘’,‘Show valiant of silvermoon only if player does not have any valliant of … quest in quest log’),

(19,0,13711,0,0,9,0,13710,0,0,1,0,‘’,‘Show valiant of silvermoon only if player does not have any valliant of … quest in quest log’),

(20,0,13711,0,0,9,0,13710,0,0,1,0,‘’,‘Show valiant of silvermoon only if player does not have any valliant of … quest in quest log’),

(19,0,13709,0,0,9,0,13707,0,0,1,0,‘’,‘Show valiant of thunderbluff only if player does not have any valliant of … quest in quest log’),

(20,0,13709,0,0,9,0,13707,0,0,1,0,‘’,‘Show valiant of thunderbluff only if player does not have any valliant of … quest in quest log’),

(19,0,13709,0,0,9,0,13708,0,0,1,0,‘’,‘Show valiant of thunderbluff only if player does not have any valliant of … quest in quest log’),

(20,0,13709,0,0,9,0,13708,0,0,1,0,‘’,‘Show valiant of thunderbluff only if player does not have any valliant of … quest in quest log’),

(19,0,13709,0,0,9,0,13711,0,0,1,0,‘’,‘Show valiant of thunderbluff only if player does not have any valliant of … quest in quest log’),

(20,0,13709,0,0,9,0,13711,0,0,1,0,‘’,‘Show valiant of thunderbluff only if player does not have any valliant of … quest in quest log’),

(19,0,13709,0,0,9,0,13710,0,0,1,0,‘’,‘Show valiant of thunderbluff only if player does not have any valliant of … quest in quest log’),

(20,0,13709,0,0,9,0,13710,0,0,1,0,‘’,‘Show valiant of thunderbluff only if player does not have any valliant of … quest in quest log’),

(19,0,13710,0,0,9,0,13707,0,0,1,0,‘’,‘Show valiant of undercity only if player does not have any valliant of … quest in quest log’),

(20,0,13710,0,0,9,0,13707,0,0,1,0,‘’,‘Show valiant of undercity only if player does not have any valliant of … quest in quest log’),

(19,0,13710,0,0,9,0,13708,0,0,1,0,‘’,‘Show valiant of undercity only if player does not have any valliant of … quest in quest log’),

(20,0,13710,0,0,9,0,13708,0,0,1,0,‘’,‘Show valiant of undercity only if player does not have any valliant of … quest in quest log’),

(19,0,13710,0,0,9,0,13711,0,0,1,0,‘’,‘Show valiant of undercity only if player does not have any valliant of … quest in quest log’),

(20,0,13710,0,0,9,0,13711,0,0,1,0,‘’,‘Show valiant of undercity only if player does not have any valliant of … quest in quest log’),

(19,0,13710,0,0,9,0,13709,0,0,1,0,‘’,‘Show valiant of undercity only if player does not have any valliant of … quest in quest log’),

(20,0,13710,0,0,9,0,13709,0,0,1,0,‘’,‘Show valiant of undercity only if player does not have any valliant of … quest in quest log’);

These are the conditions I wrote for this but dont seem to be working and I have no idea why,

On older version of Trinitycore (without negative conditions) was using this: -

UPDATE quest_template SET Method=0 WHERE entry IN (13593,13703,13704,13705,13706,13707,13708,13709,13710,13711);

which did do the job as it made quest instant turn in so as soon as turned in got eligibility flag and could not take another until they lost the flag by becoming valiant of faction they had taken quest for

Heres the complete SQL (now tested and everything working on freshly compiled trinitycore (Yesterday)

[CODE] Arent Tournament Quest Chaining and Conditions - Pastebin.com

but above is only problem now

[/CODE]

I don’t see a problem in the conditions, but what you get now is you can never take the quest or you can always take the quest?

If currently you can pick the quest even, if have any of these in log means this condition is broken or does something else.

Problem is when you take one of these quests you do not become ineligible to take the quest for another faction until you turn the quest you took in, so player can take quests for all 4 factions which they will not have done at this point as long as they dont turn one in as soon as they turn one in they do become ineligible until they turn quest in, all what these conditions are meant to do is prevent quests from being taken if they have the same quest for another faction in quest log

Sorry, was sleepy, replace condition 9 with 28 and you are fixed. I suggest you make someone push this.

Basically once you become champion of your own faction at Argent Tournament another 4 quests become available to become valiant of the 4 cities of your faction, however player should only be able to do one chain at a time become champion of that faction then start next,

whats happening at the moment if those quests which become available you can take all of them as long as you dont turn one in, thats what these conditions are for but cant seem to get working,

Everything else is working exactly as it should only this problem remains

Give a look to http://code.google.com/p/tc2patches/source/browse/argent_tournament

c++ part updated here http://pastebin.com/9T4cWsCs

I hope I got this correctly, the condition part you mention at first post is fixed by switching from 9 to 28. However, once you complete any of them, rest are seen again. This means one thing, I will write when I get back, because need to think things out clearly, but basicly the problem is within this:

Each valiant quest should be unlocked only, if previous quest with respectful challenge is complete. Basicly, there are 2 ways to fix this:

The condition way would be using the challenge as quest completed. /that would show the quest only, if the specific challenge is complete./

The second way /that would be Blizzard way is to assign prevquest ID properly/.

Thank you works, how would I go about getting this pushed anyway,

I will test it again but problem seems to be fixed as those quests require horde champion marker before they become available which works, also once a player turns one of these they get tournament eligility marker which I have got conditions to ensure player cant take any quest to start another chain while they have the valiants charge or valiants challenge in log, this marker gets released when player becomes champion of a faction allowing player to start quest chain to become valiant of next faction.
No tested again appears to be working as intended

I did it the conditions way so both valiant of and a valiant of a faction lead to the valiants charge which in turn leads to the valliants challenge

Ah, okay, I just tought you have problems again, since answered after what I posted. Yeah, this mechanism will be enought. About push, well I guess best way put a paste link or put it in the issue tracker and wait until someone decide to push it, I can tell atleast what you did seems Blizzlike.