Yay! Someone willing to learn! ^_^
So, to start things off, you need to add a new variable to the ResourceRec so that each resource can have its own level requirement. Look for something like ResourceRec in modTypes. In between “Private Type ResourceRec” and “End Type” put there something like this.
LevelReq as long
You need to do this in your server source and client source. Double click on the textbox, and put there this code.
' This sub will be called every time you type in the textbox.
' If the text in the textbox is NOT numeric, then change it to the last thing it was set to.
if not isnumeric(txtLevelReq.text) then txtLevelReq.text = Resource(editorindex).LevelReq
Resource(editorindex).LevelReq = txtLevelReq.text
There’s still one more thing we have to do in the client. Go to the sub called ResourceEditorInit. This sub is called every time you click on the listbox with all the resources in the Resource Editor.
If you see something like “With frmEditor_Resource”, then under it put there this
.txtLevelReq.text = Resource(EditorIndex).LevelReq
That should be it for the client. Save, and compile.
Now for the server!
Go to the sub CheckResource and look for this
' inv space?
If Resource(Resource_index).ItemReward > 0 Then
If FindOpenInvSlot(index, Resource(Resource_index).ItemReward) = 0 Then
PlayerMsg index, "You have no inventory space.", BrightRed
Under or above that, put there this.
' Check to see if we have the needed level
If Resource(Resource_index).LevelReq > Player(index).Level Then
Call PlayerMsg(index, "You need a level of " + Resource(Resource_index).LevelReq + " to use this resource!", BrightRed)
There’s one last thing you need to do before you’re done. You need to delete all of your resources in your data files. The only way you can avoid this is by making a converter. If you don’t, you’ll get runtime errors. Anyways, that should be it! Let me know if you have any questions!