Kaymak Posted November 25, 2014 Author Share Posted November 25, 2014 Hello im using the SEB Engine and want to change the Drop Chance, i only can you use 1 out of 1 so basicly 100% dropchance but i want to change it that i can get less drop chance on drops.![](http://fs1.directupload.net/images/141125/7xeswn8i.png)```Private Sub txtChance_Change() On Error GoTo chanceErr If Not IsNumeric(txtChance.text) And Not Right$(txtChance.text, 1) = "%" And Not InStr(1, txtChance.text, "/") > 0 And Not InStr(1, txtChance.text, ".") Then txtChance.text = "0" NPC(EditorIndex).DropChance(scrlDrop.Value) = 0 Exit Sub End If If Right$(txtChance.text, 1) = "%" Then txtChance.text = Left(txtChance.text, Len(txtChance.text) - 1) / 100 ElseIf InStr(1, txtChance.text, "/") > 0 Then Dim i() As String i = Split(txtChance.text, "/") txtChance.text = Int(i(0) / i(1) * 1000) / 1000 End If If txtChance.text > 1 Or txtChance.text < 0 Then Err.Description = "Value must be between 0 and 1!" GoTo chanceErr End If NPC(EditorIndex).DropChance(scrlDrop.Value) = txtChance.text Exit SubchanceErr: MsgBox "Invalid entry for chance! " & Err.Description txtChance.text = "0" NPC(EditorIndex).DropChance(scrlDrop.Value) = 0End Sub``` Link to comment Share on other sites More sharing options...
Alerd Posted November 25, 2014 Share Posted November 25, 2014 ```If txtChance.text > 1 ThenErr.Description = "Value must be between 0 and 1!"GoTo chanceErrEnd If``` Link to comment Share on other sites More sharing options...
Slasheree Posted November 25, 2014 Share Posted November 25, 2014 1 = 100%0.5 = 50%0.1 = 10%and so on… Link to comment Share on other sites More sharing options...
Kaymak Posted November 25, 2014 Author Share Posted November 25, 2014 well doesnt matter how i chance the chance its still 100% drop even tho i type in Chance 1 out of 5 Edit: didnt saw slasher post, thank you i messed it up… Link to comment Share on other sites More sharing options...
Mohenjo Daro Posted November 25, 2014 Share Posted November 25, 2014 Yes, thanks Slash, as he said, it's decimals, 1 = 100% and 0 = 0% Link to comment Share on other sites More sharing options...
hisherwin Posted November 26, 2014 Share Posted November 26, 2014 > ,…,<>" data-cid="930962" data-time="1416950473">> > 1 = 100%> > 0.5 = 50%> > 0.1 = 10%> > > > and so on...That's my Slasher! :D Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now