Jump to content

The best way to do this in Quest


Recommended Posts

Hello m2dev, im going straight to the point

 

Imagine, i have Mission1.quest:
 

Spoiler

quest mission1 begin
    state start begin
        when login begin
            local myRace = pc.get_race()
            
            if myRace == 1 then
                execute(mission_1_subquest_1.quest)
            elseif myRace == 2 then
                execute(mission_1_subquest_2.quest)
            elseif myRace == 3 then
                execute(mission_1_subquest_3.quest)
            else
                return
            end
        end
    end
    
    state failed begin
        when ??? begin
            --Here we know if we failed or not the mission
            --So we re-start it here
        end
    end
    
    state suceed begin
        --Here we know wee suceed, so mission is finished
        --And now execute mission2
        execute(mission2.quest)
        q.done()
    end
    
    state done begin
    end
end


 

In words, i have mission1.quest, that on login get the character race and executes an quest file for each race

but i have to return if race suceeded the mission or not, if suceeded execute mission2.quest, if not, restart mission

 

Whats the better solution to turn this scenario real?

 

Thanks in advance.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.