summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-28 11:12:10 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-28 11:12:10 -0300
commit823c055d4fef95524c6898517962b42dc866111f (patch)
treef7cfa20127ac682f8516eda3dc68e5c9c968ec90
parent8fb9a82849539c346c1ff20a25858dfa6b864f58 (diff)
downloadserverdata-823c055d4fef95524c6898517962b42dc866111f.tar.gz
serverdata-823c055d4fef95524c6898517962b42dc866111f.tar.bz2
serverdata-823c055d4fef95524c6898517962b42dc866111f.tar.xz
serverdata-823c055d4fef95524c6898517962b42dc866111f.zip
All tiers registered, penalty TODO
-rw-r--r--db/constants.conf4
-rw-r--r--npc/craft/options.txt91
2 files changed, 90 insertions, 5 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 8ff1f1b67..0b40dba1f 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -4376,9 +4376,9 @@ constants_db: {
CRGROUP_SCRESIST: 512
CRGROUP_SCINFLICT: 1024
CRGROUP_MANAUSE: 2048
- CRGROUP_BOSSDEF: 4096
+ CRGROUP_BOSSATK: 4096
// Final tier
- CRGROUP_EXPUP: 8192
+ CRGROUP_FINAL: 8192
comment__: "Emotes"
// TMW2 Emotes
diff --git a/npc/craft/options.txt b/npc/craft/options.txt
index ab5b7dcf7..63757d3d9 100644
--- a/npc/craft/options.txt
+++ b/npc/craft/options.txt
@@ -198,10 +198,95 @@ function script csys_Generate {
.@stk+=1;
}
- // Clear the dummies
- array_remove(@csys_attr, DeathPenalty);
- array_remove(@csys_penalty, DeathPenalty);
+ /////////////////////////////////////////////////////////////
+ // Third tier
+ if (.@gid & CRGROUP_SCRESIST) {
+ .@lvl=CRAFTSYS[CRGROUP_SCRESIST];
+ if (.@lvl >= 1) {
+ array_push(@csys_attr, IOPT_SCRESIST_POISON);
+ }
+ if (.@lvl >= 2) {
+ array_push(@csys_attr, IOPT_SCRESIST_SILENCE);
+ }
+ if (.@lvl >= 3) {
+ array_push(@csys_attr, IOPT_SCRESIST_BLIND);
+ }
+ if (.@lvl >= 4) {
+ array_push(@csys_attr, IOPT_SCRESIST_CURSE);
+ }
+ array_push(@csys_penalty, VAR_ATTPOWER);
+ array_push(@csys_penalty, VAR_ATTMPOWER);
+
+ // Update averages
+ .@avg+=.@lvl;
+ .@stk+=1;
+ }
+ if (.@gid & CRGROUP_SCINFLICT) {
+ .@lvl=CRAFTSYS[CRGROUP_SCINFLICT];
+ if (.@lvl >= 1) {
+ array_push(@csys_attr, IOPT_SCPROVOKE_POISON);
+ }
+ if (.@lvl >= 2) {
+ array_push(@csys_attr, IOPT_SCPROVOKE_SILENCE);
+ }
+ if (.@lvl >= 3) {
+ array_push(@csys_attr, IOPT_SCPROVOKE_BLIND);
+ }
+ if (.@lvl >= 4) {
+ array_push(@csys_attr, IOPT_SCPROVOKE_CURSE);
+ }
+ array_push(@csys_penalty, VAR_ATTPOWER);
+ array_push(@csys_penalty, VAR_ATTMPOWER);
+
+ // Update averages
+ .@avg+=.@lvl;
+ .@stk+=1;
+ }
+ if (.@gid & CRGROUP_MANAUSE) {
+ .@lvl=CRAFTSYS[CRGROUP_MANAUSE];
+ if (.@lvl >= 1) {
+ array_push(@csys_attr, SP_DRAIN);
+ }
+ if (.@lvl >= 5) {
+ array_push(@csys_attr, DEC_SP_CONSUMPTION);
+ }
+ array_push(@csys_penalty, VAR_ATTPOWER);
+ array_push(@csys_penalty, VAR_ATTMPOWER);
+
+ // Update averages
+ .@avg+=.@lvl;
+ .@stk+=1;
+ }
+ if (.@gid & CRGROUP_BOSSATK) {
+ .@lvl=CRAFTSYS[CRGROUP_BOSSATK];
+ if (.@lvl >= 1) {
+ array_push(@csys_attr, HP_DRAIN);
+ }
+ if (.@lvl >= 5) {
+ array_push(@csys_attr, CLASS_DAMAGE_BOSS_TARGET);
+ }
+ array_push(@csys_penalty, VAR_ATTPOWER);
+ array_push(@csys_penalty, VAR_ATTMPOWER);
+
+ // Update averages
+ .@avg+=.@lvl;
+ .@stk+=1;
+ }
+
+ /////////////////////////////////////////////////////////////
+ // Final tier (needs minimum lv 3)
+ if (.@gid & CRGROUP_FINAL) {
+ .@lvl=CRAFTSYS[CRGROUP_FINAL];
+ if (.@lvl >= 3) {
+ array_push(@csys_attr, IOPT_EXPGAIN);
+ }
+
+ // Update averages
+ .@avg+=.@lvl;
+ .@stk+=1;
+ }
+ ///////////////////////////////
// Return the average level
if (!.@stk)
return 0;