Advertisement
imk0tter

DIABLO DEMO CODE

Jan 24th, 2024
1,694
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.06 KB | None | 0 0
  1. alias ABSN {
  2.   var %sqrt 2 ^ -1
  3.   var %number $1 ^ 2
  4.   var %result %number ^ %sqrt
  5.  
  6.   return %result
  7. }
  8. alias ATANN {
  9.   var %x $1 / $absn($1)
  10.   return %x
  11.  
  12. }
  13. alias COUNT_TO_NUMBER {
  14.   return $calc($1 + $ATANN($calc($1 ^ $ATANN($1))) * $ABSN($2))
  15. }
  16. alias LIMIT {
  17.   return $max($min($3, $1), $2)
  18. }
  19. alias TRIM {
  20.   return $calc($1 - $1 % 1)
  21. }
  22. ;;;;;;;;;;;;;;;;;;;
  23. ; FOR DIABLO DEMO ;
  24. ;;;;;;;;;;;;;;;;;;;
  25. alias DIABLO_D2_CRAFT_COST {
  26.   ;$1 = Item Level
  27.   ;$2 = Minimum Gold Tick (% BASED)
  28.   return $calc(2 ^ $1 * (100 / $2))
  29. }
  30. alias DIABLO_EXP_TO_D2_GOLD {
  31.   ;$1 = Player Level
  32.   ;$2 = Monster Level
  33.   ;$3 = Monster Count Start
  34.   ;$4 = Monster Count Interval
  35.   ;$5 = Goldfind Multiplier (% BASED)
  36.   ;$6 = Minimum Gold Tick (% BASED)
  37.  
  38.   var %MINIMUM_GOLD_TICK $$6
  39.   var %PLAYER_LEVEL $1
  40.   var %MONSTER_LEVEL $2
  41.   var %MONSTER_COUNT_START $3
  42.   var %MONSTER_COUNT_INTERVAL $4
  43.   var %GOLDFIND_MULTIPLIER $5
  44.  
  45.   var %tiers 12
  46.  
  47.   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)))
  48.  
  49.   ;return $calc(2 ^ ($DIABLO_PLEVEL_AND_MLEVEL_TO_EXP_NEW($1,$2,$3,$4) / 12 + ($5 / 100 - 1)))
  50. }
  51. ; COUNT = PLEVEL - MLEVEL
  52. ; OFFSET = COUNT_TO_NUMBER(COUNT)
  53. ; print("OFFSETA: " + str(OFFSET))
  54. ; return (((PLEVEL + 1) / ABSN(OFFSET) ** ATANN(OFFSET)) / MONSTER_COUNT_INTERVAL) / MONSTER_COUNT_START
  55. alias DIABLO_PLEVEL_AND_MLEVEL_TO_EXP_NEW {
  56.   var %plevel $1
  57.   var %mlevel $iif($2,$2,$1)
  58.   var %monster_start $iif($3,$3,1)
  59.   var %monster_count $iif($4,$4,1)
  60.  
  61.   var %COUNT $COUNT_TO_NUMBER($calc((%PLEVEL - %MLEVEL) * %monster_count + %monster_start - $LIMIT($DTEST_VIRII(%monster_start),0,1)),1)
  62.  
  63.   return $ABSN($calc((%PLEVEL + 1) / %COUNT ^ $ATANN(%COUNT)))
  64. }
  65. alias DTEST_VIRII {
  66.   return $calc((($1 ^ 2) ^ -1 - ($1 ^ -1) + 1) * $1)
  67. }
  68. ;;;;;;;;;;;;;;;;;;;;;;;
  69. ; END FOR DIABLO DEMO ;
  70. ;;;;;;;;;;;;;;;;;;;;;;;
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement