EOSERV Bug Tracker > Bug #236: Quest rules to check another quest's current state

Bug #236: Quest rules to check another quest's current state

Quest rules to check another quest's current state
ID #236
Submitter Ryouken
Product EOSERV
Severity Feature Request
Status OPEN, CONFIRMED
Submitted 26th Mar 2013
Updated 3rd May 2013
Ryouken Submitter 11 years, 9 weeks ago

At first, I thought eoserv already had these, but I can't seem to find them in the reference or anywhere in the code. It would be nice to have a rule that checks if other quests have been started, finished, or reached a certain state.

EX:

rule StartedQuest(<quest id>)

rule EndedQuest(<quest id>)

rule QuestIsState(<quest id>, <state name>)

Comments

Ryouken Submitter 11 years, 9 weeks ago

I probably did this the most horrid way possible, but I'm not the best at coding so forgive me .-. Heres how I set it up in the rule check:

else if (function_name == "startedquest")

{

if(character->GetQuest(int(expr.args[0])))

return true;

else

return false;

}

else if (function_name == "endedquest")

{

auto quest = character->GetQuest(int(expr.args[0]));

if(quest)

return quest->Finished();

else

return false;

}

else if (function_name == "questisstate")

{

auto quest = character->GetQuest(int(expr.args[0]));

if(quest)

return quest->StateName() == std::string(expr.args[1]);

else

return false;

}

Also, having a rule check every time a quest npc is clicked would help make the rules more accurate or thats how I have it. I'm not sure if that was avoided for a reason or just skipped by accident.

Hacker_Alex 11 years, 8 weeks ago

Are you saying that quest chains aren't possible without this feature?

Sausage Developer 11 years, 3 weeks ago

There's probably better ways to do inter-quest communication than directly using its states, but these would definitely be useful.

Updated Status to CONFIRMED

Add Comment

Please don't post unless you have something relevant to the bug to say.
Do not comment to say "thanks" or "fix this please".

Please log in to add comments. EOSERV Bug Tracker > Bug #236: Quest rules to check another quest's current state