Officer Johnson Posted December 9, 2016 Author Share Posted December 9, 2016 Hello Eclipse,Tutorials section has really died down. So i figured i'd try and get it back up and running. The more tutorials there is the more customization available for everyone when creating there games!With that being said today i bring to you Multiple Resource Drops/Rewards.Lets get to the code.Server Side:>! **modconstants** under general constants add:>! Public Const MAX_RESOURCE_DROPS As byte = 5>! Then head over to **modTypes**in ResourceRec find:>! ItemReward As Long and change it to:>! ItemReward(1 To MAX_RESOURCE_DROPS) As Long>! Then in **modPlayers** Find:>! in CheckResource under Dim Damage as long add:>! Dim n as long>! Next still in **CheckResource**>! Find: 'inv space? right in under add:>! For n = 1 To MAX_RESOURCE_DROPS>! Find: .ItemReward > 0 Then>! Change to:>! .ItemReward(n) > 0 Then>! Right below that youll see another .itemReward >! just add (n) at the end of it again.>! **in the same sub** a little further down find:>! ' carry on. under this add:>! For n = 1 To MAX_RESOURCE_DROPS>! **Youll see .ItemReward again. **>! Add (n) at the end of it. Client Side:>! **Modconstants** in under general constants add:>! Public Const MAX_RESOURCE_DROPS As byte = 5>! Now head over to **ModTypes** find ResourceRec>! in resourceRec find **ItemReward** as long change to:>! ItemReward(1 To MAX_RESOURCE_DROPS) As Long>! Go to your **ResourceEditor code** and at the top in under Option Explicit add:>! Private ResDropIndex as byte form and form code>! Now go to your **Resource Editor** add a scrlbar for the drop and name it scrlResDrop. >! set min to 1 max to 5.>! also add a label with the caption Drop: >! now click on the **scrlbar** and add the following.>! ResDropIndex = scrlResDrop.Value>! (label name here).Caption = "Drop - " & ResDropIndex scrlReward.Value = Resource(EditorIndex).ItemReward(ResDropIndex) Just to clarify this allows a resource upon depletion to reward multiple items. Similar to multiple npc drops.That should be it! I hope someone find this useful.-Officer Johnson 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