JohnPony Posted June 2, 2012 Author Share Posted June 2, 2012 Wrote this tutorial cause i was bored, not sure if it was done before, and seen someone in the Q&A board asking for it.Client Side:In frmEditor_Resource your going to want to add two new controls:#1: A Label control, name it```lblLevelNeeded```#2: A Horizontal scroll bar, name it```scrlLvlReq```Now go into code view of frmEditor_Resource and add this at the bottom:```Private Sub scrlLvlReq_Change() ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If EditorIndex = 0 Or EditorIndex > MAX_RESOURCES Then Exit Sub lblLevelNeeded.Caption = "Level req: " & scrlLvlReq Resource(EditorIndex).LevelReq = scrlLvlReq.value ' Error handler Exit Suberrorhandler: HandleError "scrlLvlReq_Change", "frmEditor_Resource", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub```Now in modGameEditors search for:```.scrlAnimation.value = Resource(EditorIndex).Animation```Right below it add:```.scrlLvlReq.value = Resource(EditorIndex).LevelReq```Now in modTypes search for:```Private Type ResourceRec```Right below:```Animation As Long```Add:```LevelReq As Long```That finishes up client sided work… Lets move on to the server stuff.in modTypes once again search for:```Private Type ResourceRec```And Right below:```Animation As Long```Add:```LevelReq As Long```Now in modPlayer search for:```If Item(GetPlayerEquipment(Index, Weapon)).data3 = Resource(Resource_index).ToolRequired Then```Right below that add:``` ' level requirement If GetPlayerLevel(Index) < Resource(Resource_index).LevelReq Then PlayerMsg Index, "You do not meet the level requirement for this resource!", BrightRed Exit Sub End If```And that should be it! Enjoy ;)*If i forgot anything just tell me Link to comment Share on other sites More sharing options...
Yuko Posted June 2, 2012 Share Posted June 2, 2012 1st and thanks. I don't know if I'll come across needing this ever, but I'm going to try it out anyways. Link to comment Share on other sites More sharing options...
JohnPony Posted June 2, 2012 Author Share Posted June 2, 2012 This is pretty useless in my view, but some people see a use for it. Link to comment Share on other sites More sharing options...
Yuko Posted June 2, 2012 Share Posted June 2, 2012 @John:> This is pretty useless in my view, but some people see a use for it.Well I guess it gives people things to work on, so the game isn't just battles and quests, some people like leveling and skilling(usually girls :P).But anyways…yeah it is kind of useless.. Link to comment Share on other sites More sharing options...
or3o Posted June 2, 2012 Share Posted June 2, 2012 If you added the weapons profiencies tutorial all ya need to do to make it use you woodcutting level or whatever other skill u want is use this in the server side check resource sub :0```If Resource(Resource_index).resourcetype = 1 Then ' level requirement If GetPlayerWoodcutting(index) < Resource(Resource_index).LevelReq Then PlayerMsg index, "You do not meet the level requirement for this resource!", BrightRed Exit Sub End If End If ```Thanks you very much for this tutorial tho! I like this way better than having to make a buncha different tools with different tool powers and such. And i love skilling! (Im totally not a girl.(I think.)) Link to comment Share on other sites More sharing options...
JohnPony Posted June 2, 2012 Author Share Posted June 2, 2012 Your welcome haha 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