Print Page | Close Window

Adding New Item Types

Printed From: Mirage Source
Category: Tutorials
Forum Name: Temporary Archive (Read Only)
Forum Discription: Temporary 3.0.3 archive tutorials, will be deleted when converted.
URL: http://ms.shannaracorp.com/backup-forums/forum_posts.asp?TID=143
Printed Date: 20 December 2006 at 5:52pm
Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com


Topic: Adding New Item Types
Posted By: Sync
Subject: Adding New Item Types
Date Posted: 11 February 2006 at 3:06pm
Difficulty: Hard 5/5

Originaly Posted By: Murdoc

do not claim this as your own!
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
'//         &nb sp;         &nb sp;         &nb sp;         &nb sp;       \\
'\\    Source author:          ;           ;          \\
'//      Kevin Grubert          ;           ;          \\
'\\    Source name:         & nbsp;         & nbsp;         & nbsp;   \\
'//      Item Addition        &nbs p;         &nbs p;         &nbs p; //
'\\         &nb sp;         &nb sp;         &nb sp;         &nb sp;         //
'//    Source provided by:         &nb sp;         &nb sp;    //
'\\      KG http://grubert.lunaticsworld.com     //
'//////////////////////////////////////////////////

In this tutorial i will tell you howto add addition item slots, allowing you to have a more unique game!
I will add boots, and gloves, as we go along you may add or change more itemtypes by changing a thing or two

To begin, we first open the server
+----------------------------------------------------------- ---------------+
|      ________      ________      _____  ___      ___   ________   _____  |
|     /  _____/     /  _____/     / __ /  \  \    /  /  /  _____/  / __ /  |
|    /  /____      /  /____      / /_//    \  \  /  /  /  /____   / /_//   |
|   /_____  /     /  _____/     / ___ \     \  \/  /  /  _____/  / ___ \   |
|   _____/ /     /  /____      / /   \ \     \    /  /  /____   / /   \ \  |
|  /______/     /_______/     /_/     \_\     \__/  /_______/  /_/     \_\ |
+----------------------------------------------------------- ---------------+
then we goto <modTypes>
Scroll down to <' Item constants>
then at the bottom of the list, after <Public Const ITEM_TYPE_SPELL = 13>
add
----------
  Public Const ITEM_TYPE_BOOTS = 14 'you can change the part that says BOOTS to suit your game
  Public Const ITEM_TYPE_GLOVES = 15 'you can also change gloves too!
----------

now scroll down to <' Worn equipment> in <Type PlayerRec> still in modTypes!

now right after <ShieldSlot As Byte> add:
  BootsSlot As Byte
  GlovesSlot As Byte
'you can always change boots and/or gloves to suit your game, you may also add more buy changing any additional variables and by changing the name of the item.


righty-o's! onto the next sub!
now, still in modTypes, look for <Sub ClearPlayer>

then right after <Player(Index).Char(i).ShieldSlot = 0>
add
----------
  Player(Index).Char(i).BootsSlot = 0
  Player(Index).Char(i).GlovesSlot = 0
----------

now, under that sub you should come across <Sub ClearChar>
basicly the same as before, right after <Player(Index).Char(CharNum).ShieldSlot = 0>
add
----------
  Player(Index).Char(CharNum).BootsSlot = 0
  Player(Index).Char(CharNum).GlovesSlot = 0
----------




now then you have to create 4 subs/functions for getting and setting the player's gloves and boots
scroll to the bottom of the module, and make sure you are not in ANY subs, then add these to the bottom:
----------

Function GetPlayerGlovesSlot(ByVal Index As Long) As Long
    GetPlayerRingLeftSlot = Player(Index).Char(Player(Index).CharNum).GlovesSlot
End Function

Sub SetPlayerGlovesSlot(ByVal Index As Long, InvNum As Long)
    Player(Index).Char(Player(Index).CharNum).GlovesSlot = InvNum
End Sub


Function GetPlayerBootsSlot(ByVal Index As Long) As Long
    GetPlayerRingLeftSlot = Player(Index).Char(Player(Index).CharNum).BootsSlot
End Function

Sub SetPlayerBootsSlot(ByVal Index As Long, InvNum As Long)
    Player(Index).Char(Player(Index).CharNum).BootsSlot = InvNum
End Sub

----------

Yay! you've finished the whole of the modTypes Module! But that was the easy part.




