Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Justn

Members
  • Posts

    1129
  • Joined

  • Last visited

    Never

Everything posted by Justn

  1. Justn

    [EO2.x] Roof System

    > It makes a layer over other layers, that when you step on a certian tile, it makes it look like you stepped inside the house, or makes that tile disappear. I'm confused are u asking a question? ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons//tongue.png)
  2. Justn

    [EO2.x] Roof System

    > Make a single tiletype and just alternate between the two states of visibility as you move over it. That's what it currently does though?
  3. Yep ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png)
  4. Scott has made a way better version of this and I think he plans on releasing soon… I think he recommends not.to use this.. keep an eye out for his new one its amazing I got a chance to test it a couple days ago
  5. Forgot this very important step **Server side modConstants** add this to the bottom: ``` ' Game Time Public Const GAME_MINUTES_PER_SECOND = 1 ``` adding to OP now =)
  6. Justn

    [EO2.x] Roof System

    Yea that's what I was thinking about doing just seems like a waste of tile space though.. might just do that tonight :/ wish there was a better way
  7. Well post something in the showoff section that u have done so far ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png)
  8. Justn

    [EO2.x] Roof System

    Oh.. but this was intended for dx7 so I take it thats not possible :/
  9. Justn

    [EO2.x] Roof System

    What do u mean by putting the alpha down? Sorry I'm.slow
  10. I think ur right stein that's what I always thought it was for like runes and items that warp and stuff…
  11. Thanks deathbeam will try it… Any ideas to why it was never finished?
  12. Justn

    [EO2.x] Roof System

    Ok this is a simple roof system. Basically it adds a new layer, the roof. When I player steps on the new threshold tile attribute the roof layer is invisible.. This was ripped from Alatar’s house system so all credits to him.. **Server-** **modConstants** Add this to the bottom of your tile constants: ``` Public Const TILE_TYPE_THRESHOLD As Byte = 15 ``` **modEnumerations** Find : **Public Enum MapLayer** and add this before the layer count: ``` Roof ``` **Client-** **modEnumerations** Find : **Public Enum MapLayer** and add this before the layer count: ``` Roof ``` **modDirectDraw7** Find: **' blit out upper tiles** Under: Call **BltMapFringeTile(X, Y)** add this: ``` Call BltRoof(X, Y) ``` Next add this to the bottom of **modDirectDraw7**: ``` Public Sub BltRoof(ByVal X As Long, ByVal Y As Long) Dim rec As DxVBLib.RECT Dim i As Long With Map.Tile(X, Y) i = MapLayer.Roof If .Layer(i).tileset > 0 Then rec.Top = .Layer(i).Y * PIC_Y rec.Bottom = rec.Top + PIC_Y rec.Left = .Layer(i).X * PIC_X rec.Right = rec.Left + PIC_X If Not Threshold = True Then Call Engine_BltFast(ConvertMapX(X * PIC_X), ConvertMapY(Y * PIC_Y), DDS_Tileset(.Layer(i).tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End If End If End With End Sub ``` **modText** Find: ``` Case TILE_TYPE_SLIDE DrawText TexthDC, tX, tY, "S", QBColor(BrightCyan) ``` Under it add this: ``` Case TILE_TYPE_THRESHOLD DrawText TexthDC, tX, tY, "T", QBColor(BrightCyan) ``` **modGameLogic** Find this: ``` ' Check to see if the map tile is blocked or not If Map.Tile(X, Y).Type = TILE_TYPE_BLOCKED Then CheckDirection = True Exit Function End If ``` **Above** it add this: ``` If Map.Tile(X, Y).Type = TILE_TYPE_THRESHOLD Then Threshold = Not Threshold Exit Function End If ``` **modConstants** Add this to the bottom of your tile constants: ``` Public Const TILE_TYPE_THRESHOLD As Byte = 15 ``` **modGlobals** Add this to the bottom: ``` Public Threshold As Boolean ``` **modGameEditors** Find this: ``` ' slide If frmEditor_Map.optSlide.Value Then .Type = TILE_TYPE_SLIDE .Data1 = MapEditorSlideDir .Data2 = 0 .Data3 = 0 End If ``` **Below** it add this: ``` ' Threshold If frmEditor_Map.optThreshold.Value Then .Type = TILE_TYPE_THRESHOLD .Data1 = 0 .Data2 = 0 .Data3 = 0 End If ``` **Form Work-** **frmEditor_Map** First add this code to the bottom of **frmEditor_Map**: ``` Private Sub cmdRoof_Click() Threshold = Not Threshold End Sub Private Sub optThreshold_Click() ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ClearAttributeDialogue picAttributes.Visible = False ' Error handler Exit Sub errorhandler: HandleError "optThreshold_Click", "frmEditor_Map", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` 1.Now in the frame: **fraLayers.** Copy and paste one of the map layer radio buttons (make sure to paste inside of fraLayers) and set the index to 6 (or the next number if u have more layers). 2.Next create a **command button** in **fraLayers** and name it: **cmdRoof** Set the caption to: **Roof** 3.Find the **map attributes** and create a new radio button on **fraAttribs**. Name it: **optThreshold** And that should be it.. Its pretty basic and the only issue I can think of is one found here: [my one issue](http://www.touchofdeathforums.com/community/index.php?/topic/128934-function-for-getting-the-players-last-position/) If anyone has a solution for that it would be perfect but still works well as is….
  13. Ok in every version of EO all the stuff is there including the form work for an instacast item.. does anyone know why it was never finished or used? I have never seen anyone talk about it before :/
  14. Sorry I missed a couple steps like the server form work and to add the new map layer serverside… added the formwork steps to the bottom of the OP also added a quick screenshot
  15. Ok after this tutorial you will have a working day and night system for DX7.. Basically we are making a game time that starts and stops when you turn on/off your server. In the map editor there is a new layer being drawn that is the darkness effect. You have the option to choose where and if this new layer is drawn so you can make lights, campfires and other things that will cause the light to not appear.. Its not the best looking thing in the world but heck its pretty cool to have this if your using dx7 still.. This was ripped from an older engine made by Stein so all credits are to him for creating this system. [![](http://www.freemmorpgmaker.com/files/imagehost/pics/bf8fafc8cb55d3d374f5aa1b30f40382.PNG)](http://www.freemmorpgmaker.com/files/imagehost/#bf8fafc8cb55d3d374f5aa1b30f40382.PNG) **-Server-** **modConstants** Add this to the bottom ``` ' Game Time Public Const GAME_MINUTES_PER_SECOND = 1 ``` **modDatabase** Find this line ``` PutVar App.Path & "\data\options.ini", "OPTIONS", "Website", Options.Website ``` Under it add: ``` PutVar App.Path & "\data\options.ini", "OPTIONS", "DayNight", STR(Options.DayNight) ``` In the next sub below the previous one : **LoadOptions** Paste this at the bottom just like you did the last one: ``` Options.DayNight = Val(GetVar(App.Path & "\data\options.ini", "OPTIONS", "DayNight")) ``` **modGeneral** In sub **InitServer** find this line: ``` ' Initialize the random-number generator Randomize ', seed ``` Below it Add this: ``` ' Set the game time to the middle of the day. GameMinutes = 0 GameHours = 12 DayTime = True ``` In the same Sub find this line: **' load options, set if they dont exist** Your going to replace ,or make look like, that whole part all the way to the **End if** above this: **' Get the listening socket ready** **to go** With this: ``` ' load options, set if they dont exist If Not FileExist(App.Path & "\data\options.ini", True) Then Options.Game_Name = "Eclipse Origins" Options.Port = 7001 Options.MOTD = "Eclipse Origins." Options.Website = "http://www.touchofdeathforums.com/smf/" Options.DayNight = 1 ‘New part SaveOptions Else LoadOptions End If If Options.DayNight = 0 Then ‘New frmServer.Label8.Visible = False ‘New frmServer.lblGameTime.Visible = False ‘New End If ```‘New In **modGlobals** Add this to the bottom: ``` ' Game Time Public GameMinutes As Byte Public GameHours As Byte Public DayTime As Boolean ``` In **modTypes** find this line: **Private Type OptionsRec** Add this before End Type: ``` DayNight As Byte ``` **modServerLoop** Find this: ``` If Tick > tmr1000 Then If isShuttingDown Then Call HandleShutdown End If tmr1000 = GetTickCount + 1000 End If ``` And replace with this: ``` If Tick > tmr1000 Then If isShuttingDown Then Call HandleShutdown End If ' Change the game time. If Options.DayNight = 1 Then GameMinutes = GameMinutes + GAME_MINUTES_PER_SECOND If GameMinutes > 59 Then GameMinutes = 0 GameHours = GameHours + 1 If GameHours > 23 Then GameHours = 0 End If End If ' See if we need to switch to day or night. If DayTime = True And GameHours > 19 Then DayTime = False SendGameTime GlobalMsg "Darkness has fallen upon these Lands!", Yellow ElseIf DayTime = False And GameHours > 7 And GameHours < 19 Then DayTime = True SendGameTime GlobalMsg "The Sun has risen across the Kingdom!", Yellow End If ' Update the label If DayTime = True Then frmServer.lblGameTime.Caption = "(Day) " & Trim(STR(GameHours)) & ":" & Trim(STR(GameMinutes)) Else frmServer.lblGameTime.Caption = "(Night) " & Trim(STR(GameHours)) & ":" & Trim(STR(GameMinutes)) End If End If tmr1000 = GetTickCount + 1000 End If ``` **modServerTcp** Add this to the bottom: ``` Sub SendGameTime() Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong SSendTime If DayTime = True Then Buffer.WriteLong 1 Else Buffer.WriteLong 0 End If SendDataToAll Buffer.ToArray() Set Buffer = Nothing End Sub ``` **modPlayer** Find this line : **' Send some more little goodies, no need to explain these** Below the other calls add this: ``` Call SendGameTime ``` **modEnumerations** Add this to the bottom of the server packets: ``` SSendTime ``` Find this line : **Public Enum MapLayer** Add this above the LayerCount: ``` Night ``` Boom, now open your client.vbp **Client** Add the night tilesheet to your tilesets folder and number it correctly (the number after your last tileset -.-) **modGlobals** Add this to the bottom: ``` Public DayTime As Boolean ``` **modDirectDraw7** Find this line: ``` ' Lock the backbuffer so we can draw text and names TexthDC = DDS_BackBuffer.GetDC ``` Above it add this: ``` ' Render Night If DayTime = False Or frmEditor_Map.optLayer(6).Value = True Then For X = 0 To Map.maxX For Y = 0 To Map.maxY BltNightTile X, Y Next Next End If ``` Add this to the bottom of modDirectDraw7: ``` Public Sub BltNightTile(ByVal X As Long, ByVal Y As Long) Dim rec As RECT, i As Long With Map.Tile(X, Y) i = MapLayer.Night ' skip tile if tileset isn't set If (.Layer(i).tileset > 0 And .Layer(i).tileset 0 Or .Layer(i).Y > 0) Then ' sort out rec rec.Top = .Layer(i).Y * PIC_Y rec.Bottom = rec.Top + PIC_Y rec.Left = .Layer(i).X * PIC_X rec.Right = rec.Left + PIC_X ' render Call Engine_BltFast(Camera.Left + ConvertMapX(x * PIC_X), Camera.top + ConvertMapY(Y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End If End With End Sub ``` **modHandleData** Add this below the other ones in the InitMessages sub: ``` HandleDataSub(SSendTime) = GetAddress(AddressOf HandleSendTime) ``` At the bottom of modHandleData add this: ``` Private Sub HandleSendTime(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer Dim Temp As Byte Set Buffer = New clsBuffer Buffer.WriteBytes Data() Temp = Buffer.ReadLong If Temp = 1 Then DayTime = True If Temp = 0 Then DayTime = False Set Buffer = Nothing End Sub ``` **modEnumerations** Add this to the bottom of the server packets: ``` SSendTime ``` Find this line : **Public Enum MapLayer** Add this above the LayerCount: ``` Night ``` In **modTypes** find this line: **Private Type OptionsRec** Add this before End Type: ``` NightTile As Byte ``` **modDatabase** Find this line sub: **Public Sub SaveOptions()** Above the **Error Handler** add this: ``` Call PutVar(Filename, "Graphics", "Night", str(Options.NightTile)) ``` In the next sub below the previous one : **LoadOptions** Find this line: **Options.Debug = 0** Below it add this: ``` Options.NightTile = ## ```**OK YOU MUST CHANGE THE ## TO THE NUMBER OF THE NIGHT TILES!** Ok below that find this: **Options.Debug = GetVar(Filename, "Options", "Debug")** Below that line add this: ``` Options.NightTile = GetVar(Filename, "Graphics", "Night") ``` Ok for the **Form Work Client Side- FrmEditor_Map:** Find the map layers radio buttons… Copy and paste one of them. Make sure you paste it inside of the frame: fraLayers.. After you have pasted it **make sure the index is set to 6**. Now Add this to the bottom of frmEditor_map: ``` Private Sub optLayer_Click(Index As Integer) If Index = Night Then scrlTileSet.Value = Options.NightTile scrlTileSet_Change scrlTileSet.Enabled = False Else scrlTileSet.Enabled = True End If End Sub ``` **Server Form Work-** **frmServer** 1.Anywhere on the server panel make a label named: **label 8** set the caption to : **Game Time:** 2\. Beside it make a label named: **lblGameTime** Set the caption to : **xx:xx** **OK in your Server/Data Folder open options.ini and add this to the bottom: daynight=1** **In your client/datafiles/ folder open the config.ini and add this to the bottom:** ``` [Graphics] Night= 57 ``` Hey that’s it!! If I missed anything let me know I think its all there.. You should have a working day/night system for EO2.0 or EO2.3..
  16. Well I can't program either but if there is a system already available to use.. why would u go all crazy with adding a ton of events which is alot of work in itself to achieve the same results basically the same thing oreo said up top ![:(](http://www.touchofdeathforums.com/community/public/style_emoticons//sad.png) but this could be still usefull and does explain how certain events can be.made
  17. I don't think the event system is useless I have found many good uses for it.. but using it for something like this or using it as a replacement for the the resource system I think is a waste…. It works great for doors, conversations, story building, fast travel ect...
  18. Yes sorry I forgot that.. modglobals client side add this to the bottom ``` Public Skilltype As Long ```
  19. This is 100% compatible with the older crafting system.. i just reposted the whole tutorial to make things easier for new people.. i will post the changes made from the old one to this version.. so if u already have the old one ur only adding a couple things and deleting one line ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png) Also I think it only seems long cause of the way I did the form work part once I get it.looking nicer i think it will.seem short… Also u dont have to add the skill level stuff if u dont want it it works fine without it just wanted to release the whole thing as is in my project incase people needed it
  20. **Also I will label Everything with comments so if your dont want a certain addon you dont have to add it =)its so easy to see but i will show you anyways!(if someone requests it)** **Not Tested on EO 3.0 yet(almost), works great on 2.0 and 2.3** Please note that you will have to delete you player accounts, your items, and even your maps to use this(sorry guys I dont have a converter or able to make one) Well this is something DJMaxus created for me after I ran into trouble doing it myself.. Basically Its a "dynamic" Crafting system that supports up to 5 items( you can add and remove more easily).. Also It has different crafting stations if you will.. For example if your making a sword you must be at an avil.. or if your making a potion you must be at a alchemy table and it wont work if your at the wrong station or not at a station at all. Also I have added a Level up system based on DJMaxus' other tutorial.. Means if you suck at blacksmithing you cant make good weapons.. This System reminds me a bit of skyrim yet it still uses the recipe item type for making stuff.. All credits go to DJMAXUS!! **How it Works:** Make a Recipe and set it up to make an item.. Next check a box for what type of item it is (smithy, alchemy, or enchant) You must select one of the boxes even if it doesnt have a level requirement. Next set what lv for the crafting skill they must have to make the item. Then in the map editor you can place multiple crafting tiles.. Place an anvil at the balcksmiths shop or an Alchemy lab at the spell shop ect.. **The Code:** **Server Side** **In modTypes** Find : **Private Type PlayerRec** Add this to the bottom before **End Type**: ``` Smith As Byte SmithExp As Long Alchemy As Byte AlchemyExp As Long Enchants As Long EnchantsExp As Long ``` Find : **Private Type ItemRec** Add this to the bottom of **Private Type ItemRec** (before End Type) ``` 'crafting Tool As Long ToolReq As Long Recipe(1 To MAX_RECIPE_ITEMS) As Long Smithy As Long SmithReq As Long Alchemist As Long AlchemyReq As Long Enchanter As Long EnchantReq As Long ``` **In modConstants** Find: ``` Public Const ITEM_TYPE_SPELL As Byte = 8 ``` Add this below: ``` Public Const ITEM_TYPE_RECIPE As Byte = 9 ``` Add this to the bottom of the tile constants also( note your number might be different from mine) ``` Public Const TILE_TYPE_CRAFT As Byte = 15 ``` Also Add this under the rest of the general constants: ``` ' max number of crafting items Public Const MAX_RECIPE_ITEMS As Long = 5 ``` **In modDatabase in Sub AddChar** Find: ``` Player(Index).Level = 1 ``` Under it add this ``` Player(Index).Smith = 1 Player(Index).Alchemy = 1 Player(Index).Enchants = 1 ``` **In modServerTCP** find :**Function PlayerData(ByVal Index As Long) As Byte()** Under this :**Buffer.WriteLong GetPlayerPK(Index)** Add this: ``` Buffer.WriteLong GetPlayerSmith(Index) Buffer.WriteLong GetPlayerAlchemy(Index) Buffer.WriteLong GetPlayerEnchants(Index) ``` **In modServerTCP** find: **Sub SendEXP(ByVal Index As Long)** In that sub under : **Buffer.WriteLong GetPlayerNextLevel(Index)** Add this: ``` Buffer.WriteLong GetPlayerSmithExp(Index) Buffer.WriteLong GetPlayerNextSmithLevel(Index) Buffer.WriteLong GetPlayerAlchemyExp(Index) Buffer.WriteLong GetPlayerNextAlchemyLevel(Index) Buffer.WriteLong GetPlayerEnchantsExp(Index) Buffer.WriteLong GetPlayerNextEnchantsLevel(Index) ``` **In modPlayer find this sub:** ``` Function GetPlayerNextLevel(ByVal Index As Long) As Long GetPlayerNextLevel = (50 / 3) * ((GetPlayerLevel(Index) + 1) ^ 3 - (6 * (GetPlayerLevel(Index) + 1) ^ 2) + 17 * (GetPlayerLevel(Index) + 1) - 12) End Function ``` under it add this: ``` ' Proficeicies '*************************************** ' BlackSmith Skill Level '*************************************** Function GetPlayerSmith(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerSmith = Player(Index).Smith End Function Function SetPlayerSmith(ByVal Index As Long, ByVal Smith As Long) SetPlayerSmith = False If Smith > MAX_SKILL_LEVEL Then Exit Function Player(Index).Smith = Smith SetPlayerSmith = True End Function Function GetPlayerSmithExp(ByVal Index As Long) As Long GetPlayerSmithExp = Player(Index).SmithExp End Function Sub SetPlayerSmithExp(ByVal Index As Long, ByVal SmithExp As Long) Player(Index).SmithExp = SmithExp SendEXP Index If GetPlayerSmithExp(Index) >= GetPlayerNextSmithLevel(Index) Then SmithLevelUp Index End Sub Public Function GetPlayerNextSmithLevel(ByVal Index As Long) As Long GetPlayerNextSmithLevel = (50 / 3) * ((GetPlayerSmith(Index) + 1) ^ 3 - (6 * (GetPlayerSmith(Index) + 1) ^ 2) + 17 * (GetPlayerSmith(Index) + 1) - 12) End Function ' Proficeicies '*************************************** ' Alchemy Skill Level '*************************************** Function GetPlayerAlchemy(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerAlchemy = Player(Index).Alchemy End Function Function SetPlayerAlchemy(ByVal Index As Long, ByVal Alchemy As Long) SetPlayerAlchemy = False If Alchemy > MAX_SKILL_LEVEL Then Exit Function Player(Index).Alchemy = Alchemy SetPlayerAlchemy = True End Function Function GetPlayerAlchemyExp(ByVal Index As Long) As Long GetPlayerAlchemyExp = Player(Index).AlchemyExp End Function Sub SetPlayerAlchemyExp(ByVal Index As Long, ByVal AlchemyExp As Long) Player(Index).AlchemyExp = AlchemyExp SendEXP Index If GetPlayerAlchemyExp(Index) >= GetPlayerNextAlchemyLevel(Index) Then AlchemyLevelUp Index End Sub Public Function GetPlayerNextAlchemyLevel(ByVal Index As Long) As Long GetPlayerNextAlchemyLevel = (50 / 3) * ((GetPlayerAlchemy(Index) + 1) ^ 3 - (6 * (GetPlayerAlchemy(Index) + 1) ^ 2) + 17 * (GetPlayerAlchemy(Index) + 1) - 12) End Function ' Proficeicies '*************************************** ' Enchanting Skill Level '*************************************** Function GetPlayerEnchants(ByVal Index As Long) As Long If Index > MAX_PLAYERS Then Exit Function GetPlayerEnchants = Player(Index).Enchants End Function Function SetPlayerEnchants(ByVal Index As Long, ByVal Enchants As Long) SetPlayerEnchants = False If Enchants > MAX_SKILL_LEVEL Then Exit Function Player(Index).Enchants = Enchants SetPlayerEnchants = True End Function Function GetPlayerEnchantsExp(ByVal Index As Long) As Long GetPlayerEnchantsExp = Player(Index).EnchantsExp End Function Sub SetPlayerEnchantsExp(ByVal Index As Long, ByVal EnchantsExp As Long) Player(Index).EnchantsExp = EnchantsExp SendEXP Index If GetPlayerEnchantsExp(Index) >= GetPlayerNextEnchantsLevel(Index) Then EnchantsLevelUp Index End Sub Public Function GetPlayerNextEnchantsLevel(ByVal Index As Long) As Long GetPlayerNextEnchantsLevel = (50 / 3) * ((GetPlayerEnchants(Index) + 1) ^ 3 - (6 * (GetPlayerEnchants(Index) + 1) ^ 2) + 17 * (GetPlayerEnchants(Index) + 1) - 12) End Function ``` **In modPlayer** Find the **UseItem** sub. Near the top of the sub, find: ``` Dim n As Long, i As Long, tempItem As Long, x As Long, y As Long, itemnum As Long ``` Add this below: ``` Dim MaxItems As Long Dim Result As Long ``` And add the following before the last End Select (Still in the same sub) ``` Case ITEM_TYPE_RECIPE ' Check if on crafting tile If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type TILE_TYPE_CRAFT Then PlayerMsg Index, "You cannot craft this item here.", BrightRed Exit Sub End If ' Alchemy If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data1 = 1 Then If Item(ItemNum).Alchemist 1 Then PlayerMsg Index, "You cannot craft this item here, find a place to cook the ingredents.", BrightRed Exit Sub End If End If ' Smithing If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data1 = 2 Then If Item(ItemNum).Smithy 1 Then PlayerMsg Index, "You cannot craft this item here, find a toolbench or generator.", BrightRed Exit Sub End If End If ' Enchantment If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data1 = 3 Then If Item(ItemNum).Enchanter 1 Then PlayerMsg Index, "You cannot craft this item here, find a workbench.", BrightRed Exit Sub End If End If ' Get the recipe information Result = Item(GetPlayerInvItemNum(Index, invNum)).Data3 ' Perform Recipe checks If Result 0 Then If GetPlayerAlchemy(Index) < Item(ItemNum).AlchemyReq Then PlayerMsg Index, "You are not skilled enough in alchemy to craft this item.", BrightRed Exit Sub End If End If ' Enchant If Item(ItemNum).EnchantReq > 0 Then If GetPlayerEnchants(Index) < Item(ItemNum).EnchantReq Then PlayerMsg Index, "You are not skilled enough in enchantments to use this.", BrightRed Exit Sub End If End If For i = 1 To MAX_RECIPE_ITEMS If Item(ItemNum).Recipe(i) > 0 Then MaxItems = i End If Next ' Make sure there are at least two ingredients, and prevent subscript out of range If MaxItems < 2 Or MaxItems > MAX_RECIPE_ITEMS Then PlayerMsg Index, "This is an incomplete recipe.", BrightRed Exit Sub End If ' Proceed to craft the item CraftItem Index, ItemNum, MaxItems, Result End Select End If End Sub ``` At the bottom of **modPlayer** add this: ``` Sub CraftItem(ByVal Index As Long, ByVal ItemNum As Long, ByVal MaxItems As Long, ByVal Result As Long) Dim i As Long Dim SM As Long Dim AL As Long Dim EN As Long ' See what items are needed, and how many ' If requirements are met, craft the item, if not, show failure message Select Case MaxItems Case 1 PlayerMsg Index, "This is an incomplete recipe.", BrightRed Exit Sub Case 2 If HasItem(Index, Item(ItemNum).Recipe(1)) And HasItem(Index, Item(ItemNum).Recipe(2)) Then TakeInvItem Index, Item(ItemNum).Recipe(1), 1 TakeInvItem Index, Item(ItemNum).Recipe(2), 1 GoTo MakeItem Else PlayerMsg Index, "You do not have all of the ingredients needed in this recipe.", BrightRed Exit Sub End If Case 3 If HasItem(Index, Item(ItemNum).Recipe(1)) And HasItem(Index, Item(ItemNum).Recipe(2)) And HasItem(Index, Item(ItemNum).Recipe(3)) Then TakeInvItem Index, Item(ItemNum).Recipe(1), 1 TakeInvItem Index, Item(ItemNum).Recipe(2), 1 TakeInvItem Index, Item(ItemNum).Recipe(3), 1 GoTo MakeItem Else PlayerMsg Index, "You do not have all of the ingredients needed in this recipe.", BrightRed Exit Sub End If Case 4 If HasItem(Index, Item(ItemNum).Recipe(1)) And HasItem(Index, Item(ItemNum).Recipe(2)) And HasItem(Index, Item(ItemNum).Recipe(3)) And HasItem(Index, Item(ItemNum).Recipe(4)) Then TakeInvItem Index, Item(ItemNum).Recipe(1), 1 TakeInvItem Index, Item(ItemNum).Recipe(2), 1 TakeInvItem Index, Item(ItemNum).Recipe(3), 1 TakeInvItem Index, Item(ItemNum).Recipe(4), 1 GoTo MakeItem Else PlayerMsg Index, "You do not have all of the ingredients needed in this recipe.", BrightRed Exit Sub End If Case 5 If HasItem(Index, Item(ItemNum).Recipe(1)) And HasItem(Index, Item(ItemNum).Recipe(2)) And HasItem(Index, Item(ItemNum).Recipe(3)) And HasItem(Index, Item(ItemNum).Recipe(4)) And HasItem(Index, Item(ItemNum).Recipe(5)) Then TakeInvItem Index, Item(ItemNum).Recipe(1), 1 TakeInvItem Index, Item(ItemNum).Recipe(2), 1 TakeInvItem Index, Item(ItemNum).Recipe(3), 1 TakeInvItem Index, Item(ItemNum).Recipe(4), 1 TakeInvItem Index, Item(ItemNum).Recipe(5), 1 PlayerMsg Index, "You do not have all of the ingredients needed in this recipe.", BrightRed Exit Sub Else PlayerMsg Index, "You do not have all of the ingredients needed in this recipe.", BrightRed Exit Sub End If End Select MakeItem: GiveInvItem Index, Result, 1 TakeInvItem Index, ItemNum, 0 PlayerMsg Index, "You have successfully created a " & Trim(Item(Result).Name) & ".", White ' Give the Exp ' If the player has a recipe, determine what type it is... SM = Item(ItemNum).Smithy If SM > 0 Then SetPlayerSmithExp (Index), GetPlayerSmithExp(Index) + GetPlayerSmith(Index) * 2 + 5 SendEXP Index Exit Sub End If AL = Item(ItemNum).Alchemist If AL > 0 Then SetPlayerAlchemyExp (Index), GetPlayerAlchemyExp(Index) + GetPlayerAlchemy(Index) * 2 + 5 SendEXP Index Exit Sub End If EN = Item(ItemNum).Enchanter If EN > 0 Then SetPlayerEnchantsExp (Index), GetPlayerEnchantsExp(Index) + GetPlayerEnchants(Index) * 2 + 5 SendEXP Index Exit Sub End If End Sub ' Check Proficiency Level Up - BlackSmith Sub SmithLevelUp(ByVal Index As Long) Dim i As Long Dim expRollover As Long expRollover = GetPlayerSmithExp(Index) - GetPlayerNextSmithLevel(Index) If GetPlayerSmith(Index) >= MAX_SKILL_LEVEL Then Exit Sub ' Level up SetPlayerSmith Index, GetPlayerSmith(Index) + 1 Call SetPlayerSmithExp(Index, expRollover) SendPlayerData Index SendEXP Index ' Send messages PlayerMsg Index, "Your skill as a smith has increased!", BrightGreen End Sub ' Check Proficiency Level Up - Alchemy Sub AlchemyLevelUp(ByVal Index As Long) Dim i As Long Dim expRollover As Long expRollover = GetPlayerAlchemyExp(Index) - GetPlayerNextAlchemyLevel(Index) If GetPlayerAlchemy(Index) >= MAX_SKILL_LEVEL Then Exit Sub ' Level up SetPlayerAlchemy Index, GetPlayerAlchemy(Index) + 1 Call SetPlayerAlchemyExp(Index, expRollover) SendPlayerData Index SendEXP Index ' Send messages PlayerMsg Index, "Your skill in alchemy has increased!", BrightGreen End Sub ' Check Proficiency Level Up - Enchantor Sub EnchantsLevelUp(ByVal Index As Long) Dim i As Long Dim expRollover As Long expRollover = GetPlayerEnchantsExp(Index) - GetPlayerNextEnchantsLevel(Index) If GetPlayerEnchants(Index) >= MAX_SKILL_LEVEL Then Exit Sub ' Level up SetPlayerEnchants Index, GetPlayerEnchants(Index) + 1 Call SetPlayerEnchantsExp(Index, expRollover) SendPlayerData Index SendEXP Index ' Send messages PlayerMsg Index, "Your Enchanting skill has increased!", BrightGreen End Sub ``` **Client Side** **In modGlobals add this to the bottom:** ``` Public SkillType As Long ``` **In modTypes** Find : **Private Type PlayerRec** Add this to the bottom before End Type: ``` Smith As Byte SmithExp As Long Alchemy As Byte AlchemyExp As Long Enchants As Long EnchantsExp As Long ``` Find : **Private Type ItemRec** Add this to the bottom of Private Type ItemRec (before End Type) ``` 'crafting Tool As Long ToolReq As Long Recipe(1 To MAX_RECIPE_ITEMS) As Long Smithy As Long SmithReq As Long Alchemist As Long AlchemyReq As Long Enchanter As Long EnchantReq As Long ``` **In modConstants** Find: ``` Public Const ITEM_TYPE_SPELL As Byte = 8 ``` Add this below: ``` Public Const ITEM_TYPE_RECIPE As Byte = 9 ``` Add this to the bottom of the tile constants also( note your number might be different from mine) ``` Public Const TILE_TYPE_CRAFT As Byte = 15 ``` Also Add this under the rest of the general constants: ``` ' max number of crafting items Public Const MAX_RECIPE_ITEMS As Long = 5 ``` In **modGameEditors** Find: **Public Sub ItemEditorInit()** Under it add this: ``` Dim RecipeIndex As Long ``` under that **find** this: ``` If frmEditor_Item.Visible = False Then Exit Sub EditorIndex = frmEditor_Item.lstIndex.ListIndex + 1 ``` under that **add this:** ``` RecipeIndex = frmEditor_Item.scrlItemNum.Value ``` In the same sub **find** this: ``` If (frmEditor_Item.cmbType.ListIndex = ITEM_TYPE_SPELL) Then frmEditor_Item.fraSpell.Visible = True frmEditor_Item.scrlSpell.Value = .Data1 Else frmEditor_Item.fraSpell.Visible = False End If ``` Under it **add** this: ``` If (frmEditor_Item.cmbType.ListIndex = ITEM_TYPE_RECIPE) Then frmEditor_Item.fraRecipe.Visible = True frmEditor_Item.scrlItemNum.Max = MAX_RECIPE_ITEMS frmEditor_Item.scrlItemNum.Value = 1 frmEditor_Item.scrlResult.Value = .Data3 frmEditor_Item.cmbCToolReq.ListIndex = .ToolReq Else frmEditor_Item.fraRecipe.Visible = False End If ``` Under that you will see this : ``` ' Basic requirements frmEditor_Item.scrlAccessReq.Value = .AccessReq frmEditor_Item.scrlLevelReq.Value = .LevelReq ``` Add this below it: ``` ' Proficiencies frmEditor_Item.scrlSmithReq.Value = .SmithReq frmEditor_Item.chkSM = .Smithy ' Proficiencies frmEditor_Item.scrlAlchemyReq.Value = .AlchemyReq frmEditor_Item.chkAL = .Alchemist ' Proficiencies frmEditor_Item.scrlEnchantReq.Value = .EnchantReq frmEditor_Item.chkEN = .Enchanter ``` **Still in modGameEditors find**: ``` ' slide If frmEditor_Map.optSlide.Value Then .Type = TILE_TYPE_SLIDE .Data1 = MapEditorSlideDir .Data2 = 0 .Data3 = 0 End If ``` under this add: ``` ' crafting If frmEditor_Map.optCraft.Value Then .Type = TILE_TYPE_CRAFT .Data1 = SkillType .Data2 = 0 .Data3 = 0 End If ``` **In modText** **find this**: ``` Case TILE_TYPE_SLIDE DrawText TexthDC, tX, tY, "S", QBColor(BrightCyan) ``` Under it add this: ``` Case TILE_TYPE_CRAFT DrawText TexthDC, tX, tY, "CR", QBColor(White) ``` **In modDatabase** Find this Sub: **Sub SetPlayerExp** under the whole sub add this: ``` 'prof smithy Function GetPlayerSmith(ByVal Index As Long) As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Function GetPlayerSmith = Player(Index).Smith ' Error handler Exit Function errorhandler: HandleError "GetPlayerSmith", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Function End Function Sub SetPlayerSmith(ByVal Index As Long, ByVal Smith As Long) ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Sub Player(Index).Smith = Smith ' Error handler Exit Sub errorhandler: HandleError "SetPlayerSmith", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub Function GetPlayerSmithExp(ByVal Index As Long) As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Function GetPlayerSmithExp = Player(Index).SmithExp ' Error handler Exit Function errorhandler: HandleError "GetPlayerSmithExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Function End Function Sub SetPlayerSmithExp(ByVal Index As Long, ByVal SmithExp As Long) ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Sub Player(Index).SmithExp = SmithExp ' Error handler Exit Sub errorhandler: HandleError "SetPlayerSmithExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub 'prof alachemy Function GetPlayerAlchemy(ByVal Index As Long) As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Function GetPlayerAlchemy = Player(Index).Alchemy ' Error handler Exit Function errorhandler: HandleError "GetPlayerAlchemy", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Function End Function Sub SetPlayerAlchemy(ByVal Index As Long, ByVal Alchemy As Long) ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Sub Player(Index).Alchemy = Alchemy ' Error handler Exit Sub errorhandler: HandleError "SetPlayerAlchemy", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub Function GetPlayerAlchemyExp(ByVal Index As Long) As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Function GetPlayerAlchemyExp = Player(Index).AlchemyExp ' Error handler Exit Function errorhandler: HandleError "GetPlayerAlchemyExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Function End Function Sub SetPlayerAlchemyExp(ByVal Index As Long, ByVal AlchemyExp As Long) ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Sub Player(Index).AlchemyExp = AlchemyExp ' Error handler Exit Sub errorhandler: HandleError "SetPlayerAlchemyExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub 'prof enchantor Function GetPlayerEnchants(ByVal Index As Long) As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Function GetPlayerEnchants = Player(Index).Enchants ' Error handler Exit Function errorhandler: HandleError "GetPlayerEnchants", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Function End Function Sub SetPlayerEnchants(ByVal Index As Long, ByVal Enchants As Long) ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Sub Player(Index).Enchants = Enchants ' Error handler Exit Sub errorhandler: HandleError "SetPlayerEnchants", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub Function GetPlayerEnchantsExp(ByVal Index As Long) As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Function GetPlayerEnchantsExp = Player(Index).EnchantsExp ' Error handler Exit Function errorhandler: HandleError "GetPlayerEnchantsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Function End Function Sub SetPlayerEnchantsExp(ByVal Index As Long, ByVal EnchantsExp As Long) ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Sub Player(Index).EnchantsExp = EnchantsExp ' Error handler Exit Sub errorhandler: HandleError "SetPlayerEnchantsExp", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub '/prof ``` **In modHandleData** Find this: **Private Sub HandlePlayerExp** Under: **Dim i As Long** Add this: ``` Dim TNSM As Long Dim TNAL As Long Dim TNEN As Long ``` Still in sub **HandlePlayerExp** before the **Error Handler** add: ``` ' Proficiencies smithy SetPlayerSmithExp Index, Buffer.ReadLong TNSM = Buffer.ReadLong frmMain.lblSmithExp.Caption = GetPlayerSmithExp(Index) & "/" & TNSM ' Proficiencies alchemy SetPlayerAlchemyExp Index, Buffer.ReadLong TNAL = Buffer.ReadLong frmMain.lblAlchemyExp.Caption = GetPlayerAlchemyExp(Index) & "/" & TNAL ' Proficiencies enchant SetPlayerEnchantsExp Index, Buffer.ReadLong TNEN = Buffer.ReadLong frmMain.lblEnchantsExp.Caption = GetPlayerEnchantsExp(Index) & "/" & TNEN ``` Still in **modHandleData** Find the sub: **HandlePlayerData** Under : Call SetPlayerPK(i, Buffer.ReadLong) Add this: ``` Call SetPlayerSmith(i, Buffer.ReadLong) Call SetPlayerAlchemy(i, Buffer.ReadLong) Call SetPlayerEnchants(i, Buffer.ReadLong) ``` Still in the same sub find this : ``` ' Set the character windows frmMain.lblCharName = GetPlayerName(MyIndex) & " - Level " & GetPlayerLevel(MyIndex) ``` Under it add this: ``` frmMain.lblSmith = GetPlayerSmith(MyIndex) frmMain.lblAlchemy = GetPlayerAlchemy(MyIndex) frmMain.lblEnchants = GetPlayerEnchants(MyIndex) ``` **In frmEditor_Item** : Under: **Option Explicit** Add this: ``` Private RecipeIndex As Long ``` Next find this: ``` If (cmbType.ListIndex = ITEM_TYPE_SPELL) Then fraSpell.Visible = True Else fraSpell.Visible = False End If ``` Under it add this: ``` If (cmbType.ListIndex = ITEM_TYPE_RECIPE) Then fraRecipe.Visible = True Else fraRecipe.Visible = False End If ``` **FORM WORK- Ok I included frm Examples of the item editor and the map editor at the bottom of the post.. I left frmMain out cause its only 6 labels and no code =)** FORM WORK- >! frmeditor_item >! 1\. First create a frame and name it : **fraRecipe** >! **All of this goes inside of the new frame!** >! 2.Make a new label named >! :**Label7** >! Set the Caption to: **1.** >! 3. >! Next create a label and place it right next to the first one and name >! it : **lblItem1** >! Set the caption to : **Item: >! None** >! 4\. Under that new label make a Scroll bar named: >! **scrlItem1** >! Set the Min to 0 >! 5\. Under that scrollbar >! make another label and name it : **lblItemNum** >! Set the caption >! to : **Item: None** >! 6\. Under **lblItemNum** >! Make another scroll bar and name it : >! **scrlItemNum** >! Set the Min to 1 >! 7\. Next somewhere in the >! new frame (**fraRecipe**) make a **label** and give it >! the caption : **Tool:** >! 8\. Under that make a >! **combobox** and name it: **cmbCToolReq** >! In >! the **list** add the following (Doesnt matter just giving you some >! ideas) : **None >! Hammer >! Mortar & Pestle >! Cooking >! Pot >! Enchanting Stone >! Dwarf Hammer** >! 9.Somewhere still in >! fraRecipe add a label named: **lblResult** >! Set the caption to: >! **Result: None** >! 10\. Under that make yet another scrollbar >! and name it : **scrlResult** >! 11.Now under all that bum candy >! still on fraRecipe make a check box named :**chkSM** >! Set caption >! as: **Smith** >! 12\. beside that new checkbox make a label >! named:**lblSmith** >! caption set as : >! **1** >! 13\. Under that checkbox make a new scrollbar named: >! **scrlSmithReq** >! 14\. Beside that new checkbox make another >! one named:**chkAL** >! Set caption as: >! **Alchemy** >! 15\. beside that new checkbox make a label >! named:**lblAlchemy** >! caption set as : >! **1** >! 16\. Under that checkbox make a new scrollbar named: >! **scrlAlchemyReq** >! 17\. Beside that new checkbox make another >! one named:**chkEN** >! Set caption as: >! **Enchant** >! 18\. beside that new checkbox make a label >! named:**lblEnchants** >! caption set as : 1 >! 19\. Under that >! checkbox make a new scrollbar named: **scrlEnchantReq** >! Damn >! seems like alot but its not so you should have: >! 1 new frame >! 6 scrollbars >! 1 combobox >! 3 check boxes >! 8 Labels >! Ok now Still frmEditor _Item in the "Equipment Data" frame >! 1\. Make a new **label** and set the caption to : **Crafting Tool:** >! 2\. Next to it make a **combobox** and name it: **cmbCTool** >! In the List of the new combobox add the same tools as you did with the other combobox(cmbCToolreq) >! Now for the code.. >! Add this to the bottom of **frmEditor_item** >! ``` Private Sub scrlItem1_Change() >! If scrlItem1.Value > 0 Then >! lblItem1.Caption = "Item: " & Trim$(Item(scrlItem1.Value).Name) >! Else >! lblItem1.Caption = "Item: None" >! End If >! Item(EditorIndex).Recipe(RecipeIndex) = scrlItem1.Value >! End Sub >! Private Sub scrlItemNum_Change() >! RecipeIndex = scrlItemNum.Value >! lblItemNum.Caption = "Item: " & RecipeIndex >! scrlItem1.Value = Item(EditorIndex).Recipe(RecipeIndex) >! End Sub >! Private Sub scrlResult_Change() >! If scrlResult.Value > 0 Then >! lblResult.Caption = "Result: " & Trim$(Item(scrlResult.Value).Name) >! Else >! lblResult.Caption = "Result: None" >! End If >! Item(EditorIndex).Data3 = scrlResult.Value >! End Sub >! Private Sub scrlSmithReq_Change() >! ' If debug mode, handle error then exit out >! If Options.Debug = 1 Then On Error GoTo errorhandler >! If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit Sub >! lblSmith.Caption = "SM: " & scrlSmithReq >! Item(EditorIndex).SmithReq = scrlSmithReq.Value >! ' Error handler >! Exit Sub >! errorhandler: >! HandleError "scrlSmithReq_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext >! Err.Clear >! Exit Sub >! End Sub >! Private Sub scrlEnchantReq_Change() >! ' If debug mode, handle error then exit out >! If Options.Debug = 1 Then On Error GoTo errorhandler >! If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit Sub >! lblEnchants.Caption = "EN: " & scrlEnchantReq >! Item(EditorIndex).EnchantReq = scrlEnchantReq.Value >! ' Error handler >! Exit Sub >! errorhandler: >! HandleError "scrlSwordReq_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext >! Err.Clear >! Exit Sub >! End Sub >! Private Sub scrlAlchemyReq_Change() >! ' If debug mode, handle error then exit out >! If Options.Debug = 1 Then On Error GoTo errorhandler >! If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit Sub >! lblAlchemy.Caption = "Cook: " & scrlAlchemyReq >! Item(EditorIndex).AlchemyReq = scrlAlchemyReq.Value >! ' Error handler >! Exit Sub >! errorhandler: >! HandleError "scrlAlchemyReq_Change", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext >! Err.Clear >! Exit Sub >! End Sub >! Private Sub chkAL_Click() >! ' If debug mode, handle error then exit out >! If Options.Debug = 1 Then On Error GoTo errorhandler >! If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit Sub >! Item(EditorIndex).Alchemist = chkAL.Value >! ' Error handler >! Exit Sub >! errorhandler: >! HandleError "chkAL_Click", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext >! Err.Clear >! Exit Sub >! End Sub >! Private Sub chkEN_Click() >! ' If debug mode, handle error then exit out >! If Options.Debug = 1 Then On Error GoTo errorhandler >! If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit Sub >! Item(EditorIndex).Enchanter = chkEN.Value >! ' Error handler >! Exit Sub >! errorhandler: >! HandleError "chkEN_Click", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext >! Err.Clear >! Exit Sub >! End Sub >! Private Sub chkSM_Click() >! ' If debug mode, handle error then exit out >! If Options.Debug = 1 Then On Error GoTo errorhandler >! If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit Sub >! Item(EditorIndex).Smithy = chkSM.Value >! ' Error handler >! Exit Sub >! errorhandler: >! HandleError "chkSM_Click", "frmEditor_Item", Err.Number, Err.Description, Err.Source, Err.HelpContext >! Err.Clear >! Exit Sub >! End Sub >! Private Sub cmbCTool_Click() >! If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit Sub >! Item(EditorIndex).Tool = cmbCTool.ListIndex >! End Sub >! ``` Ok i think thats it for the item editor if i forgot something let >! me know please… >! **Now form work for the Map editor** >! **frmEditor_Map** >! 1\. Under the >! other map Attributes make a new radio button named : >! **optCraft** >! Set caption to: **Crafting** >! 2. >! Next in picAttributes (to the right side of map editor) make a new frame called: >! **fraCraft** >! Set Caption to: **Crafting** >! 3. >! Inside this new frame make a scroll bar named: >! **scrlCraft** >! 4\. Under the scroll bar make a label named: >! **lblCType** >! Set Caption as : >! **Type:** >! 5.Under that make a command button named: >! **cmdCOk** >! Set caption as: Ok >! Now add this code to the >! bottom of frmEditor_Map >! ``` ' crafting >! Private Sub scrlCraft_Change() >! With lblCType >! Select Case scrlCraft.Value >! Case 0 >! .Caption = "None" >! Case 1 >! .Caption = "Alchemy" >! Case 2 >! .Caption = "Crafting" >! Case 3 >! .Caption = "Enchanting" >! End Select >! End With >! End Sub >! Private Sub optCraft_Click() >! ClearAttributeDialogue >! picAttributes.Visible = True >! fraCraft.Visible = True >! scrlCraft.Max = 3 >! lblCType.Caption = "Type :" & scrlCraft.Value >! End Sub >! '/crafting >! ' crafting >! Private Sub cmdCOk_Click() >! SkillType = scrlCraft.Value >! fraCraft.Visible = False >! picAttributes.Visible = False >! End Sub >! ``` >! Ok now move >! to **frmMain**… >! This next part is up to you as you can >! make this however you want.. It just displays your skill lvs and progress to the >! next level. I made a new button and picture box to display them but you can do >! whatever you want.. >! Make 3 Labels somewhere on **frmMain**. >! Can be in the options, character window, ect.. >! 1\. Name the first label: >! **lblSmith** >! 2\. Name the second : >! **lblAlchemy** >! 3\. And name the third: >! **lblEnchants** >! Beside each of those make 3 more labels and >! name >! them >! 1.**lblSmithExp** >! 2.**lblAlchemyExp** >! 3.**lblEnchantsExp** >! The first 3 labels will show the current level your skills are at and the next 3 show your exp and exp to next level… That shoould be it and now you have a dynamic crafting system with skill levels and seperate crafting stations… Im sure i missed something as im very high so just let me know it all works on my end so no worries... **EDIT:: Under this in modConstants (Client and Server):** ``` ' max number of crafting items Public Const MAX_RECIPE_ITEMS As Long = 5 ``` **Add this:** ``` ' Proficiency Public Const MAX_SKILL_LEVEL As Long = 100 ```
  21. Hmm works fine for me are u sure u have clicked the picscreen first?
  22. I can correct ur problem with a one word fix I'm on my way home and can show u where it is I can't remember
  23. Justn

    NPC Walk/Run Option

    damn just noticed that.. will update now. thanks stein
  24. Justn

    NPC Walk/Run Option

    Not sure what u mean? There is a speed as long in the npcrec but it doesnt do anything :/
  25. Here is the Guild Menu and pic!
×
×
  • Create New...