Matt Posted January 5, 2013 Author Share Posted January 5, 2013 Ever want to make that cake of yours to take four bites to finish? Or that potion to have multiple doses? This is the tutorial for you. Using this, consume items will give back a selected item enabling you to make multiple piece consumable items. This was made for EO 2.0, but I'd imagine it should work with other engines.Lets start in client.Go to frmEditor_Item, and in the consume tab make a new label and scrollbar. Go to```Private Sub Form_Load()```and put there this in the sub.```scrlItem.Max = MAX_ITEMS```Now go back to your new scrollbar and label. Name the scrollbar scrlItem, and name your label lblItem.Double click on the scrollbar and put there this.```If scrlItem.Value = 0 Then lblItem.Caption = "Item: None" Exit SubEnd IflblItem.Caption = "Item: " & Item(scrlItem.Value).NameItem(EditorIndex).ConsumeItem = scrlItem.Value```Change the caption to your new label to "Item: None".Now go to modTypes and look for```Private Type ItemRec```At the bottom of the rec, put there this.```ConsumeItem As Long```Lastly, go to sub ItemEditorInit and look for```If frmEditor_Item.cmbType.ListIndex = ITEM_TYPE_CONSUME Then```In that if statement, put there this``` frmEditor_Item.scrlItem.Value = .ConsumeItem```Save and compile.Now to the server!Go to```Private Type ItemRec```and at the bottom put there```ConsumeItem As Long```Now look for```Case ITEM_TYPE_KEY```and above it put there this.``` If Item(itemnum).ConsumeItem <> 0 Then GiveInvItem index, Item(itemnum).ConsumeItem, 1 End If```Save, compile, and enjoy. ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Growlith1223 Posted January 5, 2013 Share Posted January 5, 2013 nice man. Good job on the tutorial, hope to see more! ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png) Link to comment Share on other sites More sharing options...
Matt Posted January 5, 2013 Author Share Posted January 5, 2013 Thanks Growlith! ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) Link to comment Share on other sites More sharing options...
Valentine90 Posted January 5, 2013 Share Posted January 5, 2013 I do not quite understand what this does, could explain better? Link to comment Share on other sites More sharing options...
MadalinV Posted January 5, 2013 Share Posted January 5, 2013 > I do not quite understand what this does, could explain better?If you use a "potion" for example that gives you 10 HP, with this add-on, it will give 10 HP, but it can be used 4-5 times before dissapearing from inventory, at least that's what i understood. Link to comment Share on other sites More sharing options...
Matt Posted January 5, 2013 Author Share Posted January 5, 2013 > I do not quite understand what this does, could explain better?This edit can give consume type items a "give-back" item. When the item is eaten, if the give-back isn't zero, it gives the player the item selected in the editor. This way you could make the illusion that a potion, for example, has multiple doses.For a more in depth example, make five different items in your item editor; Potion 5/5, potion 4/5, potion 3/5, potion 2/5 and potion 1/5\. Set the give-back item for potion 5/5 to be "potion 4/5". For potion 4/5, make it "potion 3/5". Do this for all of them, except leave Potion 1/5's giveback as "None".Now if you spawn yourself a Potion 5/5, and consume it, you will get potion 4/5\. If you eat that, you get a potion 3/5\. If you eat the potion 1/5, you will not receive an item back because you finished the potion. Link to comment Share on other sites More sharing options...
abhi2011 Posted January 5, 2013 Share Posted January 5, 2013 This looks good. Useful if for consumable foods like cakes, pies and stuff. Link to comment Share on other sites More sharing options...
DarkDino Posted April 5, 2013 Share Posted April 5, 2013 Thanks!, this work in EO 3.0! ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
Matt Posted April 5, 2013 Author Share Posted April 5, 2013 > This looks good. Useful if for consumable foods like cakes, pies and stuff.Exactly!> Thanks!, this work in EO 3.0! ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)You're welcome ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png) Enjoy! Link to comment Share on other sites More sharing options...
JohnPony Posted April 6, 2013 Share Posted April 6, 2013 lol runescape. Link to comment Share on other sites More sharing options...
abhi2011 Posted April 6, 2013 Share Posted April 6, 2013 > lol runescape.lol MinecraftRS3 with customizable HUD ftw ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) Link to comment Share on other sites More sharing options...
DevilToTracks Posted April 7, 2013 Share Posted April 7, 2013 I dont have this in Eclipse Advanced Server…why ? :s**Now look for****Case ITEM_TYPE_KEY****and above it put there this.** Link to comment Share on other sites More sharing options...
Matt Posted April 8, 2013 Author Share Posted April 8, 2013 Then look for Case ITEM_TYPE_CONSUME and put the code at the end of the case. Link to comment Share on other sites More sharing options...
tslusny Posted April 11, 2013 Share Posted April 11, 2013 > I dont have this in Eclipse Advanced Server…why ? :s> > **Now look for**> > **Case ITEM_TYPE_KEY**> > **and above it put there this.**Becouse in EA there isn't any ITEM_TYPE_KEY ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) Link to comment Share on other sites More sharing options...
Zopto Posted April 11, 2013 Share Posted April 11, 2013 Love it tnx**[- Matthew -](http://www.touchofdeathforums.com/community/index.php?/user/65954-matthew/)** Link to comment Share on other sites More sharing options...
Matt Posted April 12, 2013 Author Share Posted April 12, 2013 No problem! ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png) Enjoy! Link to comment Share on other sites More sharing options...
egemert35 Posted April 12, 2013 Share Posted April 12, 2013 Thank you.. ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) Link to comment Share on other sites More sharing options...
Matt Posted April 15, 2013 Author Share Posted April 15, 2013 My pleasure! ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png) Link to comment Share on other sites More sharing options...
escfoe2 Posted April 22, 2013 Share Posted April 22, 2013 Great idea Matthew. Simple and well explained. Way to go. Link to comment Share on other sites More sharing options...
Matt Posted April 22, 2013 Author Share Posted April 22, 2013 > Great idea Matthew. Simple and well explained. Way to go.Thank you! ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png) 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