NOW! goto <modServerTCP>!
before we tackle the hard part, ill do the easier one first,
so find <Sub SendWornEquipment>
change
---
Packet = "PLAYERWORNEQ" & SEP_CHAR & GetPlayerArmorSlot(Index) & SEP_CHAR & GetPlayerWeaponSlot(Index) & SEP_CHAR & GetPlayerHelmetSlot(Index) & SEP_CHAR & GetPlayerShieldSlot(Index) & SEP_CHAR & END_CHAR
---
to
----------
Packet = "PLAYERWORNEQ" & SEP_CHAR & GetPlayerArmorSlot(Index) & SEP_CHAR & GetPlayerWeaponSlot(Index) & SEP_CHAR & GetPlayerHelmetSlot(Index) & SEP_CHAR & GetPlayerShieldSlot(Index) & SEP_CHAR & GetPlayerBootsSlot(Index) & SEP_CHAR & GetPlayerGlovesSlot(Index) & SEP_CHAR & END_CHAR 'Be careful of your spelling on this one!
----------

now the fun one!
goto Sub HandleData
find <' :: Use item packet ::>
now follow this carefully!
after
---
Case ITEM_TYPE_SHIELD
                     If InvNum <> GetPlayerShieldSlot(Index) Then
                          Call SetPlayerShieldSlot(Index, InvNum)
                     Else
                          Call SetPlayerShieldSlot(Index, 0)
                     End If
                     Call SendWornEquipment(Index)
---
add
----------
Case ITEM_TYPE_GLOVES
                     If InvNum <> GetPlayerGlovesSlot(Index) Then
                          If Int(GetPlayerDEF(Index)) < n Then
                              Call PlayerMsg(Index, "Your defence is to low to use the gloves!  Required DEF (" & n & ")", BrightRed)
                              Exit Sub
                          End If
                          Call SetPlayerGlovesSlot(Index, InvNum)
                     Else
                          Call SetPlayerGlovesSlot(Index, 0)
                     End If
                     Call SendWornEquipment(Index)
----------
and
----------
Case ITEM_TYPE_BOOTS
                     If InvNum <> GetPlayerBootsSlot(Index) Then
                          If Int(GetPlayerDEF(Index)) < n Then
                              Call PlayerMsg(Index, "Your defence is to low to use these boots!  Required DEF (" & n & ")", BrightRed)
                              Exit Sub
                          End If
                          Call SetPlayerBootsSlot(Index, InvNum)
                     Else
                          Call SetPlayerBootsSlot(Index, 0)
                     End If
                     Call SendWornEquipment(Index)
----------
change the stat requirement as you want it for your game.

                                              ___
     _______      __   __    _______     /  /
    / ____  |    / /  / /   / ___  /    /  /
   / /___/ /    / /  / /   / /   |/    /  /
  / ______ \   / /  / /   / /  ___    /__/
 / /_____/ /  / /__/ /   / /___\ /   ___
/_________/  |______/   /_______/   /__/
Ohhhh! Theres a small bug in the code around here.
though not a serious one, but it can prove to be annoying for players
its in:
<Call PlayerMsg(Index, "Your ------ is to low to wear this -------!  Required --- (" & n * 2 & ")", BrightRed)> for each item case!
note that the <n * 2> gets whatever the required str/def/speed/magi is, and says that the item's requirement is twice as large as it should be!
delete the <* 2> to fix this small, but pesky, bug!

---End of bug!---


now scroll and find <' :: Fix item packet ::>
change the code between <' Make sure its a equipable item> and <' Check if they have a full inventory> to:
------
If Item(GetPlayerInvItemNum(Index, n)).Type < ITEM_TYPE_WEAPON Or Item(GetPlayerInvItemNum(Index, n)).Type > ITEM_TYPE_SHIELD Then
             If Item(GetPlayerInvItemNum(Index, n)).Type < ITEM_TYPE_BOOTS Or Item(GetPlayerInvItemNum(Index, n)).Type > ITEM_TYPE_GLOVES Then 'gloves being the last item that you defined in modTypes
                 Exit Sub
             End If
        End If
------

Whew thats where most errors occur! glad thats done with!


Onto <modGameLogic>!

