diff options
-rw-r--r-- | db/quest_db.conf | 4 | ||||
-rw-r--r-- | npc/012-1/guards.txt | 75 | ||||
-rw-r--r-- | npc/functions/util.txt | 8 |
3 files changed, 84 insertions, 3 deletions
diff --git a/db/quest_db.conf b/db/quest_db.conf index 56e0fc712..7d3c17ddb 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -269,6 +269,10 @@ quest_db: ( Id: 100 Name: "HurnscaldQuest_Woody" }, +{ + Id: 101 + Name: "HurnscaldQuest_Lieutenant" +}, // ID 111 to 130: Nivalis Quests { diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt index c0dbc798f..effc5cc9f 100644 --- a/npc/012-1/guards.txt +++ b/npc/012-1/guards.txt @@ -5,6 +5,8 @@ // Protect Hurnscald 012-1,71,24,0 script Lieutenant Paul NPC_PLAYER,{ + .@q=getq(HurnscaldQuest_Lieutenant); + .@k=getq2(HurnscaldQuest_Lieutenant); // The Monster King guild have a special menu if (!$HURNS_LIBDATE && is_admin()) goto L_Admus; if (strcharinfo(2) == "Monster King") goto L_MKControl; @@ -16,8 +18,77 @@ next; mesn; mesq l("But we are working day and night. We hope that soon, more people come out and this place gets lively again."); + if (BaseLevel >= 20 && MPQUEST && .@q < 10) goto L_Quest; close; +// Paul's quest +L_Quest: + next; + // Quest State, Legacy value + @fc=0; + if (.@q == 0 && BaseLevel >= 20) @fc=1; + if (.@q == 1 && BaseLevel >= 22) @fc=2; + if (.@q == 2 && BaseLevel >= 24) @fc=3; + if (.@q == 3 && BaseLevel >= 26) @fc=4; + if (.@q == 4 && BaseLevel >= 28) @fc=5; + if (.@q == 5 && BaseLevel >= 30) @fc=6; + if (.@q == 6 && BaseLevel >= 32) @fc=7; + if (.@q == 7 && BaseLevel >= 34) @fc=8; + if (.@q == 8 && BaseLevel >= 36) @fc=9; + if (.@q == 9 && BaseLevel >= 38) @fc=10; + if (.@q == 10 && BaseLevel >= 40) @fc=11; + if (@fc) + goto L_Assign; + mesn; + mesq l("I see you are a Monster Hunting Quest Participant, right? I don't need your help right now, but maybe later, who knows?"); + close; + +L_Assign; + // 2 ** 0 = 1 * 100 = 100 mob points + // 2 ** 1 = 2 * 99 = 198 mob points + // 2 ** 2 = 4 * 98 = 392 mob points + // ... + @rq=(2**(@fc-1))*(101-@fc); + + // Check if you already met objective + if (.@k > 0 && Mobpt >= .@k+@rq) { + setq HurnscaldQuest_Lieutenant, @fc, 0; + Mobpt-=@rq; + mesn; + mesq l("Good job collecting the monster points for me. Here's your reward."); + @xp=1000; + // reward is 30% from reference level exp to level up + switch (@fc) { + case 1: @xp=486; break; + case 2: @xp=597; break; + case 3: @xp=751; break; + case 4: @xp=1028; break; + case 5: @xp=1342; break; + case 6: @xp=2399; break; + case 7: @xp=3128; break; + case 8: @xp=4190; break; + case 9: @xp=5303; break; + case 10: @xp=6532; break; + case 11: @xp=10234; break; + } + getexp @xp, @fc*3; + close; + } + // Assign quest + mesn; + mesq l("Maybe you can help our city guard. I see you are a Monster Hunting Quest Participant, right?"); + next; + mesn; + mesq l("So, I'm placing a special bounty for @@ Mob Points.", @rq); + mesq l("You currently have @@, so if you accept and come back later with @@ Mob Points, I'll mark the bounty as complete.", Mobpt, Mobpt+@rq); + next; + mesc l("Accept quest?"); + if (askyesno() == ASK_YES) { + setq HurnscaldQuest_Lieutenant, @fc-1, Mobpt; + } + close; + +// Liberation Day facility L_Admus: mesc l("Protip: Use @hide to don't interfer."); mes l("Determine Team Size (If everyone is ready and stdby at Tulimshar, use: @@. Minimum 2 players.)", getusers(1)-1); @@ -61,14 +132,16 @@ L_Admus: disablenpc "Luffyx"; disablenpc "Shoppa Kep"; announce "##1Hear ya, hear ya! There are "+str($@BG1_SIZE-1)+" vacant slots at Hurnsguard to LIBERATE HURNSCALD!", bc_all | bc_npc; - mes "##1You are assigned to Monster Forces. Do not leave Hurnscald."; + mesc "You are assigned to Monster Forces. Do not leave Hurnscald.", 1; close; +// Monster King Siege (deprecated) L_MKControl: mesn; mes l("Oh noes! You've found the Hurnscald control panel!"); close; +// Hurnscald Liberation Day Core Logic OnSet: .CYCLES=0; waitingroom("Monster Army", 2, "start#hurns_lib::OnReadyCheck", 1); diff --git a/npc/functions/util.txt b/npc/functions/util.txt index c12a883bf..d2f67bfab 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -219,7 +219,7 @@ function script reputation { - // Hurnscald Quests (8 points) + // Hurnscald Quests (9 points) } else if (getarg(0) == "Hurns") { // Alan Quest (+1 rep) @@ -261,8 +261,12 @@ function script reputation { if (getq(HurnscaldQuest_Woody) >= 5) .@nr=.@nr+1; + // Lieutenant Quest (+1 rep) + if (getq(HurnscaldQuest_Lieutenant) >= 10) + .@nr=.@nr+1; + // HURNSCALD Magical Forumula - .@nr=.@nr*100/8; + .@nr=.@nr*100/9; |