summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-04-15 00:08:56 -0300
committerJesusaves <cpntb1@ymail.com>2019-04-15 00:08:56 -0300
commita18585d1766acf17ac72beea9aa694a46dcf2b20 (patch)
tree0d07b1b895a2cbc71c5d4e6f522e1041a9e5b94b
parent7f97f3d407933342530082575a9b691498e3df3b (diff)
downloadserverdata-a18585d1766acf17ac72beea9aa694a46dcf2b20.tar.gz
serverdata-a18585d1766acf17ac72beea9aa694a46dcf2b20.tar.bz2
serverdata-a18585d1766acf17ac72beea9aa694a46dcf2b20.tar.xz
serverdata-a18585d1766acf17ac72beea9aa694a46dcf2b20.zip
Fix typo
-rw-r--r--db/re/item_db.conf24
-rw-r--r--npc/items/inc_sc_bonus.txt31
2 files changed, 41 insertions, 14 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 2bbca4d1c..f3544389b 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -2798,6 +2798,7 @@ item_db: (
Weight: 45
Refine: false
ViewSprite: 646
+ Delay: 500
Script: <"
sc_start SC_WALKSPEED,5000,150;
">
@@ -2812,6 +2813,7 @@ item_db: (
Weight: 20
Refine: false
ViewSprite: 647
+ Delay: 500
Script: <"
sc_start SC_INCHIT,20000,40;
">
@@ -2825,6 +2827,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 5;
@max = 10;
@@ -2842,6 +2845,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 10;
@max = 20;
@@ -2859,6 +2863,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 20;
@max = 30;
@@ -2876,6 +2881,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 5;
@max = 10;
@@ -2893,6 +2899,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 10;
@max = 20;
@@ -2910,6 +2917,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 20;
@max = 30;
@@ -2927,6 +2935,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 5;
@max = 10;
@@ -2944,6 +2953,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 10;
@max = 20;
@@ -2961,6 +2971,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 20;
@max = 30;
@@ -2978,6 +2989,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 5;
@max = 10;
@@ -2995,6 +3007,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 10;
@max = 20;
@@ -3012,6 +3025,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 20;
@max = 30;
@@ -3029,6 +3043,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 5;
@max = 10;
@@ -3046,6 +3061,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 10;
@max = 20;
@@ -3063,6 +3079,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 20;
@max = 30;
@@ -3082,11 +3099,12 @@ item_db: (
Sell: 0
Weight: 50
Refine: false
+ Delay: 500
Script: <"
@min = 10;
@max = 10;
@delay = 30;
- @type = SC_MHPRATE;
+ @type = SC_INCMHPRATE;
doevent "inc_sc_bonus::OnUse";
">
},
@@ -3099,11 +3117,12 @@ item_db: (
Sell: 0
Weight: 50
Refine: false
+ Delay: 500
Script: <"
@min = 10;
@max = 10;
@delay = 30;
- @type = SC_MSPRATE;
+ @type = SC_INCMSPRATE;
doevent "inc_sc_bonus::OnUse";
">
},
@@ -3116,6 +3135,7 @@ item_db: (
Sell: 0
Weight: 20
Refine: false
+ Delay: 500
Script: <"
@min = 40;
@max = 40;
diff --git a/npc/items/inc_sc_bonus.txt b/npc/items/inc_sc_bonus.txt
index c4187d4d1..ac1dd8d9b 100644
--- a/npc/items/inc_sc_bonus.txt
+++ b/npc/items/inc_sc_bonus.txt
@@ -19,31 +19,38 @@ OnUse:
if (@delay <= 0) close;
// Get the bonus value
- .@bonus=rand(@min, @max);
+ if (@min != @max)
+ .@bonus=rand(@min, @max);
+ else
+ .@bonus=any(@min, @max);
// Remaining time and effect conversion
- @v=getstatus(@type, 1);
- @t=getstatus(@type, 5);
+ .@v=getstatus(@type, 1);
+ .@t=getstatus(@type, 5);
// Convert remaining time to seconds, rounded down
- if (@t > 1000)
- @t=@t/1000;
+ if (.@t > 1000)
+ .@t=.@t/1000;
else
- @t=0;
+ .@t=0;
// If there was effect previously, get ponderate average
- if (@v > 0)
- @v=(.@bonus*@delay+@v*@t)/(@t+@delay);
+ if (.@v > 0)
+ .@v=((.@bonus*@delay)+(.@v*.@t))/(.@t+@delay);
else
- @v=.@bonus;
+ .@v=.@bonus;
// Update time value to ms and to stack
- @t+=@delay;
- @t*=1000;
+ .@t+=@delay;
+ .@t*=1000;
+
+ // Debug print if needed
+ if (debug || $@GM_OVERRIDE)
+ debugmes "Effect %d (+%d percent) for %d ms", @type, .@bonus, .@t;
// Restart the bonus
sc_end @type;
- sc_start @type,@t,@v;
+ sc_start @type,.@t,.@v;
close;
}