now find <Sub PlayerMapDropItem>
under
---
Case ITEM_TYPE_SHIELD
                     If InvNum = GetPlayerShieldSlot(Index) Then
                          Call SetPlayerShieldSlot(Index, 0)
                          Call SendWornEquipment(Index)
                     End If
                     MapItem(GetPlayerMap(Index), i).Dur = GetPlayerInvItemDur(Index, InvNum)
---
add
---------
Case ITEM_TYPE_GLOVES
                     If InvNum = GetPlayerGlovesSlot(Index) Then
                          Call SetPlayerGlovesSlot(Index, 0)
                          Call SendWornEquipment(Index)
                     End If
                     MapItem(GetPlayerMap(Index), i).Dur = GetPlayerInvItemDur(Index, InvNum)
                                    
                 Case ITEM_TYPE_BOOTS
                     If InvNum = GetPlayerBootsSlot(Index) Then
                          Call SetPlayerBootsSlot(Index, 0)
                          Call SendWornEquipment(Index)
                     End If
                     MapItem(GetPlayerMap(Index), i).Dur = GetPlayerInvItemDur(Index, InvNum)
                 
---------

now that that is done, goto <Sub AttackPlayer>
look for
--
If GetPlayerShieldSlot(Victim) > 0 Then
             Call PlayerMapDropItem(Victim, GetPlayerShieldSlot(Victim), 0)
        End If
--
  and add the following:
-----
If GetPlayerBootsSlot(Victim) > 0 Then
             Call PlayerMapDropItem(Victim, GetPlayerBootsSlot(Victim), 0)
        End If
        If GetPlayerGlovesSlot(Victim) > 0 Then
             Call PlayerMapDropItem(Victim, GetPlayerGlovesSlot(Victim), 0)
        End If
-----

now goto <Sub NpcAttackPlayer>
and just like before, do the following:
look for
--
If GetPlayerShieldSlot(Victim) > 0 Then
             Call PlayerMapDropItem(Victim, GetPlayerShieldSlot(Victim), 0)
        End If
--
  and add this:
-----
If GetPlayerBootsSlot(Victim) > 0 Then
             Call PlayerMapDropItem(Victim, GetPlayerBootsSlot(Victim), 0)
        End If
        If GetPlayerGlovesSlot(Victim) > 0 Then
             Call PlayerMapDropItem(Victim, GetPlayerGlovesSlot(Victim), 0)
        End If
-----

Now goto <Sub CheckEquippedItems>
look for this:
---
Slot = GetPlayerShieldSlot(Index)
    If Slot > 0 Then
        ItemNum = GetPlayerInvItemNum(Index, Slot)
       
        If ItemNum > 0 Then
             If Item(ItemNum).Type <> ITEM_TYPE_SHIELD Then
                 Call SetPlayerShieldSlot(Index, 0)
             End If
        Else
             Call SetPlayerShieldSlot(Index, 0)
        End If
    End If
---
then under that add:
-------
Slot = GetPlayerBootsSlot(Index)
    If Slot > 0 Then
        ItemNum = GetPlayerInvItemNum(Index, Slot)
       
        If ItemNum > 0 Then
             If Item(ItemNum).Type <> ITEM_TYPE_BOOTS Then
                 Call SetPlayerBootsSlot(Index, 0)
             End If
        Else
             Call SetPlayerBootsSlot(Index, 0)
        End If
    End If
   
    Slot = GetPlayerGlovesSlot(Index)
    If Slot > 0 Then
        ItemNum = GetPlayerInvItemNum(Index, Slot)
       
        If ItemNum > 0 Then
             If Item(ItemNum).Type <> ITEM_TYPE_GLOVES Then
                 Call SetPlayerGlovesSlot(Index, 0)
             End If
        Else
             Call SetPlayerGlovesSlot(Index, 0)
        End If
    End If
-------



okay, now goto <Function GetPlayerDamage>
this is where gloves will add a small amount, depending on the items' str!
if you dont want gloves to add onto damage (dont want to prevent blisters :P), skip this part.

under
---
   Dim WeaponSlot As Long
---
add
------------
   Dim GlovesSlot As Long
------------

