summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-01-29 01:03:03 -0300
committerJesusaves <cpntb1@ymail.com>2020-01-29 01:03:03 -0300
commit331dedfce9a805c6b46e23495e25ae701452eecc (patch)
treecd4d918c72a4c1bcca6c80357390da4578a54d00
parent36c45b01efbf74e8fbdcc2eb312b6c910f49a3f2 (diff)
downloadserverdata-331dedfce9a805c6b46e23495e25ae701452eecc.tar.gz
serverdata-331dedfce9a805c6b46e23495e25ae701452eecc.tar.bz2
serverdata-331dedfce9a805c6b46e23495e25ae701452eecc.tar.xz
serverdata-331dedfce9a805c6b46e23495e25ae701452eecc.zip
Tolchi: Take in account armor special calculation
Fix a bug of .@bonus not being set. Fix a bug on Event Equipment
-rw-r--r--db/re/item_db.conf4
-rw-r--r--npc/005-4/tolchi.txt17
2 files changed, 17 insertions, 4 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index e32a44a77..3ef8c223d 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -14088,6 +14088,7 @@ item_db: (
id7412: 1
id7413: 1
id7414: 1
+ id7419: 1
}
Trade: {
notrade: true
@@ -14130,6 +14131,7 @@ item_db: (
id7412: 1
id7413: 1
id7414: 1
+ id7419: 1
}
Trade: {
notrade: true
@@ -14176,6 +14178,7 @@ item_db: (
id7412: 1
id7413: 1
id7414: 1
+ id7419: 1
}
Trade: {
notrade: true
@@ -14220,6 +14223,7 @@ item_db: (
id7412: 1
id7413: 1
id7414: 1
+ id7419: 1
}
Trade: {
notrade: true
diff --git a/npc/005-4/tolchi.txt b/npc/005-4/tolchi.txt
index 417a3e47c..a2c2c0f33 100644
--- a/npc/005-4/tolchi.txt
+++ b/npc/005-4/tolchi.txt
@@ -292,37 +292,46 @@ function tolchi_tweaks {
Zeny=Zeny-.@price;
// Options which Tolchi knows
- setarray .@vartps, 0,
+ setarray @csys_attr, 0,
IOPT_RICHNESS, 11,
IOPT_EXPGAIN, 9,
IOPT_CRITDMG, 25,
VAR_HPACCELERATION, 30,
VAR_MAXHPAMOUNT, 35;
+ // Armor fix
+ if (getiteminfo(.@handle, ITEMINFO_TYPE) == IT_ARMOR) {
+ csys_ArmorFix();
+ .@lv=max(1, .@lv/4);
+ }
+
// Select a bonus and purge it
- .@vartp=relative_array_random(.@vartps);
+ .@vartp=relative_array_random(@csys_attr);
.@popindex=getarrayindex(.@vartp);
deletearray(.@popindex, 1);
deletearray(.@popindex, 1);
// Apply the bonus
+ .@bonus=csys_Multiplier(.@lv);
setitemoptionbyindex(.@id, 0, .@vartp, .@bonus);
// Re-roll: Easier for lower levels. Equip based.
if (rand2(1000) < 250-(.@lv*2)) {
- .@vartp=relative_array_random(.@vartps);
+ .@vartp=relative_array_random(@csys_attr);
.@popindex=getarrayindex(.@vartp);
deletearray(.@popindex, 1);
deletearray(.@popindex, 1);
+ .@bonus=csys_Multiplier(.@lv);
setitemoptionbyindex(.@id, 1, .@vartp, .@bonus);
}
// Final re-roll: Easier for lower levels. Equip based. Nearly impossible.
if (rand2(10000) < 250-(.@lv*2)) {
- .@vartp=relative_array_random(.@vartps);
+ .@vartp=relative_array_random(@csys_attr);
.@popindex=getarrayindex(.@vartp);
deletearray(.@popindex, 1);
deletearray(.@popindex, 1);
+ .@bonus=csys_Multiplier(.@lv);
setitemoptionbyindex(.@id, 1, .@vartp, .@bonus);
}