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

  • 2 weeks later...
  • 2 months later...
I can't find out where ' Currency is ! :3    Thank you :)

```
Public Sub UpdateDescWindow(ByVal itemnum As Long, ByVal x As Long, ByVal y As Long)
Dim i As Long
Dim FirstLetter As String * 1
Dim Name As String
Dim Item1 As Long
Dim Item2 As Long

    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    FirstLetter = LCase$(Left$(Trim$(Item(itemnum).Name), 1))

    If FirstLetter = "$" Then
        Name = (Mid$(Trim$(Item(itemnum).Name), 2, Len(Trim$(Item(itemnum).Name)) - 1))
    Else
        Name = Trim$(Item(itemnum).Name)
    End If

    ' check for off-screen
    If y + frmMain.picItemDesc.height > frmMain.ScaleHeight Then
        y = frmMain.ScaleHeight - frmMain.picItemDesc.height
    End If

    ' set z-order
    frmMain.picItemDesc.ZOrder (0)

    With frmMain
        .picItemDesc.top = y
        .picItemDesc.Left = x
        .picItemDesc.Visible = True

        If LastItemDesc = itemnum Then Exit Sub ' exit out after setting x + y so we don't reset values

        ' set the name
        Select Case Item(itemnum).Rarity
            Case 0 ' white
                .lblItemName.ForeColor = RGB(255, 255, 255)
            Case 1 ' green
                .lblItemName.ForeColor = RGB(117, 198, 92)
            Case 2 ' blue
                .lblItemName.ForeColor = RGB(103, 140, 224)
            Case 3 ' maroon
                .lblItemName.ForeColor = RGB(205, 34, 0)
            Case 4 ' purple
                .lblItemName.ForeColor = RGB(193, 104, 204)
            Case 5 ' orange
                .lblItemName.ForeColor = RGB(217, 150, 64)
        End Select

        ' set captions
        .lblItemName.Caption = Name
        .lblItemDesc.Caption = Trim$(Item(itemnum).Desc)

        ' render the item
        BltItemDesc itemnum
    End With

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "UpdateDescWindow", "modGameLogic", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub

```
Code tags, as you were citizen.
Link to comment
Share on other sites

I've read the tutorial for EOv2, and I'm confused at where I can find "Set Buffer = Nothing". I find one under modPlayer>PlayerWarp, but not UseItem. I find it under HandleUseItem, and put```
    Dim Item1 As Long, Item2, Result
```there but it still gives me an error "Compile error: Variable not defined" and highlights "Item 1 =".

I kinda wish everyone who figured out where to put it would explain what they did so this problem wouldn't keep coming up. >.<

Anyone know the solution to this?
Link to comment
Share on other sites

@Whack:

> I have a question: What is cmbCTool for? isn't cmbCToolReq the required tool to make it? what is cmbctool then?

the ctool combo should go into the weapon frame…that way you can set the type of tool you are creating...ie a mortar an pestle which is used when you create a recipe with ctoolreq.  I also added into modGameEditors\ItemEditorInit in item_type_weapon section:
```
frmEditor_Item.cmbCTool.ListIndex = .Tool

```
finally completed this as my first tutorial and now going to add the weapon profinciency tutorial so that alchemy can raise by using a mortar & pestle a lot.
Link to comment
Share on other sites

  • 5 weeks later...
I need help!
In server side, i go to the 'HandleUseItem' sub. I find 'Set Buffer = Nothing' below "' get inventory slot number"
I can't find 'End Select' in the sub. Above the 'End Sub' I can only see a 'UseItem Index, invNum' so i just add
'Case…...' below 'Dim Item1 As Long, Item2, Result' But when i try to compile it give the following error

Compile Error:

Case without case select.

Wat should I do plzz help!? :sad:
Link to comment
Share on other sites

Finally got around to updating this thing to work for EO 2.0, it seems some were still having trouble with it. Follow the first post and you should be able to get it working in EO 2.0 with no problem. I also fixed a few bugs along the way.

- Combo Box variables not saving
- Recipe frame not loading when Recipe is selected
- Item description for recipes shows you what items you need, and what tool you need to use
- Included a new frmEditor_Item with the project
- Fits to work with other tweaks made from EO 1.1.0 - 2.0.

Still run into an error? Let me know and I'll fix it.
Link to comment
Share on other sites

  • 3 weeks later...
@Domino_:

> For now there is only 2 item combination, to make more item combination I need add Data4, Data5 as example? I know its not only in one place where need to add but is that the best way to do this?

That is one way of doing it, but I think the best way is to use an array.
Example:
```
Item(ItemNum).RecipeItem(Index)
```
Link to comment
Share on other sites

In the UseItem sub, have it check for the max amount of items you set in a recipe, and then have it request the items based on how many are needed. For instance, if you set 2 items, it'll ask for those two items only. It's better to use arrays.
Link to comment
Share on other sites

Im trying to make only 1 item for recipe how to do that?
Do I need to make new recipe coding only for req item 1? and make new whole code for 3 requestable items?
Because now from 2 requestable items I cant make only one requestable, he says that Recipe is not complete.
So I need to make If Item1 <= 0 Or Item2 <= 0 as If Item1 < 0 Or Item2 < 0 or If Item1 <= 1 Or Item2 <= 1 ?
Link to comment
Share on other sites

  • 4 weeks later...

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...