then before the <end Function> code, add this
------------
If GetPlayerGlovesSlot(Index) > 0 Then
        GlovesSlot = GetPlayerGlovesSlot(Index)
       
        GetPlayerDamage = GetPlayerDamage + Int(Item(GetPlayerInvItemNum(Index, GlovesSlot)).Data2 / 4) 'this adds 1/4th of the str of the gloves to the attack
       
        Call SetPlayerInvItemDur(Index, GlovesSlot, GetPlayerInvItemDur(Index, GlovesSlot) - 1)
       
        If GetPlayerInvItemDur(Index, GlovesSlot) <= 0 Then
             Call PlayerMsg(Index, "Your " & Trim(Item(GetPlayerInvItemNum(Index, GlovesSlot)).Name) & " has broken.", Yellow)
             Call TakeItem(Index, GetPlayerInvItemNum(Index, GlovesSlot), 0)
        Else
             If GetPlayerInvItemDur(Index, GlovesSlot) <= 5 Then
                 Call PlayerMsg(Index, "Your " & Trim(Item(GetPlayerInvItemNum(Index, GlovesSlot)).Name) & " is about to break!", Yellow)
             End If
        End If
    End If
------------

Now we have to add defence from the boots! and part of the gloves again!
---
Dim ArmorSlot As Long, HelmSlot As Long
---
to
------------
Dim ArmorSlot As Long, HelmSlot As Long, GlovesSlot As Long, BootsSlot As Long
------------

after
---
HelmSlot = GetPlayerHelmetSlot(Index)
---
add
------------
GlovesSlot = GetPlayerGlovesSlot(Index)
    BootsSlot = GetPlayerBootsSlot(Index)
------------

then after
----
If HelmSlot > 0 Then
        GetPlayerProtection = GetPlayerProtection + Item(GetPlayerInvItemNum(Index, HelmSlot)).Data2
        Call SetPlayerInvItemDur(Index, HelmSlot, GetPlayerInvItemDur(Index, HelmSlot) - 1)
       
        If GetPlayerInvItemDur(Index, HelmSlot) <= 0 Then
             Call PlayerMsg(Index, "Your " & Trim(Item(GetPlayerInvItemNum(Index, HelmSlot)).Name) & " has broken.", Yellow)
             Call TakeItem(Index, GetPlayerInvItemNum(Index, HelmSlot), 0)
        Else
             If GetPlayerInvItemDur(Index, HelmSlot) <= 5 Then
                 Call PlayerMsg(Index, "Your " & Trim(Item(GetPlayerInvItemNum(Index, HelmSlot)).Name) & " is about to break!", Yellow)
             End If
        End If
    End If
----
add
------------
If GlovesSlot > 0 Then
        GetPlayerProtection = GetPlayerProtection + int(Item(GetPlayerInvItemNum(Index, GlovesSlot)).Data2/4)'adds 1/4th of the gloves strength to the protection
        Call SetPlayerInvItemDur(Index, GlovesSlot, GetPlayerInvItemDur(Index, GlovesSlot) - 1)
       
        If GetPlayerInvItemDur(Index, GlovesSlot) <= 0 Then
             Call PlayerMsg(Index, "Your " & Trim(Item(GetPlayerInvItemNum(Index, GlovesSlot)).Name) & " has broken.", Yellow)
             Call TakeItem(Index, GetPlayerInvItemNum(Index, GlovesSlot), 0)
        Else
             If GetPlayerInvItemDur(Index, GlovesSlot) <= 5 Then
                 Call PlayerMsg(Index, "Your " & Trim(Item(GetPlayerInvItemNum(Index, GlovesSlot)).Name) & " is about to break!", Yellow)
             End If
        End If
    End If
   
    If BootsSlot > 0 Then
        GetPlayerProtection = GetPlayerProtection + int(Item(GetPlayerInvItemNum(Index, BootsSlot)).Data2/2) 'adds 1/3 of the boots strength to the total protection
        Call SetPlayerInvItemDur(Index, BootsSlot, GetPlayerInvItemDur(Index, BootsSlot) - 1)
       
        If GetPlayerInvItemDur(Index, BootsSlot) <= 0 Then
             Call PlayerMsg(Index, "Your " & Trim(Item(GetPlayerInvItemNum(Index, BootsSlot)).Name) & " has broken.", Yellow)
             Call TakeItem(Index, GetPlayerInvItemNum(Index, BootsSlot), 0)
        Else
             If GetPlayerInvItemDur(Index, BootsSlot) <= 5 Then
                 Call PlayerMsg(Index, "Your " & Trim(Item(GetPlayerInvItemNum(Index, BootsSlot)).Name) & " is about to break!", Yellow)
             End If
        End If
    End If
------------

