From 6648bb2b5e6d8b7a04437474c763c72bf533a91a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 01:37:30 -0300 Subject: Fix display bug on Ishi --- npc/003-1/ishi.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/003-1/ishi.txt b/npc/003-1/ishi.txt index 5eff1e473..9ebcc83d9 100644 --- a/npc/003-1/ishi.txt +++ b/npc/003-1/ishi.txt @@ -175,10 +175,10 @@ L_Items: mes ""; mes l("Wow!"); mes l("I can't believe."); - mes l("you got lucky and got a(n) @@!", getitemlink(.@reward$)); + mes l("you got lucky and got a(n) @@!", getitemlink(.@reward)); mes ""; } else { - mesq l("You received one @@!", getitemlink(.@reward$)); + mesq l("You received one @@!", getitemlink(.@reward)); } } -- cgit v1.2.3-70-g09d2 From 4df3fdd86e26090675d009640b753f926f4e8bec Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 09:55:44 -0300 Subject: Scholarship Badge (ID 911) - Grants you a free skill learning and is used first. --- db/re/item_db.conf | 18 ++++++++++++++++++ npc/functions/util.txt | 7 +++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index e6e842764..dfaa4ea4e 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -5424,6 +5424,24 @@ item_db: ( Refine: false }, // +{ + Id: 911 + AegisName: "ScholarshipBadge" + Name: "Scholarship Badge" + Type: "IT_ETC" + Buy: 10000 + Sell: 3500 + Weight: 1 + Refine: false + ViewSprite: 911 + Trade: { + notrade: true + nodrop: true + noselltonpc: true + nomail: true + noauction: true + } +}, // { Id: 1000 diff --git a/npc/functions/util.txt b/npc/functions/util.txt index f41c343fc..835eae988 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -639,12 +639,15 @@ function script mlearn { next; if (askyesno() == ASK_NO) return true; - if (countitem(.@it) < .@am) + if (countitem(.@it) < .@am && !(countitem(ScholarshipBadge))) return false; if (!sk_canlvup(.@ap)) return false; - delitem .@it, .@am; + if (countitem(ScholarshipBadge)) + delitem ScholarshipBadge, 1; + else + delitem .@it, .@am; sk_lvup(.@sk, .@ap); return true; } -- cgit v1.2.3-70-g09d2 From e1d443ae550dfdab64470c1a336b66b5c74efa81 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 09:58:42 -0300 Subject: Trickmaster class is now Open For All. You now start with 1 MSP. You can start with the following skills: Freecast, Backsliding, Fire Wall or Throttle. We advise Fire Wall, of course... --- npc/003-0/trickmaster.txt | 2 +- npc/functions/util.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/npc/003-0/trickmaster.txt b/npc/003-0/trickmaster.txt index 8a51c2c58..19c590955 100644 --- a/npc/003-0/trickmaster.txt +++ b/npc/003-0/trickmaster.txt @@ -5,7 +5,7 @@ // Trickmaster of Tricksters Class 003-0,40,30,0 script Trickmaster NPC_SITTED_NINJA,{ - if (!MAGIC_LVL) goto L_NoMagic; + //if (!MAGIC_LVL) goto L_NoMagic; mes l(".:: Trickster Class ::."); mesc l("Specialized in miscellaneous skills."); next; diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 835eae988..fcec7a462 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -592,6 +592,8 @@ function script sk_maxpoints { .@val+=(MAGIC_LVL/2); // Excluding first 15, 1 point every 10 job levels .@val+=((JobLevel-15)/10); + // 1 point per being a player + .@val+=1; // 1 point per skill permit level .@val+=getskilllv(TMW2_SKILLPERMIT); return .@val; -- cgit v1.2.3-70-g09d2 From 4cdf3cbcb896acc17a35aeebab61afd772ce70a6 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 10:00:07 -0300 Subject: I think this should be trimmed. --- npc/functions/util.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/functions/util.txt b/npc/functions/util.txt index fcec7a462..6a8c20ca2 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -590,8 +590,8 @@ function script sk_maxpoints { .@val=(MAGIC_LVL)*2; // 1 point every twice magic level .@val+=(MAGIC_LVL/2); - // Excluding first 15, 1 point every 10 job levels - .@val+=((JobLevel-15)/10); + // Excluding first 15, 1 point every 12 job levels + .@val+=((JobLevel-15)/12); // 1 point per being a player .@val+=1; // 1 point per skill permit level -- cgit v1.2.3-70-g09d2 From 615922386c56d473981dad70dce9158fdd135c87 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 10:00:39 -0300 Subject: And capped. --- npc/functions/util.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 6a8c20ca2..82b107138 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -590,8 +590,8 @@ function script sk_maxpoints { .@val=(MAGIC_LVL)*2; // 1 point every twice magic level .@val+=(MAGIC_LVL/2); - // Excluding first 15, 1 point every 12 job levels - .@val+=((JobLevel-15)/12); + // Excluding first 15, 1 point every 12 job levels (Up to JL 75) + .@val+=min(5, ((JobLevel-15)/12)); // 1 point per being a player .@val+=1; // 1 point per skill permit level -- cgit v1.2.3-70-g09d2 From fb9eef59bb30774b0d8c1d1f18fae91aa74c0ae6 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 10:23:32 -0300 Subject: Make Scholarship Badge used last --- npc/functions/util.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 82b107138..d774cd9d2 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -646,7 +646,7 @@ function script mlearn { if (!sk_canlvup(.@ap)) return false; - if (countitem(ScholarshipBadge)) + if (countitem(.@it) < .@am) delitem ScholarshipBadge, 1; else delitem .@it, .@am; -- cgit v1.2.3-70-g09d2 From 9b23a5631f4c193a46556f4afa9f315644459ea5 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 10:24:36 -0300 Subject: 45 minutes on Halinarzo Branch (2h -> 45m) --- npc/009-2/librarian.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/009-2/librarian.txt b/npc/009-2/librarian.txt index 19e43642e..bd3bf5bb6 100644 --- a/npc/009-2/librarian.txt +++ b/npc/009-2/librarian.txt @@ -58,9 +58,9 @@ L_Prologue: mesq l("Ah... I see. You are a lost soul, without parents, lost on the world with only some basic stuff."); next; mesn; - mesq l("Alright, I'll look in the archives. I'll have an answer for you in two hours. Meanwhile, why don't you suppress the bandits on the cliff?"); + mesq l("Alright, I'll look in the archives. I'll have an answer for you in @@. Meanwhile, why don't you suppress the bandits on the cliff?", l("45 minutes")); // Please wait 2 hours - setq General_Narrator, 7, santime()+(60*60*2); + setq General_Narrator, 7, santime()+(60*45); next; mesn; mesq l("Also, Halinarzo is famous for the depleted mana mines in the town. You probably won't find a mana stone there, but it might be cool to look."); -- cgit v1.2.3-70-g09d2 From 736092a43ad4e294da019989c85bfe8f92337356 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 10:25:52 -0300 Subject: Halin Librarian now gives you a [Scholarship Badge] --- npc/009-2/librarian.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/npc/009-2/librarian.txt b/npc/009-2/librarian.txt index bd3bf5bb6..4a471bbea 100644 --- a/npc/009-2/librarian.txt +++ b/npc/009-2/librarian.txt @@ -127,10 +127,13 @@ L_Report: mesn; mesq l("Their first stop was Hurnscald, so please go to Hurnscald Townhall, and speak with the mayor, he can help you getting there. You can't reach there normally, after all."); next; + inventoryplace ScholarshipBadge, 1; mesn; mesq l("Good luck, @@!", strcharinfo(0)); + mesc l("@@ hands you an @@.", .name$, getitemlink(ScholarshipBadge)); next; getexp BaseLevel*750, JobLevel*50;// Reference Levels: (40, 15) + getitem ScholarshipBadge, 1; mesc b(l(".:: Main Quest 2-3 ::.")), 3; mesc l("* Talk to Librarian in Halinarzo"), 2; mesc l("* Return to Hurnscald Townhall"), 9; -- cgit v1.2.3-70-g09d2 From c351742b3647b1f62ea74fa53e5de38d254e336b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 10:43:24 -0300 Subject: Easter Egg --- db/constants.conf | 1 + maps/re/003-1.mcache | Bin 1302 -> 1298 bytes npc/003-0-1/_import.txt | 1 + npc/003-0-1/hiddenwarp.txt | 21 +++++++++++++++++++++ npc/003-0/recepcionist.txt | 2 +- npc/003-1/_warps.txt | 2 ++ 6 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 npc/003-0-1/hiddenwarp.txt diff --git a/db/constants.conf b/db/constants.conf index 16d5c0522..c46df610b 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4269,6 +4269,7 @@ constants_db: { EE_SAXSO: 1 EE_DEMURE: 2 EE_PRSM: 4 + EE_MAGICSCHOOL: 8 comment__: "Teleporter enum" TP_NONE: 0 diff --git a/maps/re/003-1.mcache b/maps/re/003-1.mcache index e87aff702..81b0759c3 100644 Binary files a/maps/re/003-1.mcache and b/maps/re/003-1.mcache differ diff --git a/npc/003-0-1/_import.txt b/npc/003-0-1/_import.txt index 5aa9264e7..0d04be190 100644 --- a/npc/003-0-1/_import.txt +++ b/npc/003-0-1/_import.txt @@ -3,6 +3,7 @@ "npc/003-0-1/_warps.txt", "npc/003-0-1/audsbel.txt", "npc/003-0-1/guards.txt", +"npc/003-0-1/hiddenwarp.txt", "npc/003-0-1/maxime.txt", "npc/003-0-1/professor.txt", "npc/003-0-1/researcher.txt", diff --git a/npc/003-0-1/hiddenwarp.txt b/npc/003-0-1/hiddenwarp.txt new file mode 100644 index 000000000..d6f339b58 --- /dev/null +++ b/npc/003-0-1/hiddenwarp.txt @@ -0,0 +1,21 @@ +// TMW2 Script +// Author: +// Jesusalva +// Easter Egg for Hello World player +// TODO: In future, check player direction + +003-0-1,21,24,0 script #MSchoolRoof NPC_HIDDEN,0,0,{ + end; + +OnTouch: + warp "003-1", 49, 24; + .@q=getq(General_EasterEggs); + + if (!(.@q & EE_MAGICSCHOOL)) { + setq General_EasterEggs, .@q|EE_MAGICSCHOOL; + dispbottom l("For finding an Easter Egg, you got Strange Coins!"); + getitem StrangeCoin, 3; + } + + end; +} diff --git a/npc/003-0/recepcionist.txt b/npc/003-0/recepcionist.txt index 3cb3e89de..db2ae6d98 100644 --- a/npc/003-0/recepcionist.txt +++ b/npc/003-0/recepcionist.txt @@ -2,7 +2,7 @@ // Author: // Jesusalva // Description: -// Magic School recepcionist +// Magic School recepcionist (TODO: Give S. Badge) 003-0,47,44,4 script Recepcionist#003-0 NPC_FEMALE,{ if (getskilllv(TMW2_SKILLPERMIT) == 2 && MAGIC_LVL >= 3 && ST_TIER >= 1) goto L_T3_S0; diff --git a/npc/003-1/_warps.txt b/npc/003-1/_warps.txt index 07b38bbfc..e552f7c33 100644 --- a/npc/003-1/_warps.txt +++ b/npc/003-1/_warps.txt @@ -20,3 +20,5 @@ 003-1,58,54,0 warp #003-1_58_54 0,0,003-1-3,82,82 003-1,25,45,0 warp #003-1_25_45 0,0,003-1-3,37,85 003-1,52,35,0 warp #003-1_52_35 1,0,003-0-1,48,51 +003-1,49,23,0 warp #003-1_49_23 0,0,003-0-1,22,25 +003-1,54,23,0 warp #003-1_54_23 0,0,003-0-1,69,24 -- cgit v1.2.3-70-g09d2 From 165e781e5e9dc30f2e699efa2ec1589d47834f79 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 10:45:59 -0300 Subject: Update Collision Map --- maps/re/003-1.mcache | Bin 1298 -> 1303 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/maps/re/003-1.mcache b/maps/re/003-1.mcache index 81b0759c3..302929038 100644 Binary files a/maps/re/003-1.mcache and b/maps/re/003-1.mcache differ -- cgit v1.2.3-70-g09d2 From bb80326d58849bc55e4f6cf87631587bfc122f41 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 20:54:11 -0300 Subject: Improving an already learned skill now always cost 1 AP. Text will also change accordingly. --- npc/functions/util.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/npc/functions/util.txt b/npc/functions/util.txt index d774cd9d2..0e50e2d30 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -632,11 +632,16 @@ function script mlearn { .@ap=getarg(2); .@it=getarg(3); .@am=getarg(4); + .@learn$=l("learn"); if (getskilllv(.@sk) >= .@ff) { mesc l("You've reached the maximum level for this skill."), 1; return true; } - mesc l("To learn @@ you'll need @@/@@ point(s).", .@sk, .@ap, sk_points()); + if (getskilllv(.@sk)) { + .@ap=1; + .@learn$=l("upgrade"); + } + mesc l("To @@ @@ you'll need @@/@@ point(s).", .@learn$, .@sk, .@ap, sk_points()); mesc l("You'll also need to pay a fee of @@x @@", .@am, getitemlink(.@it)); next; if (askyesno() == ASK_NO) -- cgit v1.2.3-70-g09d2 From 4f87977035126d5a4181fe11d651f2adc0a3399c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 21:00:16 -0300 Subject: You now get a [Scholarship Badge] for free with Recepcionist. Along a nice tutorial! --- npc/003-0/recepcionist.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/npc/003-0/recepcionist.txt b/npc/003-0/recepcionist.txt index db2ae6d98..7bd39ef0f 100644 --- a/npc/003-0/recepcionist.txt +++ b/npc/003-0/recepcionist.txt @@ -15,6 +15,8 @@ next; mesn; mesq l("I hope our new campus get built soon. It'll be much better than here."); + if (!MGQUEST) + goto L_Prologue; if (!MAGIC_LVL) close; next; @@ -36,6 +38,33 @@ goodbye; close; +////////////// +/* Prologue */ +////////////// +L_Prologue: + next; + mesn l("Magic Academy Tutorial"); + mesc l("The Magic Academy System is responsible for learning most skills ingame. For that, you need two things: Magic Skill Points and a reagent."); + next; + mesn l("Magic Academy Tutorial"); + mesc l("The reagent is always the same for the same class. If you do not have enough reagents but have an @@, it'll be used to continue.", getitemlink(ScholarshipBadge)); + next; + mesn l("Magic Academy Tutorial"); + mesc l("Magic Skill Points can be obtained in three ways: By touching a Mana Stone, by signing up in a Special Class (if you have enough magic power) and by having high amounts of Job Level."); + next; + mesn l("Magic Academy Tutorial"); + mesc l("Upgrading a skill level can be done the same away and will always cost a single Magic Skill Point. Job Level points are obtained only after Lv @@, and is a single point each @@ levels.", 15+12, 12); + next; + inventoryplace ScholarshipBadge, 1; + mesn; + mesq l("That being said, I'll give you an @@, which allows you to learn a skill even if you can't pay for it.", getitemlink(ScholarshipBadge)); + next; + mesn; + mesq l("Please note unless you have Magic Powers, obtained from the Mana Seed, all you will be able to learn are small tricks, so please make a wise choice."); + MGQUEST=true; + getitem ScholarshipBadge, 1; + close; + //////////////// /* First Tier */ //////////////// -- cgit v1.2.3-70-g09d2