diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-04-10 13:26:10 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-04-10 13:26:10 -0300 |
commit | 10be099b9bc4eff2597bf17a11d4d91aa43e6f9d (patch) | |
tree | 5b3204ffb36c185fc9ccb374e5c0349def8698d3 /npc/items | |
parent | d41bdcb9da327cf7268449194fc0ed221d0b4464 (diff) | |
download | serverdata-10be099b9bc4eff2597bf17a11d4d91aa43e6f9d.tar.gz serverdata-10be099b9bc4eff2597bf17a11d4d91aa43e6f9d.tar.bz2 serverdata-10be099b9bc4eff2597bf17a11d4d91aa43e6f9d.tar.xz serverdata-10be099b9bc4eff2597bf17a11d4d91aa43e6f9d.zip |
Reasonable and working
Diffstat (limited to 'npc/items')
-rw-r--r-- | npc/items/alcohol.txt | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/npc/items/alcohol.txt b/npc/items/alcohol.txt index d1a519d00..8920a45fb 100644 --- a/npc/items/alcohol.txt +++ b/npc/items/alcohol.txt @@ -15,7 +15,7 @@ // When drunk, attack speed is lowered but exp gain is increased. // Attack Speed Reductor: SC_ATTHASTE_INFINITY // Max HP Reductor: SC_INCMHPRATE -// EXP Increaser: SC_OVERLAPEXPUP +// EXP Increaser: SC_CASH_PLUSEXP - script alcohol_sc -1,{ @@ -30,13 +30,12 @@ if (getarg(1)) return getstatus(getarg(0), 1); else - return getstatus(getarg(0), 4); // Shouldn't it be 5? + return getstatus(getarg(0), 5); // Shouldn't it be 5? } return 0; } OnUse: - debugmes "I'm being run!"; if (@Alcohol <= 0) close; // Do you have enough vitality to hold your beer? .@vit=readparam(bVit); @@ -46,7 +45,7 @@ OnUse: sc_start SC_CONFUSION, 5000, 0, 10000, SCFLAG_NOAVOID; // Warning, forces user to use @resync! end; } - debugmes "It's safe to drink!"; + debugmes "%d %d | %d %d | f t ", remaining_bonus(SC_CASH_PLUSEXP, false), remaining_bonus(SC_CASH_PLUSEXP, true), remaining_bonus(SC_ATTHASTE_INFINITY, false), remaining_bonus(SC_ATTHASTE_INFINITY, true); // Taste is affected by users near you. // Each user raises exp bonus in 1%, capped to the beverage taste // If you are with many people, drink a better beverage! ;-) @@ -54,35 +53,31 @@ OnUse: .@bonus=getareausers(.@m$, .@x-10, .@y-10, .@x+10, .@y+10); @taste+=min(@taste, .@bonus); - debugmes "You should get exp!"; // Put the delay in ms. Each Alcohol point is 10 minutes. - .@delay = remaining_bonus(SC_OVERLAPEXPUP, false); + .@delay = remaining_bonus(SC_CASH_PLUSEXP, false); .@delay += @Alcohol*600*1000; // Alcohol EXP Bonus sums to previous exp bonus - .@val1 = remaining_bonus(SC_OVERLAPEXPUP, true); + .@val1 = remaining_bonus(SC_CASH_PLUSEXP, true); .@val1 += @taste; // Reset EXP Bonus sc_end SC_CASH_PLUSEXP; sc_start SC_CASH_PLUSEXP, .@delay, .@val1; - debugmes "You attack too fast!"; // Same goes for attack speed debuff - // Except delay does not stack, and malus is recalculated - .@delay = @Alcohol*600*1000; - .@val1 = ALC_THRESHOLD+@Alcohol; + // Except malus is recalculated + .@delay = remaining_bonus(SC_ATTHASTE_INFINITY, false)+@Alcohol*600*1000; + .@val1 = (ALC_THRESHOLD+@Alcohol)/2; // Reset Attack Speed Debuff sc_end SC_ATTHASTE_INFINITY; sc_start SC_ATTHASTE_INFINITY, .@delay, -.@val1; - debugmes "Stop drinking!"; // Recalculate Alcohol Threshold and time ALC_THRESHOLD+=@Alcohol; if (ALC_DELAYTIME < gettimetick(2)) ALC_DELAYTIME=gettimetick(2); ALC_DELAYTIME+=@Alcohol*600*1000; - debugmes "I'm done!"; close; } |