now scroll to <Sub SpawnItemSlot>
and change
---
If (Item(ItemNum).Type >= ITEM_TYPE_WEAPON) And (Item(ItemNum).Type <= ITEM_TYPE_SHIELD) Then
---
to
-----------
If (Item(ItemNum).Type >= ITEM_TYPE_WEAPON) And (Item(ItemNum).Type <= ITEM_TYPE_SHIELD) Or (Item(ItemNum).Type >= ITEM_TYPE_BOOTS) And (Item(ItemNum).Type <= ITEM_TYPE_GLOVES) Then
-----------


nearly Done! goto <modDatabase>
goto <Sub SavePlayer>
Find the <'Worn Equipment> section
then find
---
Call PutVar(FileName, "CHAR" & i, "ShieldSlot", STR(Player(Index).Char(i).ShieldSlot))
---
below that put,
-------
Call PutVar(FileName, "CHAR" & i, "BootsSlot", STR(Player(Index).Char(i).BootsSlot))
'for the boots
Call PutVar(FileName, "CHAR" & i, "GlovesSlot", STR(Player(Index).Char(i).GlovesSlot))
'and for the gloves
-------
now you can save your worn equipment!

Now to be able to load your saved equipment,
goto <Sub LoadPlayer>
Find the <'Worn Equipment> section
and under
---

---
add
--------
Player(Index).Char(i).BootsSlot = Val(GetVar(FileName, "CHAR" & i, "BootsSlot"))
'for boots
Player(Index).Char(i).GlovesSlot = Val(GetVar(FileName, "CHAR" & i, "GlovesSlot"))
'and for gloves!
--------


   ___  _  ___   __   ___  _  ___ ____
   \  \/ \/  /  /  \  \  \/ \/  / \  /
    \   _   /  | [] |  \   _   /   \/
     \_/ \_/    \__/    \_/ \_/    []
wOW! you've successfully completed the server-side of this tutorial!
 _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _
/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
             ______   __   ______   _____   __   __  ______  __
            /  ___/  / /  /__ __/  / ___/  /  | / / /__ __/ / /
           /  /     / /     //    / /__   /   |/ /    //   / /
          /  /     / /     //    / ___/  / /|   /    //   /_/
         /  /___  / /__ __//__  / /__   / / |  /    //   __
        /______/ /____//_____/ /____/  /_/  |_/    //   /_/
 _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _   _
/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
Now onto the client-side!

Alright, open Client.vbp (the Client) and open modTypes
 scroll back down to the <' Item constants>
and add this below <Public Const ITEM_TYPE_SPELL = 13>:
-----------
Public Const ITEM_TYPE_BOOTS = 14
Public Const ITEM_TYPE_GLOVES = 15
-----------

Now scroll down a bit farther, and at <Type PlayerRec>
 add the following below <ShieldSlot As Byte>
-----------
    BootsSlot As Byte
    GlovesSlot As Byte
-----------


Now scroll down to <Sub ClearPlayer> and after <Player(Index).ShieldSlot = 0> add:
-----------
    Player(Index).BootsSlot = 0
    Player(Index).GlovesSlot = 0
-----------

now, go to the bottom of the module, make sure you are not in ANY subs
and make 4 new subs/functions by adding these:
-----------

Function GetPlayerBootsSlot(ByVal Index As Long) As Long
    GetPlayerBootsSlot = Player(Index).BootsSlot
End Function

Sub SetPlayerBootsSlot(ByVal Index As Long, InvNum As Long)
    Player(Index).BootsSlot = InvNum
End Sub

Function GetPlayerGlovesSlot(ByVal Index As Long) As Long
    GetPlayerGlovesSlot = Player(Index).GlovesSlot
End Function

Sub SetPlayerGlovesSlot(ByVal Index As Long, InvNum As Long)
    Player(Index).GlovesSlot = InvNum
End Sub
-----------
      ___    __   ______ __  __    _______      ___   __       ______  ___
     /   |  / /  / ____/ \ \/ /   /__  __/     /  |  /  |     / __  / / _ |
    / /| | / /  / /__     \  /      / /       / /|| //| |    / / / / / / ||
   / / | |/ /  / ___/     /  \     / /       / / ||// | |   / / / / / / //
  / /  |   /  / /___     / /\ \   / /       / /  | /  | |  / /_/ / / /_//
 /_/   |__/  /_____/    /_/  \_\ /_/       /_/   |/   |_| /_____/ /____/
