Wortel Angels Posted July 16, 2012 Author Share Posted July 16, 2012 Thanks to **Justn** i just changed the things to work in D3D8 (DirectX 8)[http://www.touchofde…ic,75028.0.html](http://www.touchofdeathforums.com/smf2/index.php/topic,75028.0.html)Have Fun ;-)Note: In this tutorial we will be adding 5 new equipment slots feel free to add, remove or change as many as you need making the necessary changes for your game. The new slots are gloves(bottom left in picture), boots(bottom right), legwear(bottom center), necklace(top right, the necklace is refered in the tutorial as 'ring' just because thats what i also use it for), and an enchant slot(top left). In the end you should have something that looks like this:This is my char with all the new items equipped: >! [http://www.freemmorp…51ed71ff0d3.bmp](http://www.freemmorpgmaker.com/files/imagehost/pics/756d1ba11157545523f8551ed71ff0d3.bmp)Server SideGo to **modConstants** and make your item constants look like this taking note that the new equipment slots are under the helmet slot and above the shield slot. you need to do this client side also.```Item constantsPublic Const ITEM_TYPE_NONE As Byte = 0Public Const ITEM_TYPE_WEAPON As Byte = 1Public Const ITEM_TYPE_ARMOR As Byte = 2Public Const ITEM_TYPE_HELMET As Byte = 3Public Const ITEM_TYPE_LEGS As Byte = 4 ' NewPublic Const ITEM_TYPE_BOOTS As Byte = 5 ' NewPublic Const ITEM_TYPE_GLOVE As Byte = 6 ' NewPublic Const ITEM_TYPE_RING As Byte = 7 ' NewPublic Const ITEM_TYPE_ENCHANT As Byte = 8 ' NewPublic Const ITEM_TYPE_SHIELD As Byte = 9Public Const ITEM_TYPE_CONSUME As Byte = 10Public Const ITEM_TYPE_KEY As Byte = 11Public Const ITEM_TYPE_CURRENCY As Byte = 12Public Const ITEM_TYPE_SPELL As Byte = 13```Next go to **modEnumerations****Find** :```' Equipment used by PlayersPublic Enum Equipment```This will be the order in which your eq is displayed in the char window to do it as the picture above **make it look like this**:```' Equipment used by PlayersPublic Enum Equipment Enchant = 1 Helmet Ring Weapon Armor Shield Glove Legs Boots ' Make sure Equipment_Count is below everything else Equipment_CountEnd Enum```After that Go to **modPlayer**First:**Find**:```Function GetPlayerProtection(ByVal Index As Long) As Long```Make it look something like this anything new added will be labeled as 'New:```Function GetPlayerProtection(ByVal Index As Long) As Long Dim Armor As Long Dim Helm As Long Dim Legs As Long ' New Dim Boots As Long ' New Dim Glove As Long ' New Dim Ring As Long ' New Dim Enchant As Long ' New GetPlayerProtection = 0 ' Check for subscript out of range If IsPlaying(Index) = False Or Index <= 0 Or Index > Player_HighIndex Then Exit Function End If Armor = GetPlayerEquipment(Index, Armor) Helm = GetPlayerEquipment(Index, Helmet) Legs = GetPlayerEquipment(Index, Legs) ' New Boots = GetPlayerEquipment(Index, Boots) ' New Glove = GetPlayerEquipment(Index, Glove) ' New Ring = GetPlayerEquipment(Index, Ring) ' New Enchant = GetPlayerEquipment(Index, Enchant) ' New GetPlayerProtection = (GetPlayerStat(Index, Stats.Endurance) \ 5) If Armor > 0 Then GetPlayerProtection = GetPlayerProtection + Item(Armor).Data2 End If If Helm > 0 Then GetPlayerProtection = GetPlayerProtection + Item(Helm).Data2 End If ' New If Legs > 0 Then GetPlayerProtection = GetPlayerProtection + Item(Legs).Data2 End If If Boots > 0 Then GetPlayerProtection = GetPlayerProtection + Item(Boots).Data2 End If If Glove > 0 Then GetPlayerProtection = GetPlayerProtection + Item(Glove).Data2 End If If Ring > 0 Then GetPlayerProtection = GetPlayerProtection + Item(Ring).Data2 End If If Enchant > 0 Then GetPlayerProtection = GetPlayerProtection + Item(Enchant).Data2 End If' /NewEnd Function```Second(modPlayer):**Find**:```Sub CheckEquippedItems(ByVal Index As Long)```Where it has the 'Select Case i' make yours to look like this noting that the **new items are under helmet and above shield**```Select Case i Case Equipment.Weapon If Item(ItemNum).Type <> ITEM_TYPE_WEAPON Then SetPlayerEquipment Index, 0, i Case Equipment.Armor If Item(ItemNum).Type <> ITEM_TYPE_ARMOR Then SetPlayerEquipment Index, 0, i 'NEW Case Equipment.Helmet If Item(ItemNum).Type <> ITEM_TYPE_HELMET Then SetPlayerEquipment Index, 0, i Case Equipment.Legs If Item(ItemNum).Type <> ITEM_TYPE_LEGS Then SetPlayerEquipment Index, 0, i Case Equipment.Boots If Item(ItemNum).Type <> ITEM_TYPE_BOOTS Then SetPlayerEquipment Index, 0, i Case Equipment.Glove If Item(ItemNum).Type <> ITEM_TYPE_GLOVE Then SetPlayerEquipment Index, 0, i Case Equipment.Ring If Item(ItemNum).Type <> ITEM_TYPE_RING Then SetPlayerEquipment Index, 0, i Case Equipment.Enchant If Item(ItemNum).Type <> ITEM_TYPE_ENCHANT Then SetPlayerEquipment Index, 0, i ' /New Case Equipment.Shield If Item(ItemNum).Type <> ITEM_TYPE_SHIELD Then SetPlayerEquipment Index, 0, i End Select```Third(modPlayer):**Find** in **Public Sub UseItem** :**Under this**:```Case ITEM_TYPE_HELMET ' stat requirements For i = 1 To Stats.Stat_Count - 1 If GetPlayerRawStat(Index, i) < Item(ItemNum).Stat_Req(i) Then PlayerMsg Index, "You do not meet the stat requirements to equip this item.", BrightRed Exit Sub End If Next ' level requirement If GetPlayerLevel(Index) < Item(ItemNum).LevelReq Then PlayerMsg Index, "You do not meet the level requirement to equip this item.", BrightRed Exit Sub End If ' class requirement If Item(ItemNum).ClassReq > 0 Then If Not GetPlayerClass(Index) = Item(ItemNum).ClassReq Then PlayerMsg Index, "You do not meet the class requirement to equip this item.", BrightRed Exit Sub End If End If ' access requirement If Not GetPlayerAccess(Index) >= Item(ItemNum).AccessReq Then PlayerMsg Index, "You do not meet the access requirement to equip this item.", BrightRed Exit Sub End If If GetPlayerEquipment(Index, Helmet) > 0 Then tempItem = GetPlayerEquipment(Index, Helmet) End If SetPlayerEquipment Index, ItemNum, Helmet PlayerMsg Index, "You equip " & CheckGrammar(Item(ItemNum).Name), BrightGreen TakeInvItem Index, ItemNum, 1 If tempItem > 0 Then GiveInvItem Index, tempItem, 0 ' give back the stored item tempItem = 0 End If Call SendWornEquipment(Index) Call SendMapEquipment(Index) ' send vitals Call SendVital(Index, Vitals.HP) Call SendVital(Index, Vitals.MP) ' send vitals to party if in one If TempPlayer(Index).inParty > 0 Then SendPartyVitals TempPlayer(Index).inParty, Index ' send the sound SendPlayerSound Index, GetPlayerX(Index), GetPlayerY(Index), SoundEntity.seItem, ItemNum```**Add**This:```Case ITEM_TYPE_LEGS ' stat requirements For i = 1 To Stats.Stat_Count - 1 If GetPlayerRawStat(Index, i) < Item(ItemNum).Stat_Req(i) Then PlayerMsg Index, "You do not meet the stat requirements to equip this item.", BrightRed Exit Sub End If Next ' level requirement If GetPlayerLevel(Index) < Item(ItemNum).LevelReq Then PlayerMsg Index, "You do not meet the level requirement to equip this item.", BrightRed Exit Sub End If ' class requirement If Item(ItemNum).ClassReq > 0 Then If Not GetPlayerClass(Index) = Item(ItemNum).ClassReq Then PlayerMsg Index, "You do not meet the class requirement to equip this item.", BrightRed Exit Sub End If End If ' access requirement If Not GetPlayerAccess(Index) >= Item(ItemNum).AccessReq Then PlayerMsg Index, "You do not meet the access requirement to equip this item.", BrightRed Exit Sub End If If GetPlayerEquipment(Index, Legs) > 0 Then tempItem = GetPlayerEquipment(Index, Legs) End If SetPlayerEquipment Index, ItemNum, Legs PlayerMsg Index, "You equip " & CheckGrammar(Item(ItemNum).Name), BrightGreen TakeInvItem Index, ItemNum, 1 If tempItem > 0 Then GiveInvItem Index, tempItem, 0 ' give back the stored item tempItem = 0 End If Call SendWornEquipment(Index) Call SendMapEquipment(Index) ' send vitals Call SendVital(Index, Vitals.HP) Call SendVital(Index, Vitals.MP) ' send vitals to party if in one If TempPlayer(Index).inParty > 0 Then SendPartyVitals TempPlayer(Index).inParty, Index ' send the sound SendPlayerSound Index, GetPlayerX(Index), GetPlayerY(Index), SoundEntity.seItem, ItemNum Case ITEM_TYPE_BOOTS ' stat requirements For i = 1 To Stats.Stat_Count - 1 If GetPlayerRawStat(Index, i) < Item(ItemNum).Stat_Req(i) Then PlayerMsg Index, "You do not meet the stat requirements to equip this item.", BrightRed Exit Sub End If Next ' level requirement If GetPlayerLevel(Index) < Item(ItemNum).LevelReq Then PlayerMsg Index, "You do not meet the level requirement to equip this item.", BrightRed Exit Sub End If ' class requirement If Item(ItemNum).ClassReq > 0 Then If Not GetPlayerClass(Index) = Item(ItemNum).ClassReq Then PlayerMsg Index, "You do not meet the class requirement to equip this item.", BrightRed Exit Sub End If End If ' access requirement If Not GetPlayerAccess(Index) >= Item(ItemNum).AccessReq Then PlayerMsg Index, "You do not meet the access requirement to equip this item.", BrightRed Exit Sub End If If GetPlayerEquipment(Index, Boots) > 0 Then tempItem = GetPlayerEquipment(Index, Boots) End If SetPlayerEquipment Index, ItemNum, Boots PlayerMsg Index, "You equip " & CheckGrammar(Item(ItemNum).Name), BrightGreen TakeInvItem Index, ItemNum, 1 If tempItem > 0 Then GiveInvItem Index, tempItem, 0 ' give back the stored item tempItem = 0 End If Call SendWornEquipment(Index) Call SendMapEquipment(Index) ' send vitals Call SendVital(Index, Vitals.HP) Call SendVital(Index, Vitals.MP) ' send vitals to party if in one If TempPlayer(Index).inParty > 0 Then SendPartyVitals TempPlayer(Index).inParty, Index ' send the sound SendPlayerSound Index, GetPlayerX(Index), GetPlayerY(Index), SoundEntity.seItem, ItemNum Case ITEM_TYPE_GLOVE ' stat requirements For i = 1 To Stats.Stat_Count - 1 If GetPlayerRawStat(Index, i) < Item(ItemNum).Stat_Req(i) Then PlayerMsg Index, "You do not meet the stat requirements to equip this item.", BrightRed Exit Sub End If Next ' level requirement If GetPlayerLevel(Index) < Item(ItemNum).LevelReq Then PlayerMsg Index, "You do not meet the level requirement to equip this item.", BrightRed Exit Sub End If ' class requirement If Item(ItemNum).ClassReq > 0 Then If Not GetPlayerClass(Index) = Item(ItemNum).ClassReq Then PlayerMsg Index, "You do not meet the class requirement to equip this item.", BrightRed Exit Sub End If End If ' access requirement If Not GetPlayerAccess(Index) >= Item(ItemNum).AccessReq Then PlayerMsg Index, "You do not meet the access requirement to equip this item.", BrightRed Exit Sub End If If GetPlayerEquipment(Index, Glove) > 0 Then tempItem = GetPlayerEquipment(Index, Glove) End If SetPlayerEquipment Index, ItemNum, Glove PlayerMsg Index, "You equip " & CheckGrammar(Item(ItemNum).Name), BrightGreen TakeInvItem Index, ItemNum, 1 If tempItem > 0 Then GiveInvItem Index, tempItem, 0 ' give back the stored item tempItem = 0 End If Call SendWornEquipment(Index) Call SendMapEquipment(Index) ' send vitals Call SendVital(Index, Vitals.HP) Call SendVital(Index, Vitals.MP) ' send vitals to party if in one If TempPlayer(Index).inParty > 0 Then SendPartyVitals TempPlayer(Index).inParty, Index ' send the sound SendPlayerSound Index, GetPlayerX(Index), GetPlayerY(Index), SoundEntity.seItem, ItemNum Case ITEM_TYPE_RING ' stat requirements For i = 1 To Stats.Stat_Count - 1 If GetPlayerRawStat(Index, i) < Item(ItemNum).Stat_Req(i) Then PlayerMsg Index, "You do not meet the stat requirements to equip this item.", BrightRed Exit Sub End If Next ' level requirement If GetPlayerLevel(Index) < Item(ItemNum).LevelReq Then PlayerMsg Index, "You do not meet the level requirement to equip this item.", BrightRed Exit Sub End If ' class requirement If Item(ItemNum).ClassReq > 0 Then If Not GetPlayerClass(Index) = Item(ItemNum).ClassReq Then PlayerMsg Index, "You do not meet the class requirement to equip this item.", BrightRed Exit Sub End If End If ' access requirement If Not GetPlayerAccess(Index) >= Item(ItemNum).AccessReq Then PlayerMsg Index, "You do not meet the access requirement to equip this item.", BrightRed Exit Sub End If If GetPlayerEquipment(Index, Ring) > 0 Then tempItem = GetPlayerEquipment(Index, Ring) End If SetPlayerEquipment Index, ItemNum, Ring PlayerMsg Index, "You equip " & CheckGrammar(Item(ItemNum).Name), BrightGreen TakeInvItem Index, ItemNum, 1 If tempItem > 0 Then GiveInvItem Index, tempItem, 0 ' give back the stored item tempItem = 0 End If Call SendWornEquipment(Index) Call SendMapEquipment(Index) ' send vitals Call SendVital(Index, Vitals.HP) Call SendVital(Index, Vitals.MP) ' send vitals to party if in one If TempPlayer(Index).inParty > 0 Then SendPartyVitals TempPlayer(Index).inParty, Index ' send the sound SendPlayerSound Index, GetPlayerX(Index), GetPlayerY(Index), SoundEntity.seItem, ItemNum Case ITEM_TYPE_ENCHANT ' stat requirements For i = 1 To Stats.Stat_Count - 1 If GetPlayerRawStat(Index, i) < Item(ItemNum).Stat_Req(i) Then PlayerMsg Index, "You do not meet the stat requirements to equip this item.", BrightRed Exit Sub End If Next ' level requirement If GetPlayerLevel(Index) < Item(ItemNum).LevelReq Then PlayerMsg Index, "You do not meet the level requirement to equip this item.", BrightRed Exit Sub End If ' class requirement If Item(ItemNum).ClassReq > 0 Then If Not GetPlayerClass(Index) = Item(ItemNum).ClassReq Then PlayerMsg Index, "You do not meet the class requirement to equip this item.", BrightRed Exit Sub End If End If ' access requirement If Not GetPlayerAccess(Index) >= Item(ItemNum).AccessReq Then PlayerMsg Index, "You do not meet the access requirement to equip this item.", BrightRed Exit Sub End If If GetPlayerEquipment(Index, Enchant) > 0 Then tempItem = GetPlayerEquipment(Index, Enchant) End If SetPlayerEquipment Index, ItemNum, Enchant PlayerMsg Index, "You equip " & CheckGrammar(Item(ItemNum).Name), BrightGreen TakeInvItem Index, ItemNum, 1 If tempItem > 0 Then GiveInvItem Index, tempItem, 0 ' give back the stored item tempItem = 0 End If Call SendWornEquipment(Index) Call SendMapEquipment(Index) ' send vitals Call SendVital(Index, Vitals.HP) Call SendVital(Index, Vitals.MP) ' send vitals to party if in one If TempPlayer(Index).inParty > 0 Then SendPartyVitals TempPlayer(Index).inParty, Index ' send the sound SendPlayerSound Index, GetPlayerX(Index), GetPlayerY(Index), SoundEntity.seItem, ItemNum```**Or** you can just add this piece of code for every new item you are adding making sure you place it below Helmet and ABOVE Shield Case and changing '####' to the name of the item:>! ```Case ITEM_TYPE_####>! ' stat requirements>! For i = 1 To Stats.Stat_Count - 1>! If GetPlayerRawStat(Index, i) < Item(ItemNum).Stat_Req(i) Then>! PlayerMsg Index, "You do not meet the stat requirements to equip this item.", BrightRed>! Exit Sub>! End If>! Next>! >! ' level requirement>! If GetPlayerLevel(Index) < Item(ItemNum).LevelReq Then>! PlayerMsg Index, "You do not meet the level requirement to equip this item.", BrightRed>! Exit Sub>! End If>! >! ' class requirement>! If Item(ItemNum).ClassReq > 0 Then>! If Not GetPlayerClass(Index) = Item(ItemNum).ClassReq Then>! PlayerMsg Index, "You do not meet the class requirement to equip this item.", BrightRed>! Exit Sub>! End If>! End If>! >! ' access requirement>! If Not GetPlayerAccess(Index) >= Item(ItemNum).AccessReq Then>! PlayerMsg Index, "You do not meet the access requirement to equip this item.", BrightRed>! Exit Sub>! End If>! If GetPlayerEquipment(Index, #####) > 0 Then>! tempItem = GetPlayerEquipment(Index, ####)>! End If>! SetPlayerEquipment Index, ItemNum, ####>! PlayerMsg Index, "You equip " & CheckGrammar(Item(ItemNum).Name), BrightGreen>! TakeInvItem Index, ItemNum, 1>! If tempItem > 0 Then>! GiveInvItem Index, tempItem, 0 ' give back the stored item>! tempItem = 0>! End If>! Call SendWornEquipment(Index)>! Call SendMapEquipment(Index)>! >! ' send vitals>! Call SendVital(Index, Vitals.HP)>! Call SendVital(Index, Vitals.MP)>! ' send vitals to party if in one>! If TempPlayer(Index).inParty > 0 Then SendPartyVitals TempPlayer(Index).inParty, Index>! >! ' send the sound>! SendPlayerSound Index, GetPlayerX(Index), GetPlayerY(Index), SoundEntity.seItem, ItemNum```Then move over to **modServerTCP**First Find : **Sub SendWornEquipment(ByVal Index As Long)**And Make it look like this taking note the **new items are below Helmet and above shield**:```Sub SendWornEquipment(ByVal Index As Long) Dim packet As String Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong SPlayerWornEq Buffer.WriteLong GetPlayerEquipment(Index, Armor) Buffer.WriteLong GetPlayerEquipment(Index, Weapon) Buffer.WriteLong GetPlayerEquipment(Index, Helmet) Buffer.WriteLong GetPlayerEquipment(Index, Legs) ' New Buffer.WriteLong GetPlayerEquipment(Index, Boots) ' New Buffer.WriteLong GetPlayerEquipment(Index, Glove) ' New Buffer.WriteLong GetPlayerEquipment(Index, Ring) ' New Buffer.WriteLong GetPlayerEquipment(Index, Enchant) ' New Buffer.WriteLong GetPlayerEquipment(Index, Shield) SendDataTo Index, Buffer.ToArray() Set Buffer = NothingEnd Sub```Second(modServerTCP):Right under that sub you will see : **Sub SendMapEquipment**Make it look like this :```Sub SendMapEquipment(ByVal Index As Long) Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong SMapWornEq Buffer.WriteLong Index Buffer.WriteLong GetPlayerEquipment(Index, Armor) Buffer.WriteLong GetPlayerEquipment(Index, Weapon) Buffer.WriteLong GetPlayerEquipment(Index, Helmet) Buffer.WriteLong GetPlayerEquipment(Index, Legs) Buffer.WriteLong GetPlayerEquipment(Index, Boots) Buffer.WriteLong GetPlayerEquipment(Index, Glove) Buffer.WriteLong GetPlayerEquipment(Index, Ring) Buffer.WriteLong GetPlayerEquipment(Index, Enchant) Buffer.WriteLong GetPlayerEquipment(Index, Shield) SendDataToMap GetPlayerMap(Index), Buffer.ToArray() Set Buffer = NothingEnd Sub```Third(modServerTCP): Find right under that sub: **Sub SendMapEquipmentTo**and **just like before** make it look like this making sure the **new equipment is below helmet and above shield**:```Sub SendMapEquipmentTo(ByVal PlayerNum As Long, ByVal Index As Long) Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong SMapWornEq Buffer.WriteLong PlayerNum Buffer.WriteLong GetPlayerEquipment(PlayerNum, Armor) Buffer.WriteLong GetPlayerEquipment(PlayerNum, Weapon) Buffer.WriteLong GetPlayerEquipment(PlayerNum, Helmet) Buffer.WriteLong GetPlayerEquipment(PlayerNum, Legs) Buffer.WriteLong GetPlayerEquipment(PlayerNum, Boots) Buffer.WriteLong GetPlayerEquipment(PlayerNum, Glove) Buffer.WriteLong GetPlayerEquipment(PlayerNum, Ring) Buffer.WriteLong GetPlayerEquipment(PlayerNum, Enchant) Buffer.WriteLong GetPlayerEquipment(PlayerNum, Shield) SendDataTo Index, Buffer.ToArray() Set Buffer = NothingEnd Sub```That should be all for the Server Side.Client SideFirst go to **modConstants** and make your 'item constants look the same as your server```' Item constantsPublic Const ITEM_TYPE_NONE As Byte = 0Public Const ITEM_TYPE_WEAPON As Byte = 1Public Const ITEM_TYPE_ARMOR As Byte = 2Public Const ITEM_TYPE_HELMET As Byte = 3Public Const ITEM_TYPE_LEGS As Byte = 4Public Const ITEM_TYPE_BOOTS As Byte = 5Public Const ITEM_TYPE_GLOVE As Byte = 6Public Const ITEM_TYPE_RING As Byte = 7Public Const ITEM_TYPE_ENCHANT As Byte = 8Public Const ITEM_TYPE_SHIELD As Byte = 9Public Const ITEM_TYPE_CONSUME As Byte = 10Public Const ITEM_TYPE_KEY As Byte = 11Public Const ITEM_TYPE_CURRENCY As Byte = 12Public Const ITEM_TYPE_SPELL As Byte = 13```Second(modConstants): Find **' Character consts**Now this is where your equipment will be drawn on the character window change it to fit your char window and your eq for the picture above i used these settings```' Character constsPublic Const EqTop As Long = 164Public Const EqLeft As Long = 43Public Const EqOffsetX As Long = 3Public Const EqOffsetY As Long = 4Public Const EqColumns As Long = 3```Next go to **modGeneral****Find** in **Public Sub Main()**:```' set the paperdoll order```And make it look something like this keeping **shield on the bottom**:```' set the paperdoll order ReDim PaperdollOrder(1 To Equipment.Equipment_Count - 1) As Long PaperdollOrder(1) = Equipment.Armor PaperdollOrder(2) = Equipment.Helmet PaperdollOrder(3) = Equipment.Legs PaperdollOrder(4) = Equipment.Boots PaperdollOrder(5) = Equipment.Glove PaperdollOrder(6) = Equipment.Ring PaperdollOrder(7) = Equipment.Enchant PaperdollOrder(8) = Equipment.Shield PaperdollOrder(9) = Equipment.Weapon```After that go to **modEnumerations** and do the same thing you did for the server:**Find:**```' Equipment used by Players```and make it look like this and the same as you did for the server```' Equipment used by PlayersPublic Enum Equipment Enchant = 1 Helmet Ring Weapon Armor Shield Glove Legs Boots ' Make sure Equipment_Count is below everything else Equipment_CountEnd Enum```Now go to **modHandleData**First:**Find: **Sub HandlePlayerWornEq(ByVal Index As Long, ByRef Data()**and **make the sub look like this** keeping the **new items above the shield**:```Sub HandlePlayerWornEq(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBuffer ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer Buffer.WriteBytes Data() Call SetPlayerEquipment(MyIndex, Buffer.ReadLong, Armor) Call SetPlayerEquipment(MyIndex, Buffer.ReadLong, Weapon) Call SetPlayerEquipment(MyIndex, Buffer.ReadLong, Helmet) Call SetPlayerEquipment(MyIndex, Buffer.ReadLong, Legs) ' New Call SetPlayerEquipment(MyIndex, Buffer.ReadLong, Boots) ' NEw Call SetPlayerEquipment(MyIndex, Buffer.ReadLong, Glove) ' New Call SetPlayerEquipment(MyIndex, Buffer.ReadLong, Ring) ' New Call SetPlayerEquipment(MyIndex, Buffer.ReadLong, Enchant) ' New Call SetPlayerEquipment(MyIndex, Buffer.ReadLong, Shield) ' changes to inventory, need to clear any drop menu frmMain.picCurrency.Visible = False frmMain.txtCurrency.text = vbNullString tmpCurrencyItem = 0 CurrencyMenu = 0 ' clear frmMain.picInventory.Refresh frmMain.picCharacter.Refresh Set Buffer = Nothing ' Error handler Exit Suberrorhandler: HandleError "HandlePlayerWornEq", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub```Second(modHandleData):**right under that sub find**:```Sub HandleMapWornEq(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)```and **change** it to look like this making sure **shield is on bottom**:```Sub HandleMapWornEq(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim playerNum As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer Buffer.WriteBytes Data() playerNum = Buffer.ReadLong Call SetPlayerEquipment(playerNum, Buffer.ReadLong, Armor) Call SetPlayerEquipment(playerNum, Buffer.ReadLong, Weapon) Call SetPlayerEquipment(playerNum, Buffer.ReadLong, Helmet) Call SetPlayerEquipment(playerNum, Buffer.ReadLong, Legs) ' New Call SetPlayerEquipment(playerNum, Buffer.ReadLong, Boots) ' New Call SetPlayerEquipment(playerNum, Buffer.ReadLong, Glove) ' New Call SetPlayerEquipment(playerNum, Buffer.ReadLong, Ring) ' New Call SetPlayerEquipment(playerNum, Buffer.ReadLong, Enchant) ' New Call SetPlayerEquipment(playerNum, Buffer.ReadLong, Shield) Set Buffer = Nothing ' Error handler Exit Suberrorhandler: HandleError "HandleMapWornEq", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub```Next go to **modGraphics****Find** in **Sub DrawEquipment()**:```With rec_pos .top = EqTop .Bottom = .top + PIC_Y .Left = EqLeft + ((EqOffsetX + 32) * (((i - 1) Mod EqColumns))) .Right = .Left + PIC_X End With```and **change** to```With rec_pos .top = EqTop + ((EqOffsetY + 32) * ((i - 1) \ EqColumns)) .Bottom = .top + PIC_Y .Left = EqLeft + ((EqOffsetX + 32) * (((i - 1) Mod EqColumns))) .Right = .Left + PIC_X End With```Now open up **frmEditor_Item**Right-click 'cmbType' and click properties:![]([url]http://www.freemmorp...94534b22f0e.bmp[/url])[http://www.freemmorp…a705ea8fb13.bmp](http://www.freemmorpgmaker.com/files/imagehost/pics/dcf756c612d15388204bda705ea8fb13.bmp)Then find the 'List' and add the new items![]([url]http://www.freemmorp...6345c64ae27.bmp[/url])EDIT: Make sure in **frmMain**Find in **Private Function IsEqItem**:```.Top = EqTop```And Change to:```.Top = EqTop + ((EqOffsetY + 32) * ((i - 1) \ EqColumns))```and that should be it to add new equipment slots…Here is the NEW character.jpg![](http://www7.pic-upload.de/07.10.12/4yijas97bw51.jpg)put it in /data files/graphics/gui/main/and make the picCharacter look like the one in the attachments or just copy it ;-)MortalAngel** Link to comment Share on other sites More sharing options...
Whackeddie99 Posted July 18, 2012 Share Posted July 18, 2012 Works fine, only error I could see is that when double click an item to unequip it the image is still visible until you click a different button and go back to the character window. Link to comment Share on other sites More sharing options...
Wortel Angels Posted July 18, 2012 Author Share Posted July 18, 2012 hmm…This does not happen to me... only onetime its was showed and is then gone slowfrom top to bottom like an HP bar xD but now it happend not to me Link to comment Share on other sites More sharing options...
Vus Posted July 18, 2012 Share Posted July 18, 2012 "Next go to modDirectDraw7Find in Sub DrawEquipment()"Um… Where can I find that in EO 3.0? It is now modGraphics, isnt it? Link to comment Share on other sites More sharing options...
Wortel Angels Posted July 18, 2012 Author Share Posted July 18, 2012 Oops yes its modgraphics sorry change it Link to comment Share on other sites More sharing options...
Whackeddie99 Posted July 18, 2012 Share Posted July 18, 2012 @Mortal:> hmm…> This does not happen to me... only onetime its was showed and is then gone slow> from top to bottom like an HP bar xD but now it happend not to meUsing DX8 Link to comment Share on other sites More sharing options...
Wortel Angels Posted July 18, 2012 Author Share Posted July 18, 2012 Yes my version of eclipse = Eclipse Ultimate (Only german or pay to translate) Link to comment Share on other sites More sharing options...
Vus Posted July 18, 2012 Share Posted July 18, 2012 @Whack:> Works fine, only error I could see is that when double click an item to unequip it the image is still visible until you click a different button and go back to the character window.That happens to me as wellAlso, this:![](http://img703.imageshack.us/img703/7470/bugnf.png)I have somehow managed to fix that on my old version, but I dont remember how, I figured out that I was missing one of the ".Top = EqTop + ((EqOffsetY + 32) * ((i - 1) \ EqColumns))" lines somewhere I think… :D Link to comment Share on other sites More sharing options...
Wortel Angels Posted July 18, 2012 Author Share Posted July 18, 2012 Hm i changed nothing what have to do with the pictures hmm.. if anyone want send me the source and ill take a look or try it to unequip with right click Link to comment Share on other sites More sharing options...
nneader Posted July 19, 2012 Share Posted July 19, 2012 @Whack:> Works fine, only error I could see is that when double click an item to unequip it the image is still visible until you click a different button and go back to the character window.**My Solution** (worked for me) NOTE the red code. Replace:DrawInventoryDrawEquipmentwith the code in REDin **modHandleData**>! Sub HandlePlayerWornEq(ByVal Index As Long, ByRef data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim buffer As clsBuffer>! ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set buffer = New clsBuffer buffer.WriteBytes data() Call SetPlayerEquipment(MyIndex, buffer.ReadLong, Armor) Call SetPlayerEquipment(MyIndex, buffer.ReadLong, Weapon) Call SetPlayerEquipment(MyIndex, buffer.ReadLong, Helmet) Call SetPlayerEquipment(MyIndex, buffer.ReadLong, Shield) ' changes to inventory, need to clear any drop menu frmMain.picCurrency.Visible = False frmMain.txtCurrency.text = vbNullString tmpCurrencyItem = 0 CurrencyMenu = 0 ' clear frmMain.picInventory.Refresh 'KEEP frmMain.picCharacter.Refresh 'KEEP Set buffer = Nothing ' Error handler Exit Suberrorhandler: HandleError "HandlePlayerWornEq", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub Link to comment Share on other sites More sharing options...
Wortel Angels Posted July 19, 2012 Author Share Posted July 19, 2012 Thanks for the FixAdded to OP Link to comment Share on other sites More sharing options...
Vus Posted July 19, 2012 Share Posted July 19, 2012 @Mortal:> Hm i changed nothing what have to do with the pictures hmm.. if anyone want send me the source and ill take a look or try it to unequip with right clickNo, the thing is, I see item equipped on the upper left, but it is when the red cross is. It is also where I have the cursor. Link to comment Share on other sites More sharing options...
Wortel Angels Posted July 19, 2012 Author Share Posted July 19, 2012 You use the false image… use the one which i use hereIf i use this picCharacter and this image for the tutorial so its logically that u need to use these 2 or ? ;-) Link to comment Share on other sites More sharing options...
Vus Posted July 19, 2012 Share Posted July 19, 2012 @Mortal:> You use the false image… use the one which i use here> If i use this picCharacter and this image for the tutorial so its logically that u need to use these 2 or ? ;-)Its image from old version of my game and it has nothing to do with issue I have. I just used it so you could see what my issue is. Image of item is drawn one 32x32 frame up instead of where the item is. If I use my image as example, I have to click red cross to unequip, but as you can see, axe appears to be more up. Link to comment Share on other sites More sharing options...
Wortel Angels Posted July 19, 2012 Author Share Posted July 19, 2012 hmm then add it again from start to end i think there is an problem with the x / y properties Link to comment Share on other sites More sharing options...
Mithrandirr Posted July 20, 2012 Share Posted July 20, 2012 @Vus:> That happens to me as well> > Also, this:> ![](http://img703.imageshack.us/img703/7470/bugnf.png)> I have somehow managed to fix that on my old version, but I dont remember how, I figured out that I was missing one of the ".Top = EqTop + ((EqOffsetY + 32) * ((i - 1) \ EqColumns))" lines somewhere I think… :DHow did you fix this? Link to comment Share on other sites More sharing options...
Wortel Angels Posted July 20, 2012 Author Share Posted July 20, 2012 Added this ?EDIT: Make sure in frmMainFind in Private Function IsEqItem:```.Top = EqTop```And Change to:```.Top = EqTop + ((EqOffsetY + 32) * ((i - 1) \ EqColumns))``` Link to comment Share on other sites More sharing options...
Mithrandirr Posted July 22, 2012 Share Posted July 22, 2012 Yup. Link to comment Share on other sites More sharing options...
Vus Posted July 24, 2012 Share Posted July 24, 2012 Yea me too. It was something with similiar line when I fixed it last time. I just dont remember what line it was :DEDIT: I have tried creating other items, and Everything displays in same line like weapons etc. Text and such are in right place,but icon is in same line. Link to comment Share on other sites More sharing options...
Eevee204 Posted August 3, 2012 Share Posted August 3, 2012 Everything compiled nicely, but getting error 9, subscript out of range, you able to post up a full version of the Eclipse 3.0 with this feature added in? Link to comment Share on other sites More sharing options...
Wortel Angels Posted August 3, 2012 Author Share Posted August 3, 2012 If i got time ill do it ;-)Else if anone got it working pls post link to download here Link to comment Share on other sites More sharing options...
lcarens Posted August 3, 2012 Share Posted August 3, 2012 I had used the old tutorial for 3.0, and I haven't had any problems thus far. Link to comment Share on other sites More sharing options...
Eevee204 Posted August 5, 2012 Share Posted August 5, 2012 Never mind, I got it. Link to comment Share on other sites More sharing options...
Alerd Posted October 6, 2012 Share Posted October 6, 2012 Here is the NEW character.jpgput it in /data files/graphics/gui/main/where is link..? Link to comment Share on other sites More sharing options...
Wortel Angels Posted October 7, 2012 Author Share Posted October 7, 2012 ![](http://www7.pic-upload.de/07.10.12/4yijas97bw51.jpg)Here… sorry all attached files are removed -.- 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