diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-01-22 13:48:22 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-01-22 13:48:22 -0300 |
commit | fa05e3681ca0088c6107cc6ff634facecdb824c9 (patch) | |
tree | 7b4ce8b903d17fee8763aa4f7489435f62ebd8ee /npc/craft/options.txt | |
parent | 6778129b97fff9b5d6d3246e2df430b0f65b6800 (diff) | |
download | serverdata-fa05e3681ca0088c6107cc6ff634facecdb824c9.tar.gz serverdata-fa05e3681ca0088c6107cc6ff634facecdb824c9.tar.bz2 serverdata-fa05e3681ca0088c6107cc6ff634facecdb824c9.tar.xz serverdata-fa05e3681ca0088c6107cc6ff634facecdb824c9.zip |
Correct bug found by Povo
Diffstat (limited to 'npc/craft/options.txt')
-rw-r--r-- | npc/craft/options.txt | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/npc/craft/options.txt b/npc/craft/options.txt index 8909045a0..6cc7e585d 100644 --- a/npc/craft/options.txt +++ b/npc/craft/options.txt @@ -27,7 +27,7 @@ function script csys_equip { return (isequippedcnt(BlacksmithAxe, Monocle)); } -// csys_Generate( cr_id{, preserve} ) +// csys_Generate( cr_id{, preserve, override} ) // Return average level function script csys_Generate { .@gid=getarg(0); @@ -35,6 +35,7 @@ function script csys_Generate { deletearray(@csys_attr); deletearray(@csys_penalty); } + .@OVR=getarg(2, false); //.@lvl=getd("CRAFTSYS["+.@gid+"]"); .@avg=0; .@stk=0; @@ -42,7 +43,7 @@ function script csys_Generate { ///////////////////////////////////////////////////////////// // Basic tier if (.@gid & CRGROUP_BASE) { - .@lvl=CRAFTSYS[CRGROUP_BASE]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_BASE]); if (.@lvl >= 1) { array_push(@csys_attr, VAR_STRAMOUNT); array_push(@csys_attr, VAR_INTAMOUNT); @@ -71,7 +72,7 @@ function script csys_Generate { ///////////////////////////////////////////////////////////// // First tier if (.@gid & CRGROUP_ATK) { - .@lvl=CRAFTSYS[CRGROUP_ATK]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_ATK]); if (.@lvl >= 1) { array_push(@csys_attr, VAR_ATTPOWER); array_push(@csys_attr, VAR_ATTMPOWER); @@ -88,7 +89,7 @@ function script csys_Generate { .@stk+=1; } if (.@gid & CRGROUP_DEF) { - .@lvl=CRAFTSYS[CRGROUP_DEF]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_DEF]); if (.@lvl >= 1) { array_push(@csys_attr, VAR_ITEMDEFPOWER); array_push(@csys_attr, VAR_MDEFPOWER); @@ -105,7 +106,7 @@ function script csys_Generate { .@stk+=1; } if (.@gid & CRGROUP_ACC) { - .@lvl=CRAFTSYS[CRGROUP_ACC]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_ACC]); if (.@lvl >= 1) { array_push(@csys_attr, VAR_HITSUCCESSVALUE); } @@ -124,7 +125,7 @@ function script csys_Generate { .@stk+=1; } if (.@gid & CRGROUP_EVD) { - .@lvl=CRAFTSYS[CRGROUP_EVD]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_EVD]); if (.@lvl >= 1) { array_push(@csys_attr, VAR_AVOIDSUCCESSVALUE); } @@ -143,7 +144,7 @@ function script csys_Generate { ///////////////////////////////////////////////////////////// // Second tier if (.@gid & CRGROUP_REGEN) { - .@lvl=CRAFTSYS[CRGROUP_REGEN]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_REGEN]); if (.@lvl >= 1) { array_push(@csys_attr, VAR_HPACCELERATION); } @@ -157,7 +158,7 @@ function script csys_Generate { .@stk+=1; } if (.@gid & CRGROUP_SPEED) { - .@lvl=CRAFTSYS[CRGROUP_SPEED]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_SPEED]); if (.@lvl >= 1) { array_push(@csys_attr, VAR_PLUSASPD); } @@ -174,7 +175,7 @@ function script csys_Generate { .@stk+=1; } if (.@gid & CRGROUP_DOUBLE) { - .@lvl=CRAFTSYS[CRGROUP_DOUBLE]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_DOUBLE]); if (.@lvl >= 1) { array_push(@csys_attr, IOPT_CRITDMG); } @@ -188,7 +189,7 @@ function script csys_Generate { .@stk+=1; } if (.@gid & CRGROUP_MAXPC) { - .@lvl=CRAFTSYS[CRGROUP_MAXPC]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_MAXPC]); if (.@lvl >= 1) { array_push(@csys_attr, VAR_MAXHPPERCENT); array_push(@csys_attr, VAR_MAXSPPERCENT); @@ -206,7 +207,7 @@ function script csys_Generate { ///////////////////////////////////////////////////////////// // Third tier if (.@gid & CRGROUP_SCRESIST) { - .@lvl=CRAFTSYS[CRGROUP_SCRESIST]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_SCRESIST]); if (.@lvl >= 1) { array_push(@csys_attr, IOPT_SCRESIST_POISON); } @@ -227,7 +228,7 @@ function script csys_Generate { .@stk+=1; } if (.@gid & CRGROUP_SCINFLICT) { - .@lvl=CRAFTSYS[CRGROUP_SCINFLICT]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_SCINFLICT]); if (.@lvl >= 1) { array_push(@csys_attr, IOPT_SCPROVOKE_POISON); } @@ -251,7 +252,7 @@ function script csys_Generate { .@stk+=1; } if (.@gid & CRGROUP_MANAUSE) { - .@lvl=CRAFTSYS[CRGROUP_MANAUSE]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_MANAUSE]); if (.@lvl >= 1) { array_push(@csys_attr, SP_DRAIN); } @@ -266,7 +267,7 @@ function script csys_Generate { .@stk+=1; } if (.@gid & CRGROUP_BOSSATK) { - .@lvl=CRAFTSYS[CRGROUP_BOSSATK]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_BOSSATK]); if (.@lvl >= 1) { array_push(@csys_attr, HP_DRAIN); } @@ -284,7 +285,7 @@ function script csys_Generate { ///////////////////////////////////////////////////////////// // Final tier (needs minimum lv 3) if (.@gid & CRGROUP_FINAL) { - .@lvl=CRAFTSYS[CRGROUP_FINAL]; + .@lvl=(.@OVR ? 100 : CRAFTSYS[CRGROUP_FINAL]); if (.@lvl >= 1) { array_push(@csys_attr, IOPT_EXPGAIN); } @@ -650,7 +651,7 @@ function script csys_ApplyPerfect { .@sc=getarg(2, CRAFTSYS_CURRENT); // Generate lists, disregarding level - csys_Generate(.@sc); + csys_Generate(.@sc, false, true); // @csys_attr → Available attributes // @csys_penalty → Penalty attribute array |