1
0
EQ2Emu/docs/lua_functions/MakeRandomInt.md
2025-05-28 21:48:33 -04:00

18 lines
480 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### Function: MakeRandomInt(Min, Max)
**Description:** Generates a random integer between the specified minimum and maximum values (inclusive).
**Parameters:**
`Min`: Int32 The minimum value.
`Max`: Int32 The maximum value.
**Returns:** Int32 A random integer N where Min ≤ N ≤ Max.
**Example:**
```lua
-- Example usage (roll a random amount of coin to reward)
local reward = MakeRandomInt(100, 500) -- between 100 and 500 copper
AddCoin(Player, reward)
```