Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question...
#8
Spodi Wrote:Why not use:

Code:
If Int(Rnd * 2) = 1 Then ...

That'll give you a pseudo-50/50 chance and require less processing/code. :wink:

Well, theres more to my code than just needing a 50% chance. It's part of my mining sub:

[code]
m = Int(Rnd * GetPlayerMining(Index))
' Narrow Odds to 50%, no matter how good the skill is
If m Mod 2 = 1 Then
m = 0
End If
' Give them nothing
If m = 0 Then
Call PlayerMsg(Index, "You find nothing.", Yellow)
Call SetPlayerMiningEXP(Index, GetPlayerMiningEXP(Index) + 1)
End If

' Give Them Loot1
If m >= 1 And m
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)