Qazek Posted August 5, 2009 Author Share Posted August 5, 2009 I create this for my game in eclipse.When you click the button automatically determines the price of item.All in client side.Go to the frmItemEditor and create the command button anywhere.Past in to the button code:```txtPrice.Text = scrlAddHP.Value * 10 + scrlAddMP.Value * 10 + scrlAddSP.Value * 10 + scrlAddStr.Value * 10 + scrlAddDef.Value * 10 + scrlAddMagi.Value * 10 + scrlAddSpeed * 10 + scrlAddEXP.Value * 10```1 item point (str, def, mp…) cost 10 Link to comment Share on other sites More sharing options...
Squiddle Posted August 5, 2009 Share Posted August 5, 2009 This is actually a pretty good idea. I'm going to use this! Great job :D. Link to comment Share on other sites More sharing options...
anasky Posted August 7, 2009 Share Posted August 7, 2009 Easy but efficient, good job.Btw, you also included attack speed? And how about weapon strength etc? I don't see those in the code. Link to comment Share on other sites More sharing options...
Qazek Posted August 8, 2009 Author Share Posted August 8, 2009 I forgot about it XDBut this is a very easy to do ;) Link to comment Share on other sites More sharing options...
justTim Posted October 18, 2009 Share Posted October 18, 2009 Here the same thing with AttackSpeed```Dim AttackSpeedDim PriceDim pperstatDim pperhpmpAttackSpeed = 0pperstat = 15pperhpmp = 15 If cmbType.ListIndex = ITEM_TYPE_WEAPON Or cmbType.ListIndex = ITEM_TYPE_TWO_HAND Then AttackSpeed = (10000 / scrlAttackSpeed.Value) If AttackSpeed > 10 Then AttackSpeed = AttackSpeed * 100 ElseIf AttackSpeed > 8 Then AttackSpeed = AttackSpeed * 75 ElseIf AttackSpeed > 6 Then AttackSpeed = AttackSpeed * 50 ElseIf AttackSpeed > 4 Then AttackSpeed = AttackSpeed * 25 Else AttackSpeed = AttackSpeed * (-10) End If AttackSpeed = Round(AttackSpeed) End If Price = scrlAddHP.Value * pperhpmp + scrlAddMP.Value * pperhpmp + scrlAddSP.Value * pperstat + scrlAddStr.Value * pperstat + scrlAddDef.Value * pperstat + scrlAddMagi.Value * pperstat + scrlAddSpeed * pperstat + scrlAddEXP.Value * pperstat If AttackSpeed < 0 Then If Price > AttackSpeed * (-1) Then Price = 0 Else Price = Price + AttackSpeed End If Else Price = Price + AttackSpeed End If txtPrice.Text = Price``` Link to comment Share on other sites More sharing options...
justTim Posted October 18, 2009 Share Posted October 18, 2009 Here the same thing with AttackSpeed```Dim AttackSpeedDim PriceDim pperstatDim pperhpmpAttackSpeed = 0pperstat = 15pperhpmp = 15 If cmbType.ListIndex = ITEM_TYPE_WEAPON Or cmbType.ListIndex = ITEM_TYPE_TWO_HAND Then AttackSpeed = (10000 / scrlAttackSpeed.Value) If AttackSpeed > 10 Then AttackSpeed = AttackSpeed * 100 ElseIf AttackSpeed > 8 Then AttackSpeed = AttackSpeed * 75 ElseIf AttackSpeed > 6 Then AttackSpeed = AttackSpeed * 50 ElseIf AttackSpeed > 4 Then AttackSpeed = AttackSpeed * 25 Else AttackSpeed = AttackSpeed * (-10) End If AttackSpeed = Round(AttackSpeed) End If Price = scrlAddHP.Value * pperhpmp + scrlAddMP.Value * pperhpmp + scrlAddSP.Value * pperstat + scrlAddStr.Value * pperstat + scrlAddDef.Value * pperstat + scrlAddMagi.Value * pperstat + scrlAddSpeed * pperstat + scrlAddEXP.Value * pperstat If AttackSpeed < 0 Then If Price > AttackSpeed * (-1) Then Price = 0 Else Price = Price + AttackSpeed End If Else Price = Price + AttackSpeed End If txtPrice.Text = Price``` Link to comment Share on other sites More sharing options...
Driocku Posted October 18, 2009 Share Posted October 18, 2009 not smart to client side it…......... Link to comment Share on other sites More sharing options...
Driocku Posted October 18, 2009 Share Posted October 18, 2009 not smart to client side it…......... Link to comment Share on other sites More sharing options...
balliztik1 Posted October 26, 2009 Share Posted October 26, 2009 @Draothgorin:> not smart to client side it….........It's a button for a client side form…where else would it go? You can't exactly place an editor's button NOT in the editor, y'know.This is a nice idea. Personally, I'd do a bit more with the formula if I used this, but since everyone will want different prices, each person will make their own tweaks, I suppose. 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