or3o Posted April 23, 2012 Author Share Posted April 23, 2012 You need to have added this tutorial before you can do this http://www.touchofdeathforums.com/smf/index.php/topic,71740.0.htmlcredit to DJMaxus for his weapons proficiencies tutorialand a special thanks to Ryoku for showing me how to make resources give exp in the first place.Here we go, This tutorial works on the assumption that you made a skill called fishing with the weapons proficiencies tutorial but it can be very easily modified for any resource related skill. **Server Side** First go to modTypes in the ResourcRecunder **Animation As Long**Paste Dim resourcetype As ByteThen in **ModPlayer** in sub CheckResources above**' carry on GiveInvItem Index, Resource(Resource_index).ItemReward, 1**Paste ```If Resource(Resource_index).resourcetype = 3 Then SetPlayerFishingExp Index, GetPlayerFishingExp(Index) + Resource(Resource_index).FiExp SendEXP Index End If```**Client Side** go to modTypes in the ResourcRecunder **Animation As Long**paste FiExp As LongThen go to ModgameEditors sub ResourceEditorInitFind **.scrlAnimation.Value = Resource(EditorIndex).Animation**```then add .txtFiExp.text = Resource(EditorIndex).FiExp```**Now its time for the form work**First go to FrmEditor_resourceadd a label named lblfiexp and write fishing experience in it.Then add a textbox (make sure to clear the Text1)name it txtFiExpNow double click the text box and paste this```' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Not Len(txtFiExp.text) > 0 Then Exit Sub If IsNumeric(txtFiExp.text) Then Resource(EditorIndex).FiExp = Val(txtFiExp.text) ' Error handler Exit Suberrorhandler: HandleError "txtFiEXP_Change", "frmEditor_NPC", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub```if you have any issues or comments feel free to message me. thank you for reading my first tutorial and i hope you enjoy it. Link to comment Share on other sites More sharing options...
SkywardRiver Posted April 23, 2012 Share Posted April 23, 2012 Use code tags, otherwise good tut Link to comment Share on other sites More sharing options...
or3o Posted April 23, 2012 Author Share Posted April 23, 2012 thanks for the input, I didnt know how to put code tags in (horray for google). Link to comment Share on other sites More sharing options...
or3o Posted May 13, 2012 Author Share Posted May 13, 2012 I updated the tutorial due to an issue a fellow forum member was having, now you just need to set the exp for the resource and it check based on your items fishing req, so to add more skills you wont have to add more scroll bars. also you have to have a success message for it to give you experience, ill fix that next time I edit my server :/ Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2012 Share Posted May 14, 2012 works great thanks for the nice tut Link to comment Share on other sites More sharing options...
tslusny Posted May 14, 2012 Share Posted May 14, 2012 omg this is worst metod i ever seen for this,u must have only 1 type of resource, like 1 tree, 1 fishing spot etc. I did this too and i maked checks for types of resource not Resource_Index. Just try to make more ifs and read from cmbType. But nice try :P . I will make tutorial for it if i have time :cheesy: Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2012 Share Posted May 14, 2012 you must be busy putting shit on your charlie brown christmas tree. in the mean time, why not test it out before you say its horrible. why must we only have 1 type of tree ect? why would we want more ifs? Link to comment Share on other sites More sharing options...
or3o Posted May 15, 2012 Author Share Posted May 15, 2012 I havent had a problem with it? i can set the exp differently for each resource and since it checks the kind of item im using I didnt have to make multiple scroll bars for different types of exp. If you have a better way of doing it I would be happy to check it out.Resource(EditorIndex).FiExp <– that part checks the resources so u can set different exp for different individual resources. and thx for lookin out sotvotkong Link to comment Share on other sites More sharing options...
or3o Posted May 23, 2012 Author Share Posted May 23, 2012 if you wanna make it so the higher level your skill is the more damage you do to the resource you can add thisALL SERVER SIDEin mod player sub checkresource below``` rY = ResourceCache(GetPlayerMap(Index)).ResourceData(Resource_num).y```replace this```Damage = Item(GetPlayerEquipment(Index, Weapon)).Data2```with this```itemnum = GetPlayerEquipment(Index, Weapon) FI = Item(itemnum).Fishing If FI > 0 Then Damage = Item(GetPlayerEquipment(Index, Weapon)).Data2 + (GetPlayerFishing(Index) * 2) End If ```and you can add more just by copying this part and renaming the different parts with the different skills you have added. Also if you dont like how much damage this adds you could easily replace the *2 part with something more fitting. Link to comment Share on other sites More sharing options...
kapsel598 Posted June 28, 2012 Share Posted June 28, 2012 i have error in serverhttp://postimage.org/image/hmogc2mwj/ Link to comment Share on other sites More sharing options...
erkro1 Posted June 29, 2012 Share Posted June 29, 2012 @kapsel598:> i have error in server> http://postimage.org/image/hmogc2mwj/At the top of the sub, add Dim itemnum As Long Link to comment Share on other sites More sharing options...
kapsel598 Posted June 29, 2012 Share Posted June 29, 2012 next error:http://postimage.org/image/lgkm5yg9n/ Link to comment Share on other sites More sharing options...
Alatar Posted June 29, 2012 Share Posted June 29, 2012 @kapsel598:> next error:> http://postimage.org/image/lgkm5yg9n/@or3o:> This tutorial works on the assumption that you made a skill called fishing with the weapons proficiencies tutorial but it can be very easily modified for any resource related skill. Link to comment Share on other sites More sharing options...
kapsel598 Posted June 29, 2012 Share Posted June 29, 2012 after tutorial i go to resources, when i write on txt(from the tutorial) or when i click save i have this error: http://postimage.org/image/tj9a50r75/what i do wrong? Link to comment Share on other sites More sharing options...
or3o Posted June 30, 2012 Author Share Posted June 30, 2012 im not sure if i remember to put it in the tutorial but you need to put this```fiexp as long ```in mod types under resource recs in both the client and server portion of mod types.i cant really access my code at the moment but when i get back onto visual basic ill try n see if that was the issue.If you would run the server and client in visual basic then click save and show me what gets highlighted i could help you easier, right now i basically have to guess. Link to comment Share on other sites More sharing options...
kapsel598 Posted June 30, 2012 Share Posted June 30, 2012 fiexp is in tutorial, i do everything from tutorial, but not for fishing, for WoodCutting Link to comment Share on other sites More sharing options...
or3o Posted June 30, 2012 Author Share Posted June 30, 2012 just run em both in visual basic and when it errors send me a screen shot of whats highlighted k? then ill try n help ya figure it out. Link to comment Share on other sites More sharing options...
kapsel598 Posted June 30, 2012 Share Posted June 30, 2012 in visual basic its not compile error only in game Link to comment Share on other sites More sharing options...
kapsel598 Posted June 30, 2012 Share Posted June 30, 2012 i have lvl requirement for resource, only i must add exp giving how to do this? Link to comment Share on other sites More sharing options...
kapsel598 Posted June 30, 2012 Share Posted June 30, 2012 http://www.touchofdeathforums.com/smf2/index.php/topic,80530.msg862089.html#msg862089i have this from this script Link to comment Share on other sites More sharing options...
or3o Posted June 30, 2012 Author Share Posted June 30, 2012 no open the client and server in visual basic and click run not compile. its how you can run it before compiling to test it out. up near the top of the screen on the left hand sign it should look like a sideways triangle. try not to triple post i think its agianst forum rules, its better to just modify your last post ok?also read the third post down on that tutorial you just linked me, that makes it so you can have a woodcutting level requirement.if you want it to add woodcutting experience then on server side add thisin ModPlayer in sub CheckResources above' carry on GiveInvItem Index, Resource(Resource_index).ItemReward, 1Paste ``` itemnum = GetPlayerEquipment(Index, Weapon) FI = Item(itemnum).woodcutting If FI > 0 Then SetPlayerwoodcuttingExp Index, GetPlayerwoodcuttingExp(Index) + Resource(Resource_index).FiExp SendPlayerData Index SendEXP Index End If [\code]``` Link to comment Share on other sites More sharing options...
Whackeddie99 Posted July 20, 2012 Share Posted July 20, 2012 I added this in and I'm getting RTE subscript out of range, highlights this:```CopyMemory ByVal VarPtr(Resource(ResourceNum)), ByVal VarPtr(ResourceData(0)), ResourceSize```It says ResourceData = Link to comment Share on other sites More sharing options...
or3o Posted July 21, 2012 Author Share Posted July 21, 2012 You deleted your resources out of the server right? ill check n see if i can figure out whats up ok?I just updated my tutorial to have a better way of determining what skill you are getting experience in if you change the part in server side mod player, check resource it may fix the issue your having, if that doesnt help just tell me and ill try n see whats wrong. Link to comment Share on other sites More sharing options...
Whackeddie99 Posted July 21, 2012 Share Posted July 21, 2012 @or3o:> You deleted your resources out of the server right? ill check n see if i can figure out whats up ok?> I just updated my tutorial to have a better way of determining what skill you are getting experience in if you change the part in server side mod player, check resource it may fix the issue your having, if that doesnt help just tell me and ill try n see whats wrong.Alright, I'm pretty sure I know the problem, I'm going to retry it. And yes, I cleared resources.EDIT: you removed the code that actually gives the skill EXP to the player…. Link to comment Share on other sites More sharing options...
or3o Posted July 22, 2012 Author Share Posted July 22, 2012 sorry man i wasnt fully awake this morning i guess, fixing it now lolK its fixed, i accidently pasted the code for woodcutting requirements i guess thanks for catching that. 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