diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-07-25 22:06:55 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-07-25 22:06:55 -0300 |
commit | e8453063f688ab75f6cd31a4f8d8b63aaebb8208 (patch) | |
tree | dbd81f374b054448cad38027205106139ecf7bf0 /npc | |
parent | 7c53677b79dbc4d79f9964475c22193471c54b47 (diff) | |
download | serverdata-e8453063f688ab75f6cd31a4f8d8b63aaebb8208.tar.gz serverdata-e8453063f688ab75f6cd31a4f8d8b63aaebb8208.tar.bz2 serverdata-e8453063f688ab75f6cd31a4f8d8b63aaebb8208.tar.xz serverdata-e8453063f688ab75f6cd31a4f8d8b63aaebb8208.zip |
Raise Alcohol EXPUP values and expire them on death.
Beer: +5% EXP, Wine: +12% EXP. All values can go up to double with players,
capped to the number of players on a 10x10 square from you.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/items/alcohol.txt | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/npc/items/alcohol.txt b/npc/items/alcohol.txt index 4f132fd52..81c6a6bd0 100644 --- a/npc/items/alcohol.txt +++ b/npc/items/alcohol.txt @@ -49,27 +49,27 @@ OnUse: // Default value is 1 minute per alcohol point - you'll be somber after at most two hours. // Taste is affected by users near you. - // Each user raises exp bonus in 1%, capped to twice the beverage taste + // Each user raises exp bonus in 1%, capped to the beverage taste // If you are with many people, drink a better beverage! ;-) getmapxy(.@m$, .@x, .@y, 0); .@bonus=getareausers(.@m$, .@x-10, .@y-10, .@x+10, .@y+10)-1; - @taste+=min(@taste*2, .@bonus); + @taste+=min(@taste, .@bonus); // Alcohol EXP Bonus - ponderate average, so having more VIT doesn't means // more experience - only more time (be careful when mixing alcohol!) - .@v=remaining_bonus(SC_CASH_PLUSEXP, true); - .@t=remaining_bonus(SC_CASH_PLUSEXP, false)/1000; + .@v=remaining_bonus(SC_OVERLAPEXPUP, true); + .@t=remaining_bonus(SC_OVERLAPEXPUP, false)/1000; if (.@t) .@val1 = ponderate_avg(@taste, @Alcohol, .@v, .@t); else .@val1 = @taste; // Put the delay in ms. - .@delay = remaining_bonus(SC_CASH_PLUSEXP, false); + .@delay = remaining_bonus(SC_OVERLAPEXPUP, false); .@delay = .@t + @Alcohol*.@deltatime; // Reset EXP Bonus based on the new cumulative delay and average exp bonus - sc_end SC_CASH_PLUSEXP; - sc_start SC_CASH_PLUSEXP, .@delay, .@val1; + sc_end SC_OVERLAPEXPUP; + sc_start SC_OVERLAPEXPUP, .@delay, .@val1; // Recalculate Alcohol Threshold and time ALC_THRESHOLD+=@Alcohol; @@ -78,11 +78,11 @@ OnUse: ALC_DELAYTIME+=@Alcohol*.@deltatime; // Debug comment if you need to check stuff - //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); + //debugmes "%d %d | %d %d | f t ", remaining_bonus(SC_OVERLAPEXPUP, false), remaining_bonus(SC_OVERLAPEXPUP, true), remaining_bonus(SC_ATTHASTE_INFINITY, false), remaining_bonus(SC_ATTHASTE_INFINITY, true); // For debuff I'll use inc_sc_bonus utilities (exp gain = atk speed loss) - @min=-(remaining_bonus(SC_CASH_PLUSEXP, true)*2); - @max=-(remaining_bonus(SC_CASH_PLUSEXP, true)*2); + @min=-(remaining_bonus(SC_OVERLAPEXPUP, true)*2); + @max=-(remaining_bonus(SC_OVERLAPEXPUP, true)*2); @type=SC_ATTHASTE_INFINITY; @delay=@Alcohol*(.@deltatime/1000); doevent "inc_sc_bonus::OnUse"; |