From a1cbe5d0ba5ae4994753e8e59a76b69ff461b300 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 25 Feb 2020 02:48:51 -0300 Subject: Checks. Lua Main Quest 2-1 ready. --- npc/003-2/lua.txt | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 101 insertions(+), 3 deletions(-) (limited to 'npc/003-2/lua.txt') diff --git a/npc/003-2/lua.txt b/npc/003-2/lua.txt index 0d06baf7c..a7e6824c0 100644 --- a/npc/003-2/lua.txt +++ b/npc/003-2/lua.txt @@ -9,14 +9,19 @@ // Main Quest 2-1 until Main Quest 2-5 (?) function luaAssignTask1; // Dausen & Aidan function luaTask1; + function luaCheckTask1; function luaAssignTask2; // Fishing & Crafting function luaTask2; + function luaCheckTask2; function luaAssignTask3; // Minimum level/job to begin function luaTask3; + function luaCheckTask3; function luaAssignTask4; // Inn Arc function luaTask4; + function luaCheckTask4; function luaAssignTask5; // Your Report, the plan function luaTask5; + function luaCheckTask5; // Then we jump to L_Finish/L_Complete .@n = getq(General_Narrator); @@ -270,20 +275,45 @@ L_Task: mesc b(l(".:: Main Quest 2-%d ::.", .@q2)), 3; if (.@q2 == 1) { luaTask1(); + next; + if (luaCheckTask1()) { + setq2 General_Narrator, 2; + goto L_Task; + } } else if (.@q2 == 3) { luaTask2(); + next; + if (luaCheckTask2()) { + setq2 General_Narrator, 4; + goto L_Task; + } } else if (.@q2 == 5) { luaTask3(); + next; + if (luaCheckTask3()) { + setq2 General_Narrator, 6; + goto L_Task; + } } else if (.@q2 == 7) { luaTask4(); + next; + if (luaCheckTask4()) { + setq2 General_Narrator, 8; + goto L_Task; + } } else if (.@q2 == 9) { luaTask5(); + next; + if (luaCheckTask5()) { + setq2 General_Narrator, 10; + goto L_Finish; + } } next; - /* + /* TODO: Checks if (BaseLevel >= 20 && JobLevel >= 6 && Zeny >= 1000 && @@ -298,18 +328,47 @@ L_Task: // Declare functions function luaAssignTask1 { + mesn; + mesq l("First and foremost, you should get yourself some reputation. I mean, right now, you are a complete nobody who was found on the sea."); + next; + mesn; + mesq l("As far as we are concerned, you could have been an exiled prisoner who managed to escape! But there are ways to prove to the Alliance that your intentions are good."); + next; + mesn; + mes l("%s is by becoming a %s.", b(l("The first way,")), b(l("Monster Hunter"))); + // If you skipped Tutorial: You already know all this + tutmes l("Monster Hunters receive small bounties on a special currency, of Monster Points, for each monster they kill. The amount gained is based on the monster level."), l("Monster Hunter"); + tutmes l("You can become a Monster Hunter by signing up with %s, near the Market.", b("Aidan")), l("Monster Hunter"); + next; + mesn; + mes l("%s is by impressing the town guard.", b(l("The second way,"))); + // If you skipped Tutorial: You already know all this + tutmes l("Also near the market, look for %s. He is the chief of the City Guard. Ask if he need help, and help him!", b(l("Lieutenant Dausen"))), l("Monster Hunter"); + tutmes l("If he gives you a guard card, that'll allow access to the Guard House, where you can pick Daily Bounties for monsters. These will pay you in GP."), l("The Guard House"); + tutmes l("Tulimshar is the strongest city because Dausen teaches every newcomer about the monsters around and how to defeat them. Take his special training if you get the chance!"), l("The Guard House"); + next; + mesn; + mesq l("You don't need to do both right now, even if you probably will want to. Once any (or both) of them tell me you're an OK person, I'll start helping you."); + next; return; } // Dausen & Aidan -function luaTask1 { +function luaTask1 { msObjective(countitem(TulimsharGuardCard), l("* @@/@@ @@", countitem(TulimsharGuardCard), 1, getitemlink(TulimsharGuardCard))); - msObjective(MPQUEST, l("* Register as a Crafter or Hunter")); + mes l("--- OR ---"); + msObjective(MPQUEST, l("* Register as a Monster Hunter")); return; } +function luaCheckTask1 { + return (MPQUEST || + countitem(TulimsharGuardCard)); +} + function luaAssignTask2 { + next; return; } // Fishing & Crafting @@ -319,9 +378,19 @@ function luaTask2 { return; } +function luaCheckTask2 { + return (BaseLevel >= 20 && + JobLevel >= 6 && + Zeny >= 1000 && + (CRAFTQUEST || MPQUEST) && + countitem(TulimsharGuardCard) && + countitem(FishingRod)); +} + function luaAssignTask3 { + next; return; } // Minimum level/job to begin @@ -334,9 +403,19 @@ function luaTask3 { return; } +function luaCheckTask3 { + return (BaseLevel >= 20 && + JobLevel >= 6 && + Zeny >= 1000 && + (CRAFTQUEST || MPQUEST) && + countitem(TulimsharGuardCard) && + countitem(FishingRod)); +} + function luaAssignTask4 { + next; return; } // Inn Arc @@ -345,9 +424,19 @@ function luaTask4 { return; } +function luaCheckTask4 { + return (BaseLevel >= 20 && + JobLevel >= 6 && + Zeny >= 1000 && + (CRAFTQUEST || MPQUEST) && + countitem(TulimsharGuardCard) && + countitem(FishingRod)); +} + function luaAssignTask5 { + next; return; } // Your Report, the plan @@ -356,6 +445,15 @@ function luaTask5 { return; } +function luaCheckTask5 { + return (BaseLevel >= 20 && + JobLevel >= 6 && + Zeny >= 1000 && + (CRAFTQUEST || MPQUEST) && + countitem(TulimsharGuardCard) && + countitem(FishingRod)); +} + // Then we jump to L_Complete -- cgit v1.2.3-70-g09d2