Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias ABSN {
- var %sqrt 2 ^ -1
- var %number $1 ^ 2
- var %result %number ^ %sqrt
- return %result
- }
- alias ATANN {
- var %x $1 / $absn($1)
- return %x
- }
- alias COUNT_TO_NUMBER {
- return $calc($1 + $ATANN($calc($1 ^ $ATANN($1))) * $ABSN($2))
- }
- alias LIMIT {
- return $max($min($3, $1), $2)
- }
- alias TRIM {
- return $calc($1 - $1 % 1)
- }
- ;;;;;;;;;;;;;;;;;;;
- ; FOR DIABLO DEMO ;
- ;;;;;;;;;;;;;;;;;;;
- alias DIABLO_D2_CRAFT_COST {
- ;$1 = Item Level
- ;$2 = Minimum Gold Tick (% BASED)
- return $calc(2 ^ $1 * (100 / $2))
- }
- alias DIABLO_EXP_TO_D2_GOLD {
- ;$1 = Player Level
- ;$2 = Monster Level
- ;$3 = Monster Count Start
- ;$4 = Monster Count Interval
- ;$5 = Goldfind Multiplier (% BASED)
- ;$6 = Minimum Gold Tick (% BASED)
- var %MINIMUM_GOLD_TICK $$6
- var %PLAYER_LEVEL $1
- var %MONSTER_LEVEL $2
- var %MONSTER_COUNT_START $3
- var %MONSTER_COUNT_INTERVAL $4
- var %GOLDFIND_MULTIPLIER $5
- var %tiers 12
- return $TRIM($calc((2 ^ (($DIABLO_PLEVEL_AND_MLEVEL_TO_EXP_NEW(%PLAYER_LEVEL,%MONSTER_LEVEL,%MONSTER_COUNT_START,%MONSTER_COUNT_INTERVAL) - 1) / %tiers - 1) * ($limit(%GOLDFIND_MULTIPLIER,0,100) / 100) * 2 ^ ($limit(%GOLDFIND_MULTIPLIER,100,$calc(%GOLDFIND_MULTIPLIER + 100)) / 100)) * (100 / %MINIMUM_GOLD_TICK)))
- ;return $calc(2 ^ ($DIABLO_PLEVEL_AND_MLEVEL_TO_EXP_NEW($1,$2,$3,$4) / 12 + ($5 / 100 - 1)))
- }
- ; COUNT = PLEVEL - MLEVEL
- ; OFFSET = COUNT_TO_NUMBER(COUNT)
- ; print("OFFSETA: " + str(OFFSET))
- ; return (((PLEVEL + 1) / ABSN(OFFSET) ** ATANN(OFFSET)) / MONSTER_COUNT_INTERVAL) / MONSTER_COUNT_START
- alias DIABLO_PLEVEL_AND_MLEVEL_TO_EXP_NEW {
- var %plevel $1
- var %mlevel $iif($2,$2,$1)
- var %monster_start $iif($3,$3,1)
- var %monster_count $iif($4,$4,1)
- var %COUNT $COUNT_TO_NUMBER($calc((%PLEVEL - %MLEVEL) * %monster_count + %monster_start - $LIMIT($DTEST_VIRII(%monster_start),0,1)),1)
- return $ABSN($calc((%PLEVEL + 1) / %COUNT ^ $ATANN(%COUNT)))
- }
- alias DTEST_VIRII {
- return $calc((($1 ^ 2) ^ -1 - ($1 ^ -1) + 1) * $1)
- }
- ;;;;;;;;;;;;;;;;;;;;;;;
- ; END FOR DIABLO DEMO ;
- ;;;;;;;;;;;;;;;;;;;;;;;
Advertisement
Advertisement