2025-05-25 21:42:32 -04:00
|
|
|
### Function: MakeRandomFloat(min, max)
|
2025-05-04 14:34:15 -04:00
|
|
|
|
|
|
|
|
**Description:**
|
2025-05-25 21:42:32 -04:00
|
|
|
Make a random float between min and max.
|
2025-05-04 14:34:15 -04:00
|
|
|
|
|
|
|
|
**Parameters:**
|
2025-05-25 21:42:32 -04:00
|
|
|
- `min` (float) - Float value `min`.
|
|
|
|
|
- `max` (float) - Float value `max`.
|
2025-05-04 14:34:15 -04:00
|
|
|
|
2025-05-25 21:42:32 -04:00
|
|
|
**Returns:** Float value between min and max.
|
2025-05-04 14:34:15 -04:00
|
|
|
|
|
|
|
|
**Example:**
|
|
|
|
|
|
|
|
|
|
```lua
|
2025-05-25 21:42:32 -04:00
|
|
|
-- From Spells/Commoner/VerdantTrinity.lua
|
|
|
|
|
function cast(Caster, Target, Val1, Val2)
|
|
|
|
|
Percentage = MakeRandomFloat(Val1, Val2)
|
|
|
|
|
SpellHealPct("Heal", Percentage, false, false, Target, 2)
|
|
|
|
|
end
|
2025-05-04 14:34:15 -04:00
|
|
|
```
|