[EO] LevelUp Item

So i finally update my Topic , sorry but i tried to do that Random Thing but it really suck , for real… it make players get easy level hehehe…

So this update will allow you to set the item level up details by your choise , and if you say that this is an easy made , you got it wrong because there are more calculations needed to make it works , for example an item that give you 90 level but your level is 50 and max level is 100 … what will happen? at my first try it failed , the item give 0 level… so i calculate it to make it work!

Let’s start …

Server and Client Side~

at Item constants in modConstants add this value


Public Const ITEM_TYPE_LEVEL As Byte = *number of the next value*

Client Side~

Find


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

Add this below it


If (frmEditor_Item.cmbType.ListIndex = ITEM_TYPE_LEVEL) Then

            frmEditor_Item.fraLevel.Visible = True

            frmEditor_Item.scrlLevelSet.Value = .Data1

        Else

            frmEditor_Item.fraLevel.Visible = False

        End If

Next find


If (cmbType.ListIndex = ITEM_TYPE_SPELL) Then

        fraSpell.Visible = True

    Else

        fraSpell.Visible = False

    End If

Add this below it


If (cmbType.ListIndex = ITEM_TYPE_LEVEL) Then

        fraLevel.Visible = True

    Else

        fraLevel.Visible = False

    End If

at cmbType Add “Level” at the list

Form Work at Client Side~

Add a frame name it fraLevel

Add a label at the frame name it lblLevelSet

Add a scroll at the frame name it scrlLevelSet

Double Click the scrlLevelSet and add this


If scrlLevelSet.Value > 0 Then

        lblLevelSet.Caption = "Level Give: " & scrlLevelSet.Value

    End If

    Item(EditorIndex).Data1 = scrlLevelSet.Value

Server Side~

Add this at Public Sub UseItem


Case ITEM_TYPE_LEVEL

            ' 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 use 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 use 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 use 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 use this item.", BrightRed

                    Exit Sub

                End If

                If Item(itemnum).Data1 > 0 Then

                    If GetPlayerLevel(index) < MAX_LEVELS Then

                        If GetPlayerLevel(index) + Item(itemnum).Data1 >= MAX_LEVELS Then

                            SetPlayerLevel index, MAX_LEVELS

                            CheckPlayerLevelUp index

                            If Item(itemnum).Data1 = 1 Then

                                'singular

                                Call PlayerMsg(index, "You gained " & Item(itemnum).Data1 & " level!", Brown)

                            Else

                                'plural

                                Call PlayerMsg(index, "You gained " & Item(itemnum).Data1 & " levels!", Brown)

                            End If

                            Call TakeInvItem(index, itemnum, 0)

                            Exit Sub

                        Else

                            SetPlayerLevel index, GetPlayerLevel(index) + Item(itemnum).Data1

                            CheckPlayerLevelUp index

                            If Item(itemnum).Data1 = 1 Then

                                'singular

                                Call PlayerMsg(index, "You gained " & Item(itemnum).Data1 & " level!", Brown)

                            Else

                                'plural

                                Call PlayerMsg(index, "You gained " & Item(itemnum).Data1 & " levels!", Brown)

                            End If

                            Call TakeInvItem(index, itemnum, 0)

                            Exit Sub

                        End If

                    Else

                        PlayerMsg index, "You are at the max level.", BrightRed

                        Exit Sub

                    End If

                Else

                    PlayerMsg index, "This is a incomplete item , Please report this to any Staff Members.", BrightRed

                    Exit Sub

                End If

I added this


If Item(itemnum).Data1 = 1 Then

                                'singular

                                Call PlayerMsg(index, "You gained " & Item(itemnum).Data1 & " level!", Brown)

                            Else

                                'plural

                                Call PlayerMsg(index, "You gained " & Item(itemnum).Data1 & " levels!", Brown)

                            End If

because you don’t recieve any Message after you use the item xD! if anyone can fix that , you can just fix it hehe…

Your done! I hope you credits me for this :P

Thank You~

~Sherwin

Adding an level scrollbar 😉 and i like it

hey dude im really confuse about this part:

On frmEditor_Item add “Level” on cmbType

where i add “Level” can u show me with a picture. where i add level?

cmbType -> Propertyes-> List -> Add there Level

cmbtype is the one drop down menu where you choose the item type

ill replace the name cmbtype for level?

no, you add it into the list inside that.

i dont know how to do this. cuz im new in this. if u show me a picture.

i dont know if im doing right but i add level like this:

If (cmbType.ListIndex = ITEM_TYPE_LEVEL) Then

fralevel.Visible = True

Else

fralevel.Visible = False

if im wrong just tell me plz.

In the dragdown thing at the propertyes into the list…

Please learn first the basics…

The code which you put there is to make the fralevel visible and invisible

And PS my item form looks different thay yours because i added much other stuff

thanks u men but how work?

thanks u men but how work?

Yes

Finish if you use that item then youll get one level if you done it correct

level up item-> Gives you one level

for example i make a sword.

first i choose weapon at the option list for create the sword then i save. no with level option like a normal sword.

then i use the sword and work perfecly. now here the part. when i go to the editor for change the sword option to level i choose that. next i save i go to use the sword but with that option dont let me use it. i doble click and nothing happend.

but if i do all right. u say when i use this item it give to me a level for example if im level 14 and i used that item give me and next level 15.

Its an Item not an weapon

If you done it correct then you EAT the item and it dissapears…

And then you get one level nothing to equip

i’m going to update this once i got on my computer … i’ll add a random / set level up item , (you can set the level giving or make it random)

nice work sherwin. cant wait for the update. :) just a thought but cant use also set it to give exp? reason even tho an item for level giving is great to have but its not something you want to float around alot b/c leveling go to fast. but an item for Exp will help in leveling but wont make it too fast. both are equaly useful xD. but great job with tut and cant wait for ur next update. :)!

nice work sherwin. cant wait for the update. :) just a thought but cant use also set it to give exp? reason even tho an item for level giving is great to have but its not something you want to float around alot b/c leveling go to fast. but an item for Exp will help in leveling but wont make it too fast. both are equaly useful xD. but great job with tut and cant wait for ur next update. :)!

I was busy on school so i can’t update it earlier … anyway giving exp? use Consume…

I finish the Set Level like you can set the item giving level for example an Gold Berry give 5 levels … but i’m still doing the random thing , too busy at school really 😧

UPDATED !!~~ Bump

Sweet, need to update my client now xD

tell me if you have a problem with it…

Log in to reply