summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2025-08-02 20:47:25 -0300
committerJesusaves <cpntb1@ymail.com>2025-08-02 20:47:25 -0300
commite58dc9b09623b2d36159dd27c51b572e2b5f8147 (patch)
treebd44a903c0f471e58759b107ecd7290761ce6a15
parent8096ae337cb88cc88cf18c60756addf91562e58c (diff)
downloadserverdata-e58dc9b09623b2d36159dd27c51b572e2b5f8147.tar.gz
serverdata-e58dc9b09623b2d36159dd27c51b572e2b5f8147.tar.bz2
serverdata-e58dc9b09623b2d36159dd27c51b572e2b5f8147.tar.xz
serverdata-e58dc9b09623b2d36159dd27c51b572e2b5f8147.zip
This is the JobClass nerf to attack damage, attack speed and evasion.
Prototype stage and other nerfs not implemented. Lets see what ppl think.
-rw-r--r--db/constants.conf14
-rw-r--r--npc/003-0/_import.txt1
-rw-r--r--npc/003-0/fejda.txt88
-rw-r--r--npc/025-1/phoenix.txt1
-rw-r--r--npc/functions/hub.txt35
-rw-r--r--npc/functions/util.txt57
6 files changed, 196 insertions, 0 deletions
diff --git a/db/constants.conf b/db/constants.conf
index ef1023d5a..e7bbd22c7 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -2634,6 +2634,20 @@ constants_db: {
PCB_LEGENDARY: 262144
//PCB_MONEYDROP:
+ comment__: "Classes constants"
+ CLASS_WARRIOR: 1 // Bonus on melee damage
+ CLASS_RANGER: 2 // Bonus on ranged damage
+ CLASS_WIZARD: 4 // Bonus on magic damage
+ CLASS_BLACKSMITH: 8 // Bonus on crafting / brewing / cooking
+ CLASS_HUNTER: 16 // Bonus on MobPt gain and discount on Grants
+ CLASS_MERCHANT: 32 // Bonus on GP earning (+all mobs drop GP)
+ CLASS_TANKER: 64 // Bonus on defense/hp
+ CLASS_RAGGER: 128 // Bonus on crit (berserker)
+ CLASS_PALADIN: 256 // Bonus on attack speed
+ CLASS_NINJA: 512 // Bonus on evasion
+ CLASS_SAGE: 1024 // Bonus on potions/effects
+
+
@include "db/si_config.conf"
@include "conf/import/constants.conf"
}
diff --git a/npc/003-0/_import.txt b/npc/003-0/_import.txt
index d7fe2f96f..ed7cbb23f 100644
--- a/npc/003-0/_import.txt
+++ b/npc/003-0/_import.txt
@@ -2,6 +2,7 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/003-0/_mobs.txt",
"npc/003-0/_warps.txt",
+"npc/003-0/fejda.txt",
"npc/003-0/mainquest.txt",
"npc/003-0/recepcionist.txt",
"npc/003-0/trickmaster.txt",
diff --git a/npc/003-0/fejda.txt b/npc/003-0/fejda.txt
new file mode 100644
index 000000000..d26d13a69
--- /dev/null
+++ b/npc/003-0/fejda.txt
@@ -0,0 +1,88 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Trickmaster of Tricksters Class
+
+003-0,29,42,0 script Fejda Reader NPC_SITTED_NINJA,{
+ // CurrentClasses() MaxClasses() TotalBaseLevel() CLASS_CHANGE and JobClass
+ mesn;
+ mesq l("Heya. I am Fejda Reader, in charge of proofreading the application forms."); // aka. Fedja Beader, but with a couple typos :3
+ next;
+ if (TotalBaseLevel() < 100) {
+ mesn;
+ mesq l("Once you reach 100 total levels, you'll be eligible for a job class.");
+ mesc l("* You still need to earn %d levels.", (100-TotalBaseLevel()));
+ close;
+ }
+ mesn;
+ mesq l("According to these forms, you have %d total levels and may have up to %d job class(es). Their effects increase as your total levels increases.", TotalBaseLevel(), MaxClasses());
+ next;
+ mesn;
+ mesq l("The first job class you select is free, and it is also free to change after every rebirth. Otherwise, you can only change every %d days for the small fee of %s GP.", .Dayem, .GpFee);
+ mesc l("Your current job class(es): %s", CurrentClasses()), 3;
+ if (CLASS_CHANGE > gettimetick(2)) close;
+ next;
+ mesc l("Do you want to change your job class(es)?"), 1;
+ if (askyesnosafe() == ASK_NO) {
+ closeclientdialog;
+ close;
+ }
+ // Do you need to pay the fee?
+ if (!CLASS_CHANGE) {
+ if (Zeny < .GpFee) {
+ mesc l("Not enough money."), 1;
+ close;
+ } else {
+ Zeny -= .GpFee;
+ }
+ }
+
+ // Reset class
+ JobClass = 0;
+ do
+ {
+ mesc l("Which classes do you wish to pick?"), 3;
+
+/*
+O CLASS_WARRIOR: 1 // Bonus on melee damage
+X CLASS_RANGER: 2 // Bonus on ranged damage
+O CLASS_WIZARD: 4 // Bonus on magic damage
+ CLASS_BLACKSMITH: 8 // Bonus on crafting / brewing / cooking
+ CLASS_HUNTER: 16 // Bonus on MobPt gain and discount on Grants
+ CLASS_MERCHANT: 32 // Bonus on GP earning (+all mobs drop GP)
+ CLASS_TANKER: 64 // Bonus on defense/hp
+ CLASS_RAGGER: 128 // Bonus on crit (berserker)
+O CLASS_PALADIN: 256 // Bonus on attack speed
+O CLASS_NINJA: 512 // Bonus on evasion
+ CLASS_SAGE: 1024 // Bonus on potions/effects
+*/
+
+ menuint
+ l("Warrior (atk+)"), CLASS_WARRIOR,
+ l("Wizard (matk+/mp+)"), CLASS_WIZARD,
+ l("Paladin (aspd+)"), CLASS_PALADIN,
+ l("Ninja (eva+)"), CLASS_NINJA;
+
+
+ // If you pick a class you already selected, it'll be unselected
+ // Otherwise, it'll be added
+ JobClass = JobClass ^ @menuret;
+
+ } while (bitmask_count(JobClass) < MaxClasses());
+
+ // Wrap up class change
+ CLASS_CHANGE = gettimetick(2) + (.Dayem * 86400);
+ mesc l("Success!"), 2;
+ mesc l("Your current job class(es): %s", CurrentClasses()), 3;
+ close;
+
+OnInit:
+ .sex = G_FEMALE;
+ .distance = 5;
+ .GpFee = 1000000;
+ .Dayem = 20;
+ end;
+
+}
+
diff --git a/npc/025-1/phoenix.txt b/npc/025-1/phoenix.txt
index 9ae8707e3..92cad50b1 100644
--- a/npc/025-1/phoenix.txt
+++ b/npc/025-1/phoenix.txt
@@ -90,6 +90,7 @@ OnMain:
expandinventory(3);
REBIRTH+=1;
REBIRTH_OVERLEVEL=max(0, BaseLevel-.@blvl-(REBIRTH_OVERLEVEL/REBIRTH));
+ CLASS_CHANGE=0; // reset class change timestamp
resetlvl(3);
sk_lvup(TMW2_DROPS);
if (REBIRTH == 4)
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index f775548e3..a46e7ea58 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -1477,6 +1477,41 @@ function script HUB_PCBonus {
bonus bRestartFullRecover, 75; // Is 75 ignored, or revive with 75% HP
}
+ /* Nerfs introduced disguised as JobClass feature */
+ .@blvl = TotalBaseLevel() - 100;
+ if (.@blvl) {
+ // Warrior
+ if (JobClass & CLASS_WARRIOR)
+ bonus bAtk, .@blvl / 10; // Max +80
+ else
+ bonus bAtk, -(.@blvl / 3); // Max -267
+
+ // Ranger class (OFF)
+ // bonus bLongAtkRate, ?;
+
+ // Wizard
+ if (JobClass & CLASS_WIZARD) {
+ bonus bMatk, .@blvl / 10; // Max +80
+ bonus bMaxSP, .@blvl / 2; // Max +400 MP
+ bonus bSPrecovRate, .@blvl / 25; // Max +32%
+ } else {
+ bonus bMatk, -(.@blvl / 7); // Max -114
+ bonus bSPrecovRate, -(.@blvl / 25); // Max -32%
+ }
+
+ // Paladin
+ if (JobClass & CLASS_PALADIN)
+ bonus bAspd, .@blvl / 50; // Max +16
+ else
+ bonus bAspd, -(.@blvl / 20); // Max -40
+
+ // Ninja
+ if (JobClass & CLASS_NINJA)
+ bonus bFlee, .@blvl / 50; // Max +16
+ else
+ bonus bFlee, -(.@blvl / 20); // Max -40
+ }
+
// Double hack fix
if (isequipped(ExplosiveArrow)) {
if (getiteminfo(getequipid(EQI_HAND_R), ITEMINFO_SUBTYPE) != W_BOW)
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 80a0c6de7..68cd22545 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -733,6 +733,41 @@ function script nard_time {
return INT_MAX;
}
+// Returns your current classes
+// CurrentClasses( {JobClass} )
+function script CurrentClasses {
+ .@cl = getarg(0, JobClass);
+ .@bf$="";
+
+ if (.@cl & CLASS_WARRIOR)
+ .@bf$+="Warrior ";
+ if (.@cl & CLASS_RANGER)
+ .@bf$+="Ranger ";
+ if (.@cl & CLASS_WIZARD)
+ .@bf$+="Wizard ";
+ if (.@cl & CLASS_BLACKSMITH)
+ .@bf$+="Blacksmith ";
+ if (.@cl & CLASS_HUNTER)
+ .@bf$+="Hunter ";
+ if (.@cl & CLASS_MERCHANT)
+ .@bf$+="Merchant ";
+ if (.@cl & CLASS_TANKER)
+ .@bf$+="Tanker ";
+ if (.@cl & CLASS_RAGGER)
+ .@bf$+="Ragger "; // -- Berserker
+ if (.@cl & CLASS_PALADIN)
+ .@bf$+="Paladin ";
+ if (.@cl & CLASS_NINJA)
+ .@bf$+="Ninja ";
+ if (.@cl & CLASS_SAGE)
+ .@bf$+="Sage ";
+
+ // Fallback
+ if (.@bf$ == "")
+ .@bf$ = "None ";
+ return .@bf$;
+}
+
// alignment() → 1 if Good, -1 if Evil, 0 if Neutral
function script alignment {
.@m=getq(HurnscaldQuest_InjuriedMouboo);
@@ -872,6 +907,12 @@ function script sk_points {
return sk_maxpoints()-MAGIC_PTS;
}
+// Returns how many classes you may have
+// MaxClasses()
+function script MaxClasses {
+ return (FINAL_WINNER ? 2 : 1);
+}
+
// Returns true if a skill can be leveled up.
// sk_canlvup( {cost=1} )
function script sk_canlvup {
@@ -1253,6 +1294,22 @@ function script teleporthome {
return;
}
+// Returns your Total Base Level
+// TotalBaseLevel( - )
+function script TotalBaseLevel {
+ .@bl = BaseLevel;
+ if (REBIRTH >= 1) .@bl += 99;
+ if (REBIRTH >= 2) .@bl += 120;
+ if (REBIRTH >= 3) .@bl += 135;
+ if (REBIRTH >= 4) .@bl += 150;
+ if (REBIRTH >= 5) .@bl += 175;
+ //if (REBIRTH >= 6) .@bl += 200;
+ //if (REBIRTH >= 7) .@bl += 250;
+ if (getarg(0, false))
+ .@bl += JobLevel;
+ return .@bl;
+}
+
// Returns TOP 3 Average Level
// TOP3AVERAGELVL( - )
function script TOP3AVERAGELVL {