or3o Posted August 25, 2012 Author Share Posted August 25, 2012 Thanks to**[Exxsamuari](http://www.touchofdeathforums.com/community/index.php?/user/77774-exxsamuari/) for giving the the idea and thanks to [Joyce](http://www.touchofdeathforums.com/community/index.php?/user/48253-joyce/) for giving be the basics of how to do this. and thanks to [Ryoku Hasu](http://www.touchofdeathforums.com/community/index.php?/user/64145-ryoku-hasu/) for his spells require equipment tutorial (i borrowed heavily from it) alright first you need to have wabbits range system already in your game.****Now to the coding.**Client side firstGo to mod types and in the item rec add to the bottom before end type```ammo as longammoreq as long ```now in frmEditor_item in your projectiles frame add a checkbox name it```ChkAmmo```then a scrollbar and name it```scrlAmmo ```and last a label name it```lblammo```Double click scrlAmmo and paste```If scrlAmmo.Value > 0 Thenlblammo.Caption = "Weapon: " + Item(scrlAmmo.Value).nameElselblammo.Caption = "Weapon: None"End IfItem(EditorIndex).Ammo = scrlAmmo.Value```Next double click Chkammo and paste this``` If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit SubItem(EditorIndex).ammoreq =Chkammo.Value```Now in the form go to Private sub form_load and paste```Scrlammo.max = MAX_ITEMS```Now go to ModgameEditors in Itemeditorinit under```frmEditor_Item.txtDesc.text = Trim$(.Desc)```paste``` frmEditor_Item.Scrlammo.Value = Item(EditorIndex).AmmofrmEditor_Item.Chkammo.Value = Item(EditorIndex).ammoreq```That should be it for Client side, now lets move on to the Server!Ok first go to mod types item rec before end type```ammo as longammoreq as long ```Now in Modhandledata in the Handleprojectileattack subright below```CurEquipment = GetPlayerEquipment(Index, Weapon)```add this``` If Item(CurEquipment).ammoreq > 0 ThenIf HasItem(Index, Item(CurEquipment).ammo) <= 0 ThenCall PlayerMsg(Index, "You Dont Have Any Arrows!", BrightRed)Exit SubEnd IfCall TakeInvItem(Index, Item(CurEquipment).ammo, 1)End If```and that should be it! just make the ammo a currency and you can stack it, Thanks for checking out my tutorial. No credit needed Link to comment Share on other sites More sharing options...
Keny14 Posted August 26, 2012 Share Posted August 26, 2012 Yeah works great, thank you bro that's what i was searching for. ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Link to comment Share on other sites More sharing options...
or3o Posted August 26, 2012 Author Share Posted August 26, 2012 No problem and if you run into any bugs feel free to post about it here. 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