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

[EOv2.0] How To Add New Equipment Slots


Justn
 Share

Recommended Posts

I'm having trouble now. I added an item "Legs". All went well, but at the end. I compile and i get an error in this bar of code.

>! Private Function IsEqItem(ByVal x As Single, ByVal y As Single) As Long
    Dim tempRec As RECT
    Dim i As Long

    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler
>!     IsEqItem = 0
>!     For i = 1 To Equipment.Equipment_Count - 1
>!         If GetPlayerEquipment(MyIndex, i) > 0 And GetPlayerEquipment(MyIndex, i) <= MAX_ITEMS Then
>!             With tempRec
                .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

It worked before with the whole tutorial, but now it doesnt with the one extra item. Is there something i missed or screwed up?
Link to comment
Share on other sites

  • Replies 128
  • Created
  • Last Reply

Top Posters In This Topic

You put this code in sub IsEqitem instead of  Sub BltEquipment

@Sigridunset:

> With tempRec
>                 .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
Link to comment
Share on other sites

>! Private Function **IsEqItem**(ByVal x As Single, ByVal y As Single) As Long
    Dim tempRec As RECT
    Dim i As Long

    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler
>!     IsEqItem = 0
>!     For i = 1 To Equipment.Equipment_Count - 1
>!         If GetPlayerEquipment(MyIndex, i) > 0 And GetPlayerEquipment(MyIndex, i) <= MAX_ITEMS Then
>!             With tempRec
                .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

I know. I checked for that before i replied.
Link to comment
Share on other sites

Yes if u just want to add one slot then skip the step for moddirectdraw7 and skip the last step in frmmain.

Also in the "char constants" part change eqcolumns to 5 then play around the other numbers there to get the spacing correct ill make a note in the tutorial
Link to comment
Share on other sites

Hmm I have no idea how to do this off the top of my head I guess it would just require removing the other items from use item sub and changing the get protection stuff to only use armor and not helmets and removing/changing anything to do with weapons and shields.. ill smoke a blunt and try it on a default EO and see if I can do it.. ill let u know what I come up with
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
@ComingStorm:

> Function GetPlayerEquipment
>
> GetPlayerEquipment = Player(Index).Equipment(EquipmentSlot)  <<<<
>
> Runtime Eror #9
>
> Help me plz

I'm having the same problem.

If anyone knows fix would greatly appreciate it.
Link to comment
Share on other sites

@Justn:

> Did u guys delete ur old accounts first?

Yes,
–----------
After many modifications the problem was solved.
Now my item does not show the Frame "Equipment Data", if anyone knows where I should modify to tell it appears the "Equipment Data".

Thanks in advance.
Link to comment
Share on other sites

@Justn:

> That is something u have done ur self I have added this tutorial many times with not a single issue.. if u want u can send me ur source before u added it and I will do it for you…

Adding  according to the tutorial, only difference and put only one item. (Wing)
–-----------
As reverse the item in "Item Constants" appears "Spell, Consume ...." nothing of "Equipment Data".
Link to comment
Share on other sites

im sorry im having trouble understanding the problem maybe can you explain whats going on or send me a message.. Also if you are adding just one slot you don't need to add the dd7 stuff or the edit for frmmain.
Link to comment
Share on other sites

@Justn:

> im sorry im having trouble understanding the problem maybe can you explain whats going on or send me a message.. Also if you are adding just one slot you don't need to add the dd7 stuff or the edit for frmmain.

I added everything correctly, but it happens, the menu "Equipmente Date" where I would add the bonus to the new item does not appear.

Armor: ![](http://img402.imageshack.us/img402/7674/armora.jpg)

Wing: ![](http://img252.imageshack.us/img252/1651/winge.jpg)
Link to comment
Share on other sites

@Justn:

> welll the easiest thing would be for you to make sure that you put "wing" above shield in the item type list

My modConstants

' Item constants
Public Const ITEM_TYPE_NONE As Byte = 0
Public Const ITEM_TYPE_WEAPON As Byte = 1
Public Const ITEM_TYPE_ARMOR As Byte = 2
Public Const ITEM_TYPE_HELMET As Byte = 3
Public Const ITEM_TYPE_WING As Byte = 4
Public Const ITEM_TYPE_BRAZAO As Byte = 5
Public Const ITEM_TYPE_RING As Byte = 6
Public Const ITEM_TYPE_BRACELET As Byte = 7
Public Const ITEM_TYPE_ENCHANT As Byte = 8
Public Const ITEM_TYPE_SHIELD As Byte = 9
Public Const ITEM_TYPE_CONSUME As Byte = 10
Public Const ITEM_TYPE_KEY As Byte = 11
Public Const ITEM_TYPE_CURRENCY As Byte = 12
Public Const ITEM_TYPE_SPELL As Byte = 13

Added other items to test, they were all out of order panel.

NONE… WING.. Key - Current = Equipment Data

Brazao = Consume

Ring - Bracelet = went blank

Currency = Equipmanet Data

Enchant = Spell
Link to comment
Share on other sites

Oh I mean in the item editor also the cmbtype list make sure shield is below ur new items

![](http://www.freemmorpgmaker.com/files/imagehost/pics/77b72c87563550acfc48d94534b22f0e.bmp)

Cause if u click on the cmbtype u will see that frame equipment  data is set to be visible if the item is a weapon and everything until u get after the shield so anything after shield in the list won't display the frame
Link to comment
Share on other sites

@Justn:

> Oh I mean in the item editor also the cmbtype list make sure shield is below ur new items
>
> ![](http://www.freemmorpgmaker.com/files/imagehost/pics/77b72c87563550acfc48d94534b22f0e.bmp)
>
> Cause if u click on the cmbtype u will see that frame equipment  data is set to be visible if the item is a weapon and everything until u get after the shield so anything after shield in the list won't display the frame

Thank you for your attention, my cmdType two item was wrong.

My lack of attention here :) , more, thank you al for your help.
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...