Onto the next mod
<modGameLogic>


Find the sub <Sub ItemEditorInit>
find
---
  If (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_WEAPON) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_SHIELD) Then
---
and change it to
-----------
  If (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_WEAPON) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_SHIELD) Or (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_BOOTS) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_GLOVES) Then
-----------

the scroll around find <Sub ItemEditorOk>
change
---
  If (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_WEAPON) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_SHIELD) Then
---
to
----------
  If (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_WEAPON) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_SHIELD) Or (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_BOOTS) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_GLOVES) Then
----------

Now to make it update your inventory when it is used!
find the sub <Sub UpdateIneventory>
look for this code:
---
If GetPlayerWeaponSlot(MyIndex) = i Or GetPlayerArmorSlot(MyIndex) = i Or GetPlayerHelmetSlot(MyIndex) = i Or GetPlayerShieldSlot(MyIndex) = i Then
---
and change it to:
----------
If GetPlayerWeaponSlot(MyIndex) = i Or GetPlayerArmorSlot(MyIndex) = i Or GetPlayerHelmetSlot(MyIndex) = i Or GetPlayerShieldSlot(MyIndex) = i Or GetPlayerBootsSlot(MyIndex) = i Or GetPlayerGlovesSlot(MyIndex) = i Then
----------



you are so close to finishing!!!



alright goto the module <modClientTCP>
the goto the sub <Sub HandleData> (time for the fun one)
look for the part that says: <' :: Player worn equipment packet ::>
then after
---
Call SetPlayerShieldSlot(MyIndex, Val(Parse(4)))
---
ADD
----------
Call SetPlayerBootsSlot(MyIndex, Val(Parse(5)))
Call SetPlayerGlovesSlot(MyIndex, Val(Parse(6)))
----------

     ___     ______  _______  _________     ______     ______  ______   _________   __
    /  /    / __  / / _____/ /___  ___/    / ___  |   / __  / / ___  \ /___  ___/  / /
   /  /    / /_/ / / /____      / /       / /__/ /   / /_/ / / /__/  /    / /     / /
  /  /    / __  / /____  /     / /       / _____/   / __  / / ____  /    / /     /_/
 /  /__  / / / / _____/ /     / /       / /        / / / / / /    | |   / /     __
/_____/ /_/ /_/ /______/     /_/       /_/        /_/ /_/ /_/     |_|  /_/     /_/


Open frmItemEditor
now this is a little confusing...
click cmdType, its the combobox
change <List> so it says:
-------
None
Weapon
Armor
Helmet
Shield
Potion Add HP
Potion Add MP
Potion Add SP
Potion Sub HP
Potion Sub MP
Potion Sub SP
Key
Currency
Spell
Boots
Gloves

-------

now change ItemData so it says:
-------
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

-------

Then in the code for cmbType (the box that lets you choose your item to edit)

change
---
    If (cmbType.ListIndex >= ITEM_TYPE_WEAPON) And (cmbType.ListIndex <= ITEM_TYPE_SHIELD) Then
---
to
------
    If (cmbType.ListIndex >= ITEM_TYPE_WEAPON) And (cmbType.ListIndex <= ITEM_TYPE_SHIELD) Or (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_BOOTS) And (frmItemEditor.cmbType.ListIndex <= ITEM_TYPE_GLOVES) Then
------



     ______   ______   __    __   ________   _____     ______  _______  ______   __  __  __
    / ____/  / __  /  /  |  / /  / ____  /  / ___ \   / __  / /__  __/ / ____/  / / / / / /
   / /      / / / /  / /|| / /  / /    |/  / /__/ /  / /_/ /    / /   / /___   / / / / / /
  / /      / /_/ /  / / ||/ /  / /   ____ /  ___ \  / __  /    / /   /____ /  /_/ /_/ /_/
 / /___   /_____/  / /  |  /  / /_____|/ /__/  /_/ /_/ /_/    /_/    ____//  __  __  __
/_____/          ;  /_/   |_/  /________/                                /____/  /_/ /_/ /_/
you SHOULD have more fully-working items now!



Print Page | Close Window

Bulletin Board Software by Web Wiz Forums version 8.01 - http://www.webwizforums.com
Copyright ©2001-2006 Web Wiz Guide - http://www.webwizguide.info