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

[EO] Crafting, Blacksmithing, Alchemy, Ect. v.2.0.0


DJMaxus
 Share

Recommended Posts

  • Replies 137
  • Created
  • Last Reply

Top Posters In This Topic

Ok guys I've fixed some bugs in this…

I've made it so that the item editor loads every item. Make sure you choose an item that is a weapon type, as the item needs to be equipped to the weapon slot for a recipe to work that way.

Follow these instructions:

**CLIENT**

Find:
```
Private Sub cmbCToolReq_Change()
```
Replace ONLY that line with:
```
Private Sub cmbCToolReq_Click()
```
Find:
```
If (frmEditor_Item.cmbType.ListIndex = ITEM_TYPE_RECIPE) Then
```
Change that whole section to:
```
        If (frmEditor_Item.cmbType.ListIndex = ITEM_TYPE_RECIPE) Then
            frmEditor_Item.fraRecipe.Visible = True
            frmEditor_Item.scrlItem1.Value = .Data1
            frmEditor_Item.scrlItem2.Value = .Data2
            frmEditor_Item.scrlResult.Value = .Data3
            For i = 1 To MAX_ITEMS
                frmEditor_Item.cmbCToolReq.AddItem Trim$(Item(i).Name)
            Next i
            frmEditor_Item.cmbCToolReq.ListIndex = .ToolReq
        Else
            frmEditor_Item.fraRecipe.Visible = False
        End If
```
Goto the item editor form and remove the items from the List property except "None".

**SERVER**

Find:
```
Case ITEM_TYPE_RECIPE
```
Replace that whole section with:
```
            Case ITEM_TYPE_RECIPE
                ' Get the recipe information
                Item1 = Item(GetPlayerInvItemNum(index, invNum)).Data1
                Item2 = Item(GetPlayerInvItemNum(index, invNum)).Data2
                Result = Item(GetPlayerInvItemNum(index, invNum)).Data3

                ' Perform Recipe checks
                If Item1 <= 0 Or Item2 <= 0 Or Result <= 0 Then
                    Call PlayerMsg(index, "This is an incomplete recipe...", White)
                    Exit Sub
                End If

                If Item(GetPlayerInvItemNum(index, invNum)).ToolReq > 0 Then
                    If GetPlayerEquipment(index, Weapon) <> Item(GetPlayerInvItemNum(index, invNum)).ToolReq Then
                        Call PlayerMsg(index, "You don't have the proper tool equipped!", White)
                        Exit Sub
                    Else
                        ' Give the resulting item
                        If HasItem(index, Item1) And HasItem(index, Item2) Then
                            Call TakeInvItem(index, Item1, 1)
                            Call TakeInvItem(index, Item2, 1)
                            Call GiveInvItem(index, Result, 1)
                            Call TakeInvItem(index, GetPlayerInvItemNum(index, invNum), 0)
                            Call PlayerMsg(index, "You have successfully created " & Trim(Item(Result).Name) & ".", White)
                        Else
                            Call PlayerMsg(index, "You do not have all of the ingredients.", White)
                            Exit Sub
                        End If
                    End If
                Else
                    ' Give the resulting item
                    If HasItem(index, Item1) And HasItem(index, Item2) Then
                        Call TakeInvItem(index, Item1, 1)
                        Call TakeInvItem(index, Item2, 1)
                        Call GiveInvItem(index, Result, 1)
                        Call TakeInvItem(index, GetPlayerInvItemNum(index, invNum), 0)
                        Call PlayerMsg(index, "You have successfully created " & Trim(Item(Result).Name) & ".", White)
                    Else
                        Call PlayerMsg(index, "You do not have all of the ingredients.", White)
                        Exit Sub
                    End If
                End If
```
Note, that the tool combo box on the equipment frame in the item editor now renders useless.

Only add this change if you want your system to work like mine.

Any issues? Let me know.
Link to comment
Share on other sites

  • 2 weeks later...
ok i got everything looking good on the server side compiled no problems did the client side and form editor compiled no problems but now my new comboboxes and labels and the whole frame arent showing up in the item editor? i have been playing around with it for awhile i dont see what i did wrong… any ideas?
Link to comment
Share on other sites

  • 4 weeks later...
@Justn:

> ok i got everything looking good on the server side compiled no problems did the client side and form editor compiled no problems but now my new comboboxes and labels and the whole frame arent showing up in the item editor? i have been playing around with it for awhile i dont see what i did wrong… any ideas?

I am having the same issue
Link to comment
Share on other sites

**FOR THOSE STILL TRYING TO FIGURE OUT THIS PROBLEM:**

@Sekaru:

> FraRecipe doesn't show up for me. Added it to the lists, etc, but it doesn't show when the item type is Recipe, any ideas?

@Justn:

> comboboxes and labels and the whole frame arent showing up in the item editor

@Forgotten:

> I am having the same issue

**etc.**

When you put everything as told in this thread, you still need to do one thing for fraRecipe to show up:

1\. Open up the code for frmEditor_Item.
2\. Find the function "Private Sub cmbType_Click()".
3\. Add the following code before "Item(EditorIndex).Type = cmbType.ListIndex":

>! If (cmbType.ListIndex = ITEM_TYPE_RECIPE) Then
        fraRecipe.Visible = True
    Else
        fraRecipe.Visible = False
    End If
@DJMaxus:

> If you decide to use the frmEditor_Item I have included with this topic, you do not have to follow the steps below and are done with the tutorial.

This part of the code exists in the attached form, but the attached form does not work with new version of EO so i DO NOT recommend using it.

@Xlithan:

> And don't overwrite your EO 2.0 forms with the ones attached to the OP, like I did lol.

I guess DJMaxus forgot to mention that you have to add it in the "FORM WORK:" part.
Link to comment
Share on other sites

@Apple:

> How do I make this compatible with EO2.0?
> I'm desperate. xD

Rose posted on how to do it for version 2.0 [http://www.touchofdeathforums.com/smf/index.php/topic,64806.msg754735.html#msg754735](http://www.touchofdeathforums.com/smf/index.php/topic,64806.msg754735.html#msg754735)
Link to comment
Share on other sites

@Rose:

> modPlayer -> _Public Sub UseItem_
>
> Below:
> ```
> Set Buffer = Nothing
>
> ```

I cannot find that line of code under here ->modPlayer -> _Public Sub UseItem_ maybe that is something you modded in that others don't have? Cause the only place I am finding Set Buffer = Nothing is under Sub On Death….

*Edit, I found out where to put it lol, but might wanna check into that
Link to comment
Share on other sites

@kira423:

> I cannot find that line of code under here ->modPlayer -> _Public Sub UseItem_ maybe that is something you modded in that others don't have? Cause the only place I am finding Set Buffer = Nothing is under Sub On Death….
>
> *Edit, I found out where to put it lol, but might wanna check into that

Me too. :P (I go to ModCombat O.O)
Where do I put it?
Link to comment
Share on other sites

well after 2 hours i got it working, man it sure does make you learn alot about how its put together when adding all these things.  now i even know how to make new menus and windows ect.  all that from 1 little tut.  i used eo source 2.0 btw and it all works!

thanks alot for this.
Link to comment
Share on other sites

the hammer has to be a weapon, then set to whatever it is.  so you can equip the hammer to make whatever it is you want in the end.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...